improvements

merge-requests/1/merge
Sikander Saleem 4 years ago
parent c6ac45fc3d
commit cbe471c7b0

@ -16,6 +16,7 @@ class MyColors {
static const Color grey98Color = Color(0xff989898); static const Color grey98Color = Color(0xff989898);
static const Color lightGreyEFColor = Color(0xffEFEFEF); static const Color lightGreyEFColor = Color(0xffEFEFEF);
static const Color lightGreyEDColor = Color(0xffEDEDED); static const Color lightGreyEDColor = Color(0xffEDEDED);
static const Color lightGreyEAColor = Color(0xffEAEAEA);
static const Color darkWhiteColor = Color(0xffE0E0E0); static const Color darkWhiteColor = Color(0xffE0E0E0);
static const Color redColor = Color(0xffD02127); static const Color redColor = Color(0xffD02127);
static const Color yellowColor = Color(0xffF4E31C); static const Color yellowColor = Color(0xffF4E31C);

@ -47,6 +47,11 @@ extension EmailValidator on String {
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 16, letterSpacing: -0.64, fontWeight: isBold ? FontWeight.bold : FontWeight.w600), style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 16, letterSpacing: -0.64, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
); );
Widget toText17({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 17, letterSpacing: -0.68, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText22({Color? color, bool isBold = false}) => Text( Widget toText22({Color? color, bool isBold = false}) => Text(
this, this,
style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600), style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),

@ -65,6 +65,8 @@ class CodegenLoader extends AssetLoader{
"msg": "Hello {} in the {} world ", "msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language", "msg_named": "{} are written in the {lang} language",
"clickMe": "Click me", "clickMe": "Click me",
"human": "Human",
"resources": "Resources",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",
@ -149,6 +151,8 @@ static const Map<String,dynamic> en_US = {
"msg": "Hello {} in the {} world ", "msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language", "msg_named": "{} are written in the {lang} language",
"clickMe": "Click me", "clickMe": "Click me",
"human": "Human",
"resources": "Resources",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -6,10 +6,11 @@ import 'package:mohem_flutter_app/extensions/string_extensions.dart';
AppBar appBar(BuildContext context, {required String title}) { AppBar appBar(BuildContext context, {required String title}) {
return AppBar( return AppBar(
title: title.toText24(textColor: MyColors.darkTextColor), title: title.toText24(color: MyColors.darkTextColor),
centerTitle: false, centerTitle: false,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
actions: [ actions: [
IconButton( IconButton(
onPressed: () { onPressed: () {

@ -207,7 +207,9 @@ class _DashboardState extends State<Dashboard> {
) )
], ],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6), ).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
); ).onPress(() {
Navigator.pushNamed(context, AppRoutes.workList);
});
}, },
), ),
), ),

@ -1,8 +1,10 @@
import 'package:easy_localization/src/public_ext.dart'; import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart'; import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
@ -106,7 +108,22 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: ["Mark".tr().toText12(), "Attendance".tr().toText24(), "Select the method to mark the attendance".tr().toText12(color: Color(0xff535353)), 24.height], children: [
"Mark".tr().toText12(),
"Attendance".tr().toText24(),
"Select the method to mark the attendance".tr().toText12(color: Color(0xff535353)),
24.height,
GridView(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: <Widget>[
attendanceMethod("NFC", "assets/images/nfc.svg", () {}),
attendanceMethod("Wifi", "assets/images/wufu.svg", () {}),
],
)
],
), ),
), ),
// Positioned( // Positioned(
@ -135,6 +152,21 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
); );
} }
Widget attendanceMethod(String title, String image, VoidCallback onPress) => Container(
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [Expanded(child: SvgPicture.asset(image)), title.toText17(isBold: true, color: Colors.white)],
),
).onPress(onPress);
Widget commonStatusView(String title, String time) => Expanded( Widget commonStatusView(String title, String time) => Expanded(
child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [
title.toText12(color: Colors.white), title.toText12(color: Colors.white),

@ -23,14 +23,8 @@ class MissingSwipeScreen extends StatelessWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)),
bottomLeft: Radius.circular(20), gradient: LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [
bottomRight: Radius.circular(20)),
gradient: LinearGradient(
transform: GradientRotation(.46),
begin: Alignment.topRight,
end: Alignment.bottomRight,
colors: [
MyColors.gradiantEndColor, MyColors.gradiantEndColor,
MyColors.gradiantStartColor, MyColors.gradiantStartColor,
]), ]),

@ -52,7 +52,7 @@ class _WorkListScreenState extends State<WorkListScreen> {
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
color: tabList[index].isSelected color: tabList[index].isSelected
? MyColors.darkIconColor ? MyColors.darkIconColor
: MyColors.darkWhiteColor, : MyColors.lightGreyEAColor,
), ),
child: tabList[index].title.toText12( child: tabList[index].title.toText12(
color: tabList[index].isSelected color: tabList[index].isSelected

Loading…
Cancel
Save