Merge branch 'master' into development_sikander
# Conflicts: # lib/classes/colors.dart # lib/config/routes.dart # lib/extensions/string_extensions.dart # lib/generated/codegen_loader.g.dart # lib/ui/landing/dashboard.dartmerge-requests/1/merge
commit
c6ac45fc3d
@ -0,0 +1,25 @@
|
|||||||
|
import 'package:easy_localization/src/public_ext.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
|
||||||
|
AppBar appBar(BuildContext context, {required String title}) {
|
||||||
|
return AppBar(
|
||||||
|
title: title.toText24(textColor: MyColors.darkTextColor),
|
||||||
|
centerTitle: false,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
icon: Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: MyColors.darkIconColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -0,0 +1,126 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/circular_avatar.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
|
import 'dart:math' as math;
|
||||||
|
|
||||||
|
class ActionsFragment extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
showItem(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget showItem() {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color(0xff000000).withOpacity(.05),
|
||||||
|
blurRadius: 26,
|
||||||
|
offset: const Offset(0, -3),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
margin: EdgeInsets.all(21),
|
||||||
|
child: Stack(
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
children: [
|
||||||
|
Positioned(
|
||||||
|
left: -21,
|
||||||
|
child: Transform.rotate(
|
||||||
|
angle: 125,
|
||||||
|
child: Container(
|
||||||
|
width: 60,
|
||||||
|
height: 20,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
CircularAvatar(),
|
||||||
|
12.width,
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
"Mahmoud Shrouf".toText16(),
|
||||||
|
6.height,
|
||||||
|
"Missing Swipe Request for Hussain, Mohammad has been approved"
|
||||||
|
.toText12(),
|
||||||
|
3.height,
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
"Submitted".toText10(),
|
||||||
|
12.width,
|
||||||
|
"On 07 Jan 2021"
|
||||||
|
.toText12(color: MyColors.lightTextColor)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
12.height,
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 1,
|
||||||
|
color: MyColors.lightTextColor,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: "Request Info"
|
||||||
|
.toText12(isBold: true)
|
||||||
|
.paddingOnly(left: 21, right: 21, top: 16, bottom: 8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
width: 1,
|
||||||
|
height: 45,
|
||||||
|
color: MyColors.lightTextColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: "Delegate"
|
||||||
|
.toText12(
|
||||||
|
color: MyColors.gradiantEndColor, isBold: true)
|
||||||
|
.paddingOnly(left: 21, right: 21, top: 16, bottom: 8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
|
||||||
|
class AttachmentsFragment extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: ListView.separated(
|
||||||
|
itemCount: 2,
|
||||||
|
padding: EdgeInsets.all(21),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return showItem(attachmentsList[index]);
|
||||||
|
},
|
||||||
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
|
return 21.height;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget showItem(Attachments attachments) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.all(21),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color(0xff000000).withOpacity(.05),
|
||||||
|
blurRadius: 26,
|
||||||
|
offset: const Offset(0, -3),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(attachments.icon),
|
||||||
|
12.width,
|
||||||
|
attachments.title.toText16()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Attachments {
|
||||||
|
String title;
|
||||||
|
String icon;
|
||||||
|
|
||||||
|
Attachments(this.title, this.icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Attachments> attachmentsList = [
|
||||||
|
Attachments("Attachment File Name.png", "assets/images/png.svg"),
|
||||||
|
Attachments("Attachment File Name.pdf", "assets/images/pdf.svg"),
|
||||||
|
];
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
import 'package:flutter/material.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';
|
||||||
|
|
||||||
|
class InfoFragment extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color(0xff000000).withOpacity(.05),
|
||||||
|
blurRadius: 26,
|
||||||
|
offset: const Offset(0, -3),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.all(21),
|
||||||
|
padding: EdgeInsets.only(top: 21, bottom: 21, right: 16, left: 16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: "Info Details".toText16(),
|
||||||
|
),
|
||||||
|
// Icon(Icons.keyboard_arrow_down_rounded),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
12.height,
|
||||||
|
showItem("From:", "Alma Linde Mendoza"),
|
||||||
|
showItem("To:", "Al Yabis, Norah"),
|
||||||
|
showItem("Sent:", "1/26/2020 10:41:07 AM"),
|
||||||
|
showItem("ID:", "30581045"),
|
||||||
|
showItem("Closed:", "-"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget showItem(String title, String value) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 2, bottom: 2),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
title.toText12(isBold: true),
|
||||||
|
6.width,
|
||||||
|
title.toText12(isBold: false, color: MyColors.normalTextColor),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
|
||||||
|
class RequestFragment extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
State<RequestFragment> createState() => _RequestFragmentState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RequestFragmentState extends State<RequestFragment> {
|
||||||
|
bool isOpened = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color(0xff000000).withOpacity(.05),
|
||||||
|
blurRadius: 26,
|
||||||
|
offset: const Offset(0, -3),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.all(21),
|
||||||
|
padding: EdgeInsets.only(top: 21, bottom: 21, right: 16, left: 16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: "Hardware Mobility 161 Messenger".toText16(),
|
||||||
|
),
|
||||||
|
Icon(Icons.keyboard_arrow_down_rounded),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
12.height,
|
||||||
|
showItem("Code:", "3188000067"),
|
||||||
|
showItem("Quantity:", "1"),
|
||||||
|
showItem("Line Status:", "Pending Approval"),
|
||||||
|
showItem("Transection Type:", "Move Order Issue:"),
|
||||||
|
showItem("Organization Code:", "SWD"),
|
||||||
|
showItem("From Subinventory:", "SWD_MSPS"),
|
||||||
|
showItem("To Subinventory:", "SWD_MSPS"),
|
||||||
|
showItem("Ship To Location :",
|
||||||
|
"SWD 11206-E.R. (Emergency Room)"),
|
||||||
|
showItem("Unit:", "Each"),
|
||||||
|
showItem("Date Required:", "12/23/2019 4:54:04 PM"),
|
||||||
|
showItem("Status Date:", "12/23/2019 4:54:04 PM"),
|
||||||
|
showItem("Operation Unit:", "Sehat Al Sewedi"),
|
||||||
|
showItem("Organization:", "Sehat Al Sewedi"),
|
||||||
|
showItem("From Locator:", "-"),
|
||||||
|
showItem("To Locator :", "-"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget showItem(String title, String value) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 2, bottom: 2),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
title.toText12(isBold: true),
|
||||||
|
6.width,
|
||||||
|
title.toText12(isBold: false, color: MyColors.normalTextColor),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/app_bar.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/actions_fragment.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/attachments_fragment.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/info_fragments.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/request_fragment.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
|
||||||
|
class MissingSwipeScreen extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return DefaultTabController(
|
||||||
|
length: 4,
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: appBar(context, title: "Missing Swipe Request"),
|
||||||
|
body: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(20),
|
||||||
|
bottomRight: Radius.circular(20)),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
transform: GradientRotation(.46),
|
||||||
|
begin: Alignment.topRight,
|
||||||
|
end: Alignment.bottomRight,
|
||||||
|
colors: [
|
||||||
|
MyColors.gradiantEndColor,
|
||||||
|
MyColors.gradiantStartColor,
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: TabBar(
|
||||||
|
indicatorColor: Colors.white,
|
||||||
|
labelColor: Colors.white,
|
||||||
|
tabs: [
|
||||||
|
Tab(
|
||||||
|
text: "Request",
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
text: "Actions",
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
text: "Attachments",
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
text: "Info.",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: TabBarView(
|
||||||
|
children: [
|
||||||
|
RequestFragment(),
|
||||||
|
ActionsFragment(),
|
||||||
|
AttachmentsFragment(),
|
||||||
|
InfoFragment(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 60,
|
||||||
|
padding: EdgeInsets.only(left: 21, right: 21),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: DefaultButton(
|
||||||
|
"Reject",
|
||||||
|
() {},
|
||||||
|
colors: [
|
||||||
|
Color(0xffEB8C90),
|
||||||
|
Color(0xffDE6C70),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
12.width,
|
||||||
|
Expanded(
|
||||||
|
child: DefaultButton(
|
||||||
|
"Approve",
|
||||||
|
() {},
|
||||||
|
colors: [
|
||||||
|
Color(0xff32D892),
|
||||||
|
Color(0xff1AB170),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,206 @@
|
|||||||
|
import 'package:easy_localization/src/public_ext.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/config/routes.dart';
|
||||||
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/app_bar.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
|
|
||||||
|
class WorkListScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
State<WorkListScreen> createState() => _WorkListScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _WorkListScreenState extends State<WorkListScreen> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: appBar(
|
||||||
|
context,
|
||||||
|
title: LocaleKeys.workList.tr(),
|
||||||
|
),
|
||||||
|
body: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 2,
|
||||||
|
color: MyColors.darkWhiteColor,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 40,
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 21,
|
||||||
|
),
|
||||||
|
child: ListView.separated(
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 30,
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(6),
|
||||||
|
color: tabList[index].isSelected
|
||||||
|
? MyColors.darkIconColor
|
||||||
|
: MyColors.darkWhiteColor,
|
||||||
|
),
|
||||||
|
child: tabList[index].title.toText12(
|
||||||
|
color: tabList[index].isSelected
|
||||||
|
? MyColors.white
|
||||||
|
: MyColors.black,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return 8.width;
|
||||||
|
},
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: tabList.length,
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 21,
|
||||||
|
right: 21,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
LocaleKeys.human.toText12(),
|
||||||
|
LocaleKeys.resources.tr().toText24(isBold: true),
|
||||||
|
],
|
||||||
|
).paddingOnly(top: 24, left: 21, right: 21),
|
||||||
|
24.height,
|
||||||
|
Expanded(
|
||||||
|
child: ListView.separated(
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return rowItem(typesList[index]);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return 12.height;
|
||||||
|
},
|
||||||
|
itemCount: typesList.length,
|
||||||
|
padding: EdgeInsets.only(left: 21, right: 21),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget rowItem(Types types) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: (){
|
||||||
|
Navigator.pushNamed(context, AppRoutes.missingSwipe);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color(0xff000000).withOpacity(.05),
|
||||||
|
blurRadius: 26,
|
||||||
|
offset: const Offset(0, -3),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
transform: GradientRotation(.46),
|
||||||
|
begin: Alignment.topRight,
|
||||||
|
end: Alignment.bottomRight,
|
||||||
|
colors: types.colors),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
"assets/images/miss_swipe.svg",
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
2.height,
|
||||||
|
types.title.toText10(color: Colors.white)
|
||||||
|
],
|
||||||
|
).paddingAll(6),
|
||||||
|
),
|
||||||
|
12.width,
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
"Missing Swipe Request".toText16(),
|
||||||
|
"Missing Swipe Request for Hussain, Mohammad has been approved"
|
||||||
|
.toText10(),
|
||||||
|
12.height,
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: "07 Jan 2021"
|
||||||
|
.toText10(color: MyColors.lightTextColor)),
|
||||||
|
SvgPicture.asset(
|
||||||
|
"assets/images/arrow_next.svg",
|
||||||
|
color: MyColors.darkIconColor,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Tabs {
|
||||||
|
String title;
|
||||||
|
bool isSelected;
|
||||||
|
|
||||||
|
Tabs(this.title, this.isSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Tabs> tabList = [
|
||||||
|
Tabs("All", true),
|
||||||
|
Tabs("HR", false),
|
||||||
|
Tabs("MO", false),
|
||||||
|
Tabs("PR", false),
|
||||||
|
Tabs("PO", false),
|
||||||
|
];
|
||||||
|
|
||||||
|
class Types {
|
||||||
|
String title;
|
||||||
|
List<Color> colors;
|
||||||
|
|
||||||
|
Types(this.title, this.colors);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Types> typesList = [
|
||||||
|
Types("HR", [Color(0xff32D892), Color(0xff1AB170)]),
|
||||||
|
Types("ITG", [Color(0xffEB8C90), Color(0xffDE6C70)]),
|
||||||
|
Types("PO", [Color(0xff5099E3), Color(0xff3670AA)]),
|
||||||
|
Types("PR", [Color(0xff48EACF), Color(0xff3DCAB3)]),
|
||||||
|
Types("MO", [Color(0xff58DCFA), Color(0xff3CB9D5)]),
|
||||||
|
];
|
||||||
Loading…
Reference in New Issue