my team issues fixed

merge-requests/1/merge
Sikander Saleem 3 years ago
parent f3855c3883
commit cfe0460ea5

@ -387,6 +387,10 @@
"itemPrice": "سعر السلعة", "itemPrice": "سعر السلعة",
"itemPhotos": "صور البند", "itemPhotos": "صور البند",
"itemInfo": "معلومات العنصر", "itemInfo": "معلومات العنصر",
"uploadAttachment": "تحميل المرفق",
"selectFromGalleryOrOpenCamera": "اختر من المعرض أو فتح الكاميرا",
"openCamera": "فتح\nآلة تصوير",
"uploadFromGallery": "تحميل من\nصالة عرض",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -387,6 +387,10 @@
"itemPrice": "Item Price", "itemPrice": "Item Price",
"itemPhotos": "Item Photos", "itemPhotos": "Item Photos",
"itemInfo": "Item Info", "itemInfo": "Item Info",
"uploadAttachment": "Upload Attachment",
"selectFromGalleryOrOpenCamera": "Select from gallery or open camera",
"openCamera": "Open\nCamera",
"uploadFromGallery": "Upload from\nGallery",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -1,11 +1,9 @@
import 'dart:collection';
import 'dart:ui'; import 'dart:ui';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/html_parser.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/my_team/my_team_api_client.dart'; import 'package:mohem_flutter_app/api/my_team/my_team_api_client.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.dart';
@ -19,7 +17,6 @@ import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.
import 'package:mohem_flutter_app/models/profile_menu.model.dart'; import 'package:mohem_flutter_app/models/profile_menu.model.dart';
import 'package:mohem_flutter_app/models/worklist/get_favorite_replacements_model.dart'; import 'package:mohem_flutter_app/models/worklist/get_favorite_replacements_model.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/widgets/circular_avatar.dart'; import 'package:mohem_flutter_app/widgets/circular_avatar.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -28,7 +25,6 @@ class EmployeeDetails extends StatefulWidget {
@override @override
_EmployeeDetailsState createState() => _EmployeeDetailsState(); _EmployeeDetailsState createState() => _EmployeeDetailsState();
} }
class _EmployeeDetailsState extends State<EmployeeDetails> { class _EmployeeDetailsState extends State<EmployeeDetails> {
@ -62,7 +58,6 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
setState(() {}); setState(() {});
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (getEmployeeSubordinates == null) { if (getEmployeeSubordinates == null) {
@ -70,7 +65,6 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
setMenu(); setMenu();
} }
return Scaffold( return Scaffold(
extendBody: true, extendBody: true,
backgroundColor: MyColors.lightGreyEFColor, backgroundColor: MyColors.lightGreyEFColor,
@ -118,10 +112,7 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
Widget myTeamInfo() { Widget myTeamInfo() {
Uri phoneNumber = Uri.parse('tel:${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}'); Uri phoneNumber = Uri.parse('tel:${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}');
double _width = MediaQuery double _width = MediaQuery.of(context).size.width;
.of(context)
.size
.width;
return Column( return Column(
children: [ children: [
Stack(children: [ Stack(children: [
@ -133,6 +124,8 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
IconButton( IconButton(
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
onPressed: () { onPressed: () {
if (getEmployeeSubordinates!.isFavorite != true) { if (getEmployeeSubordinates!.isFavorite != true) {
showFavoriteAlertDialog(context); showFavoriteAlertDialog(context);
@ -143,28 +136,32 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "", employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "",
image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "", image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "",
userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "", userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "",
isFav: false,); isFav: false,
);
setState(() {}); setState(() {});
} }, }
icon: getEmployeeSubordinates!.isFavorite != true },
? Icon( icon: Icon(
Icons.star_outline, getEmployeeSubordinates!.isFavorite != true ? Icons.star_outline : Icons.star_outlined,
size: 35,
color: MyColors.green9CColor,
)
: Icon(
Icons.star_outlined,
size: 35, size: 35,
color: MyColors.green9CColor, color: MyColors.green9CColor,
), ),
), ),
getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER == "" getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER == ""
? SvgPicture.asset("assets/images/call-disable.svg", height: 25, width: 25,).paddingOnly(left:6, right: 17) ? SvgPicture.asset(
"assets/images/call-disable.svg",
height: 25,
width: 25,
)
: InkWell( : InkWell(
onTap: () { onTap: () {
launchUrl(phoneNumber); launchUrl(phoneNumber);
}, },
child: SvgPicture.asset("assets/images/call.svg", height: 25, width: 25,).paddingOnly(left:6, right: 17), child: SvgPicture.asset(
"assets/images/call.svg",
height: 25,
width: 25,
),
), ),
], ],
), ),
@ -172,50 +169,46 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
("${getEmployeeSubordinates!.eMPLOYEENUMBER!} | ${getEmployeeSubordinates!.jOBNAME!}").toText13(color: MyColors.grey80Color), ("${getEmployeeSubordinates!.eMPLOYEENUMBER!} | ${getEmployeeSubordinates!.jOBNAME!}").toText13(color: MyColors.grey80Color),
getEmployeeSubordinates!.eMPLOYEEEMAILADDRESS!.toText13(), getEmployeeSubordinates!.eMPLOYEEEMAILADDRESS!.toText13(),
], ],
).objectContainerView(), ).paddingOnly(top: 16, bottom: 12, right: 14, left: 14).objectContainerView(radius: 10, disablePadding: true),
), ),
Container( Container(height: 68, alignment: Alignment.center, child: ProfileImage()).paddingOnly(top: 10),
height: 68, alignment: Alignment.center, child: ProfileImage()).paddingOnly(top: 10),
]), ]),
12.height, 12.height,
Container( ListView.separated(
margin: EdgeInsets.fromLTRB(21, 0, 21, 0), padding: EdgeInsets.only(bottom: 21),
child: Column( shrinkWrap: true,
children: menu.map((ProfileMenu i) => rowItem(i, context)).toList(), physics: const NeverScrollableScrollPhysics(),
).objectContainerView(), itemBuilder: (cxt, index) => Row(
), children: [
// ), SvgPicture.asset('assets/images/' + menu[index].icon, width: 20, height: 20),
16.width,
menu[index].name.toText16().expanded,
16.width,
const Icon(Icons.arrow_forward, color: MyColors.darkIconColor)
],
).onPress(() {
Navigator.pushNamed(context, menu[index].route, arguments: menu[index].arguments);
}).paddingOnly(left: 21, right: 21, top: 21),
separatorBuilder: (cxt, index) => 12.height,
itemCount: menu.length)
.objectContainerView(disablePadding: true, radius: 10)
.paddingOnly(left: 21, right: 21),
], ],
); );
} }
Widget ProfileImage() => Widget ProfileImage() => getEmployeeSubordinates?.eMPLOYEEIMAGE == null
getEmployeeSubordinates?.eMPLOYEEIMAGE == null ? SvgPicture.asset(
? SvgPicture.asset("assets/images/user.svg",height: 68, width: 68, ) "assets/images/user.svg",
height: 68,
width: 68,
)
: CircleAvatar( : CircleAvatar(
radius: 70, radius: 68,
backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinates?.eMPLOYEEIMAGE)), backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinates?.eMPLOYEEIMAGE)),
backgroundColor: Colors.black, backgroundColor: Colors.black,
); );
Widget rowItem(obj, context) {
return InkWell(
onTap: () {
Navigator.pushNamed(context, obj.route, arguments:obj.arguments);
},
child: ListTile(
leading: SvgPicture.asset('assets/images/' + obj.icon),
title: Text(obj.name,
style: TextStyle(color: MyColors.grey3AColor,
fontSize: 16)),
trailing: Icon(Icons.arrow_forward,
color: MyColors.grey3AColor,),
),
);
}
void setMenu() { void setMenu() {
menu = [ menu = [
ProfileMenu(name: LocaleKeys.profileDetails.tr(), icon: "profile_details.svg", route: AppRoutes.profileDetails, arguments: getEmployeeSubordinates), ProfileMenu(name: LocaleKeys.profileDetails.tr(), icon: "profile_details.svg", route: AppRoutes.profileDetails, arguments: getEmployeeSubordinates),
@ -290,8 +283,4 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
} else { } else {
return GetMenuEntriesList(); return GetMenuEntriesList();
} }
} }

@ -29,10 +29,13 @@ class _MyTeamState extends State<MyTeam> {
TextEditingController? _textEditingController = TextEditingController(); TextEditingController? _textEditingController = TextEditingController();
List<GetEmployeeSubordinatesList> getEmployeeSListOnSearch = []; List<GetEmployeeSubordinatesList> getEmployeeSListOnSearch = [];
String dropdownValue = 'Name'; String dropdownValue = '';
int index = 0;
void initState() { void initState() {
super.initState(); super.initState();
dropdownValue = list[index];
getEmployeeSubordinates(); getEmployeeSubordinates();
} }
@ -58,24 +61,12 @@ class _MyTeamState extends State<MyTeam> {
showMemberButton: true, showMemberButton: true,
), ),
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
body: SingleChildScrollView( body: ListView(
child: Column( padding: const EdgeInsets.all(21),
children: [ children: [
Container( Row(
margin: EdgeInsets.only(left: 21, right: 21, top: 20, bottom: 6),
padding: EdgeInsets.only(left: 14, right: 14, top: 21, bottom: 21),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Color(0xffFFFFFF),
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Row(
children: [ children: [
Expanded( TextField(
child: TextField(
onChanged: dropdownValue == "Name" onChanged: dropdownValue == "Name"
? (String value) { ? (String value) {
getEmployeeSListOnSearch = getEmployeeSListOnSearch =
@ -87,41 +78,43 @@ class _MyTeamState extends State<MyTeam> {
getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEEEMAILADDRESS!.toLowerCase().contains(value.toLowerCase())).toList(); getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEEEMAILADDRESS!.toLowerCase().contains(value.toLowerCase())).toList();
setState(() {}); setState(() {});
}, },
style: const TextStyle(
fontSize: 14.0,
color: MyColors.grey3AColor,
fontWeight: FontWeight.w600,
letterSpacing: -0.56,
),
controller: _textEditingController, controller: _textEditingController,
decoration: InputDecoration( decoration: InputDecoration(
filled: true, filled: true,
isDense: true,
fillColor: Colors.white, fillColor: Colors.white,
border: InputBorder.none, border: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
// contentPadding: EdgeInsets.fromLTRB(10, 15, 10, 15), contentPadding: EdgeInsets.zero,
//contentPadding: EdgeInsets.fromLTRB(14, 15, 10, 15),
hintText: LocaleKeys.searchBy.tr() + " $dropdownValue", hintText: LocaleKeys.searchBy.tr() + " $dropdownValue",
hintStyle: TextStyle(fontSize: 14.0, color: MyColors.grey3AColor), hintStyle: const TextStyle(
fontSize: 14.0,
color: MyColors.grey3AColor,
fontWeight: FontWeight.w600,
letterSpacing: -0.56,
), ),
)),
Container(
height: 36,
width: 1,
color: Color(0xffC4C4C4),
), ),
).paddingOnly(top: 21, bottom: 21).expanded,
Container(height: 15, width: 1, color: const Color(0xffC4C4C4)),
10.width, 10.width,
dropDown(), dropDown(),
], ],
), ).paddingOnly(left: 14, right: 14).objectContainerBorderView(disablePadding: true, color: Colors.white, radius: 10),
),
Container(
margin: EdgeInsets.only(left: 21, right: 21),
width: MediaQuery.of(context).size.width,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
children: <Widget>[
_textEditingController!.text.isNotEmpty && getEmployeeSListOnSearch.isEmpty _textEditingController!.text.isNotEmpty && getEmployeeSListOnSearch.isEmpty
? Utils.getNoDataWidget(context) ? Utils.getNoDataWidget(context).paddingOnly(top: 120)
: ListView.separated( : ListView.separated(
scrollDirection: Axis.vertical, //scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
padding: const EdgeInsets.only(top: 12),
separatorBuilder: (cxt, index) => 12.height, separatorBuilder: (cxt, index) => 12.height,
itemCount: _textEditingController!.text.isNotEmpty ? getEmployeeSListOnSearch.length : getEmployeeSubordinatesList.length, itemCount: _textEditingController!.text.isNotEmpty ? getEmployeeSListOnSearch.length : getEmployeeSubordinatesList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
@ -135,7 +128,11 @@ class _MyTeamState extends State<MyTeam> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
getEmployeeSListOnSearch[index].eMPLOYEEIMAGE == null getEmployeeSListOnSearch[index].eMPLOYEEIMAGE == null
? SvgPicture.asset("assets/images/user.svg",height: 34, width: 34, ).paddingOnly(top: 4) ? SvgPicture.asset(
"assets/images/user.svg",
height: 34,
width: 34,
).paddingOnly(top: 4)
: Container( : Container(
height: 34, height: 34,
width: 34, width: 34,
@ -155,52 +152,56 @@ class _MyTeamState extends State<MyTeam> {
], ],
).expanded, ).expanded,
Column( Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
getEmployeeSListOnSearch[index].eMPLOYEEMOBILENUMBER == "" getEmployeeSListOnSearch[index].eMPLOYEEMOBILENUMBER == ""
? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22).paddingOnly(bottom: 23) ? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22)
: InkWell( : InkWell(
onTap: () { onTap: () {
launchUrl(phoneNumber); launchUrl(phoneNumber);
}, },
child: SvgPicture.asset("assets/images/call.svg", width: 22, height: 22).paddingOnly(bottom: 23), child: SvgPicture.asset("assets/images/call.svg", width: 22, height: 22)),
8.height,
const Icon(
Icons.arrow_forward_outlined,
color: MyColors.grey3AColor,
size: 18,
), ),
// 21.height,
Icon(Icons.arrow_forward_outlined, color: MyColors.grey3AColor),
], ],
).expanded, ),
], ],
).objectContainerView(), ).paddingOnly(top: 13, bottom: 13, right: 12, left: 14).objectContainerView(radius: 10, disablePadding: true),
); );
}) })
], ],
), ),
), );
)
],
),
));
} }
// todo @fatima add translation for below list
List<String> list = ["Name", "Email"];
Widget dropDown() { Widget dropDown() {
return return PopupMenuButton(
DropdownButton<String>( itemBuilder: (_) => <PopupMenuItem<int>>[
value: dropdownValue, for (int i = 0; i < list.length; i++) PopupMenuItem<int>(value: i, child: Text(list[i])),
icon: const Icon(Icons.keyboard_arrow_down, ],
color: MyColors.grey35Color).paddingOnly(left: 4), onSelected: (int popupIndex) {
elevation: 16, index = popupIndex;
onChanged: (String? newValue) { dropdownValue = list[popupIndex];
setState(() { setState(() {});
dropdownValue = newValue!;
});
}, },
items: <String>['Name', 'Email'].map<DropdownMenuItem<String>>((String value) { child: Row(
return DropdownMenuItem<String>( children: [
value: value, dropdownValue.toText14(),
child: Text(value), 10.width,
); const Icon(
}).toList(), Icons.keyboard_arrow_down_rounded,
style: TextStyle(fontSize: 14.0, color: MyColors.grey57Color), color: Color(0xff535353),
)
],
),
); );
} }
} }

@ -59,37 +59,25 @@ class _FamilyMembersState extends State<FamilyMembers> {
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
body: Column( body: Column(
children: [ children: [
20.height,
Expanded( Expanded(
child: getEmployeeContactsList.length != 0 child: getEmployeeContactsList.length != 0
? SingleChildScrollView( ? ListView.separated(
padding: const EdgeInsets.all(21), padding: const EdgeInsets.all(21),
scrollDirection: Axis.vertical,
child: ListView.separated(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
separatorBuilder: (cxt, index) => 12.height, separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeeContactsList.length, itemCount: getEmployeeContactsList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Column( Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
crossAxisAlignment: CrossAxisAlignment.start, "${getEmployeeContactsList[index].cONTACTNAME}".toText16(color: MyColors.grey3AColor),
children: [ "${getEmployeeContactsList[index].rELATIONSHIP}".toText11(color: MyColors.textMixColor),
"${getEmployeeContactsList[index].cONTACTNAME}".toText16(isBold: true, color: MyColors.grey3AColor), ]).paddingOnly(top: 15, left: 13, right: 13, bottom: 12),
"${getEmployeeContactsList[index].rELATIONSHIP}".toText11(isBold: true, color: MyColors.textMixColor), 1.divider,
]),
const Divider(
color: Color(0xffEFEFEF),
thickness: 1,
indent: 0,
endIndent: 0,
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
// todo @faitma clean below logic and write clean code.
menuEntries.updateButton == 'Y' menuEntries.updateButton == 'Y'
? InkWell( ? InkWell(
onTap: () async { onTap: () async {
@ -99,7 +87,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
children: [ children: [
WidgetSpan( const WidgetSpan(
child: Icon( child: Icon(
Icons.edit, Icons.edit,
size: 15, size: 15,
@ -108,10 +96,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
), ),
TextSpan( TextSpan(
text: LocaleKeys.update.tr(), text: LocaleKeys.update.tr(),
style: TextStyle( style: const TextStyle(color: MyColors.grey67Color, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
color: MyColors.grey67Color,
fontSize: 12,
),
), ),
], ],
), ),
@ -120,7 +105,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
: RichText( : RichText(
text: TextSpan( text: TextSpan(
children: [ children: [
WidgetSpan( const WidgetSpan(
child: Icon( child: Icon(
Icons.edit, Icons.edit,
size: 15, size: 15,
@ -129,19 +114,12 @@ class _FamilyMembersState extends State<FamilyMembers> {
), ),
TextSpan( TextSpan(
text: LocaleKeys.update.tr(), text: LocaleKeys.update.tr(),
style: TextStyle( style: const TextStyle(color: MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
color: MyColors.lightGreyColor,
fontSize: 12,
),
), ),
], ],
), ),
), ),
Container( Container(height: 35, width: 1, color: const Color(0xffEFEFEF)),
height: 35,
width: 1,
color: Color(0xffEFEFEF),
),
InkWell( InkWell(
onTap: () { onTap: () {
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt(); relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt();
@ -150,7 +128,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
children: [ children: [
WidgetSpan( const WidgetSpan(
child: Icon( child: Icon(
Icons.delete, Icons.delete,
size: 15, size: 15,
@ -159,10 +137,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
), ),
TextSpan( TextSpan(
text: LocaleKeys.remove.tr(), text: LocaleKeys.remove.tr(),
style: TextStyle( style: const TextStyle(color: MyColors.redColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
color: MyColors.redColor,
fontSize: 12,
),
), ),
], ],
), ),
@ -171,22 +146,18 @@ class _FamilyMembersState extends State<FamilyMembers> {
], ],
), ),
], ],
).objectContainerView(); ).objectContainerView(disablePadding: true);
}), })
)
: Container(), : Container(),
), ),
DefaultButton( DefaultButton(LocaleKeys.addNewFamilyMember.tr(), () async {
LocaleKeys.addNewFamilyMember.tr(), () async {
Navigator.pushNamed(context, AppRoutes.addUpdateFamilyMember, arguments: {"relationID": relationId, "flag": 1, "actionType": "ADD"}); Navigator.pushNamed(context, AppRoutes.addUpdateFamilyMember, arguments: {"relationID": relationId, "flag": 1, "actionType": "ADD"});
ProfileScreen(); ProfileScreen();
} }).insideContainer,
).insideContainer,
], ],
)); ));
} }
void showUpdateAlertDialog(BuildContext context, int relationId, int flag, String actionType) { void showUpdateAlertDialog(BuildContext context, int relationId, int flag, String actionType) {
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: Text( child: Text(
@ -261,6 +232,4 @@ class _FamilyMembersState extends State<FamilyMembers> {
}, },
); );
} }
} }

@ -1,4 +1,5 @@
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/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/extensions/widget_extensions.dart';
@ -27,7 +28,7 @@ class AttachmentOptions extends StatelessWidget {
children: [ children: [
itemView("open_camera.svg", "Open\nCamera"), itemView("open_camera.svg", "Open\nCamera"),
itemView("gallery.svg", "Upload from\nGallery"), itemView("gallery.svg", "Upload from\nGallery"),
itemView("files", "Upload from\nFiles"), itemView("files.svg", "Upload from\nFiles"),
], ],
) )
], ],
@ -40,7 +41,7 @@ class AttachmentOptions extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Icon(Icons.photo), SvgPicture.asset("assets/images/$icon"),
title.toText11(isBold: true), title.toText11(isBold: true),
], ],
).paddingOnly(left: 13, right: 13, top: 16, bottom: 12).expanded.objectContainerBorderView( ).paddingOnly(left: 13, right: 13, top: 16, bottom: 12).expanded.objectContainerBorderView(

Loading…
Cancel
Save