dashboard ui added.

merge-requests/1/merge
Sikander Saleem 4 years ago
parent 78ca9e2c70
commit f16b3c5c79

@ -35,6 +35,7 @@
"viewAllOffers": "View All Offers",
"offers": "Offers & ",
"discounts": "Discounts",
"newString": "New",
"title": "Title",
"home": "Home",
"mySalary": "My Salary",

@ -35,6 +35,7 @@
"viewAllOffers": "View All Offers",
"offers": "Offers & ",
"discounts": "Discounts",
"newString": "New",
"title": "Title",
"home": "Home",
"mySalary": "My Salary",

@ -10,7 +10,9 @@ class MyColors {
static const Color grey57Color = Color(0xff575757);
static const Color grey77Color = Color(0xff777777);
static const Color grey98Color = Color(0xff989898);
static const Color lightGreyColor = Color(0xffEFEFEF);
static const Color lightGreyEFColor = Color(0xffEFEFEF);
static const Color lightGreyEDColor = Color(0xffEDEDED);
static const Color darkWhiteColor = Color(0xffE0E0E0);
static const Color redColor = Color(0xffD02127);
static const Color yellowColor = Color(0xffF4E31C);
}

@ -3,10 +3,10 @@ import 'dart:async';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/widgets/otp_widget.dart';
class OtpDialog {
@ -86,7 +86,7 @@ class OtpDialog {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SvgPicture.asset(
type == 1 ? "assets/images/verify_sms.svg" : "assets/images/verify_whatsapp.svg",
type == 1 ? "assets/images/login/verify_sms.svg" : "assets/images/login/verify_whatsapp.svg",
height: 50,
width: 50,
),

@ -5,9 +5,9 @@ import 'package:mohem_flutter_app/classes/colors.dart';
extension EmailValidator on String {
Widget get toWidget => Text(this);
Widget toText10({Color? color}) => Text(
Widget toText10({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
style: TextStyle(fontSize: 10, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
);
Widget toText11({Color? color, bool isUnderLine = false, bool isBold = false}) => Text(
@ -20,8 +20,10 @@ extension EmailValidator on String {
decoration: isUnderLine ? TextDecoration.underline : null),
);
Widget toText12({Color? color, bool isUnderLine = false, bool isBold = false}) => Text(
Widget toText12({Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, int maxLine = 0}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: (maxLine > 0) ? maxLine : null,
style: TextStyle(
fontSize: 12,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600,

@ -38,11 +38,10 @@ class _DashboardState extends State<Dashboard> {
List<String> namesT = [LocaleKeys.monthlyAttendance.tr(), LocaleKeys.workFromHome.tr(), LocaleKeys.ticketRequest.tr(), LocaleKeys.monthlyAttendance.tr()];
List<String> iconT = ["assets/images/monthly_attendance.svg", "assets/images/work_from_home.svg", "assets/images/ticket_request.svg", "assets/images/work_from_home.svg"];
List<String> namesD = ["Nostalgia Perfume Perfume", "Al Nafoura", "AlJadi", "Nostalgia Perfume"];
return Scaffold(
body: Column(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
@ -90,8 +89,14 @@ class _DashboardState extends State<Dashboard> {
),
)
],
),
14.height,
).paddingOnly(left: 21, right: 21, top: 48, bottom: 7),
Expanded(
child: ListView(
padding: EdgeInsets.zero,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.goodMorning.tr().toText14(color: MyColors.grey77Color),
"Mahmoud Shrouf".toText24(isBold: true),
16.height,
@ -125,8 +130,8 @@ class _DashboardState extends State<Dashboard> {
"07:55:12".toText14(color: Colors.white, isBold: true),
LocaleKeys.timeLeftToday.tr().toText12(color: Colors.white),
9.height,
ClipRRect(
borderRadius: const BorderRadius.all(
const ClipRRect(
borderRadius: BorderRadius.all(
Radius.circular(20),
),
child: LinearProgressIndicator(
@ -223,7 +228,7 @@ class _DashboardState extends State<Dashboard> {
],
),
],
).paddingOnly(left: 21, right: 21, top: 48),
).paddingOnly(left: 21, right: 21, top: 7),
SizedBox(
height: 105 + 26,
child: ListView.separated(
@ -267,6 +272,93 @@ class _DashboardState extends State<Dashboard> {
},
separatorBuilder: (cxt, index) => 9.width,
itemCount: 4),
),
8.height,
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 31),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topRight: Radius.circular(50), topLeft: Radius.circular(50)),
border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
LocaleKeys.offers.tr().toText12(),
Row(
children: [
LocaleKeys.discounts.tr().toText24(isBold: true),
6.width,
Container(
padding: const EdgeInsets.only(left: 8, right: 8),
decoration: BoxDecoration(
color: MyColors.yellowColor,
borderRadius: BorderRadius.circular(10),
),
child: LocaleKeys.newString.tr().toText10(isBold: true)),
],
),
],
),
),
LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true),
],
).paddingOnly(left: 21, right: 21),
SizedBox(
height: 103 + 33,
child: ListView.separated(
shrinkWrap: true,
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(left: 21, right: 21, top: 13),
scrollDirection: Axis.horizontal,
itemBuilder: (cxt, index) {
return SizedBox(
width: 73,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 73,
height: 73,
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(
Radius.circular(100),
),
border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
),
child: ClipRRect(
borderRadius: const BorderRadius.all(
Radius.circular(50),
),
child: Image.network(
"https://play-lh.googleusercontent.com/NPo88ojmhah4HDiposucJmfQIop4z4xc8kqJK9ITO9o-yCab2zxIp7PPB_XPj2iUojo",
fit: BoxFit.cover,
),
),
),
4.height,
Expanded(child: namesD[6 % (index + 1)].toText12(isCenter: true,maxLine: 2)),
],
),
);
},
separatorBuilder: (cxt, index) => 8.width,
itemCount: 6),
),
],
),
)
],
),
)
],
),

@ -641,7 +641,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: isDisable ? Colors.grey.withOpacity(0.3) : Colors.white,
border: Border.all(color: MyColors.lightGreyColor, width: 1),
border: Border.all(color: MyColors.lightGreyEFColor, width: 1),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

Loading…
Cancel
Save