Skip to content

Commit

Permalink
Add all docs of all changed files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush0Chaudhary committed Oct 1, 2023
1 parent b0ad5fc commit 3049a4b
Show file tree
Hide file tree
Showing 23 changed files with 783 additions and 331 deletions.
63 changes: 60 additions & 3 deletions lib/apptheme.dart
Original file line number Diff line number Diff line change
@@ -1,108 +1,165 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

// import 'package:flutter_screenutil/flutter_screenutil.dart';
/// This class will be use to uniform the apptheme of the app in future.

/// Apptheme class.
///
class AppTheme {
// Text Styles
/// Custom theme for the app.
///
static TextStyle title = const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: blackPrimary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle headline1 = const TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: blackPrimary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle headline2 = const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: blackPrimary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle headline3 = const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: blackPrimary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle headline4 = const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: blackPrimary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle headline5 = const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: blackPrimary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle headline6 = const TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
color: blackPrimary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle subtitle1 = const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: blackSecondary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle subtitle2 = const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: blackSecondary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle bodyText1 = const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
color: blackSecondary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle bodyText2 = const TextStyle(
fontSize: 8,
fontWeight: FontWeight.w400,
color: blackSecondary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle bodyText3 = const TextStyle(
fontSize: 10,
fontWeight: FontWeight.w400,
color: blackSecondary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle overline = const TextStyle(
fontSize: 6,
fontWeight: FontWeight.w400,
color: blackSecondary,
fontFamily: 'OpenSans',
);

/// Custom theme for the app.
static TextStyle button = const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: primary,
fontFamily: 'OpenSans',
);

// Colors
/// Colors.
///
/// Custom colors for the app.
static const Color primary = Color(0xFFFFC107);

/// Custom colors for the app.
static const Color secondary = Color(0xFF795548);

/// Custom colors for the app.
static const Color tertiary = Color(0xFFA16938);

/// Custom colors for the app.
static const Color white = Color(0xFFFFFFFF);

/// Custom colors for the app.
static const Color red = Color(0xFFEB5757);

/// Custom colors for the app.
static const Color blue = Color(0xFF2196F3);

/// Custom colors for the app.
static const Color yellow = Color(0xffF6BA18);

/// Custom colors for the app.
static const Color green = Color(0xFF2ACC00);

/// Custom colors for the app.
static const Color grey = Color(0xFFD2D2D2);

/// Custom colors for the app.
static const Color lightGrey = Color(0xFFECECEC);

/// Custom colors for the app.
static const Color blackPrimary = Color(0xFF3E3E3E);

/// Custom colors for the app.
static const Color blackSecondary = Color(0xFF636363);

/// Custom colors for the app.
static const Color blackTertiary = Color(0xFFAEAEAE);

/// Custom colors for the app.
static const Color shadow = Color(0x408E8E8E);
}
23 changes: 23 additions & 0 deletions lib/models/organization/org_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ class OrgInfo {
);
}

/// The conventional function to parse json, check flutter docs to know more.
///
///
/// **params**:
/// * `json`: Passing the json to be parsed.
///
/// **returns**:
/// * `List<OrgInfo>`: returning the OrgInfo object containing the json data
List<OrgInfo> fromJsonToList(List<dynamic> json) {
final List<OrgInfo> orgList = [];
json.forEach((element) {
Expand All @@ -70,20 +78,35 @@ class OrgInfo {
return orgList;
}

/// contains the Image url.
@HiveField(0)
String? image;

/// The org id.
@HiveField(1)
String? id;

/// The org name.
@HiveField(2)
String? name;

/// The org admins.
@HiveField(3)
List<User>? admins;

/// The org name.
@HiveField(4)
List<User>? members;

/// The org descriptions.
@HiveField(5)
String? description;

/// The org visibility.
@HiveField(6)
bool? isPublic;

/// The org creatorInfo.
@HiveField(7)
User? creatorInfo;
}
11 changes: 9 additions & 2 deletions lib/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ import 'package:talawa/views/pre_auth_screens/set_url.dart';
import 'package:talawa/views/pre_auth_screens/signup_details.dart';
import 'package:talawa/views/pre_auth_screens/waiting_to_join_private_org.dart';

/// The MaterialApp provides us with a property called generateRoute where
/// we can pass in a Function that returns a Route<dynamic> and takes in RouteSettings
/// The MaterialApp provides us with a property called generateRoute where.
///
///
/// we can pass in a Function that returns a Route<dynamic> and takes in RouteSettings
/// Thus for this purpose, we create a function named generateRoute
///
/// **params**:
/// * `settings`: RouteSetting have been passed
///
/// **returns**:
/// * `Route<dynamic>`: Return a Route
Route<dynamic> generateRoute(RouteSettings settings) {
// The settings contains the route information of the requested route.
// It provides two key things to us: the name, and the arguments.
Expand Down
Loading

0 comments on commit 3049a4b

Please sign in to comment.