From f8651ab49a8752aaa7c31b1f922263d5a34d15c4 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Sun, 29 May 2022 14:22:33 +0300 Subject: [PATCH] app bar --- lib/ui/profile/basic_details.dart | 92 ++++++++++++++++--------------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/lib/ui/profile/basic_details.dart b/lib/ui/profile/basic_details.dart index e603180..0beec77 100644 --- a/lib/ui/profile/basic_details.dart +++ b/lib/ui/profile/basic_details.dart @@ -1,5 +1,3 @@ - - import 'package:easy_localization/src/public_ext.dart'; import 'package:flutter/material.dart'; import 'package:mohem_flutter_app/api/profile_api_client.dart'; @@ -10,6 +8,7 @@ import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart'; import 'package:mohem_flutter_app/ui/profile/profile.dart'; +import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart'; class BasicDetails extends StatefulWidget { @@ -71,30 +70,38 @@ class _BasicDetailsState extends State { Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - backgroundColor: MyColors.white, - leading: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - IconButton( - icon: const Icon( - Icons.arrow_back_ios, - color: MyColors.backgroundBlackColor, - ), - onPressed: () => Navigator.pop(context), - ), - "Basic Details".toText24(isBold: true, color: MyColors.blackColor), - ], - ), + appBar: AppBarWidget( + context, + title: "Basic Details", ), + // appBar: AppBar( + // backgroundColor: MyColors.white, + // leading: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // IconButton( + // icon: const Icon( + // Icons.arrow_back_ios, + // color: MyColors.backgroundBlackColor, + // ), + // onPressed: () => Navigator.pop(context), + // ), + // "Basic Details".toText24(isBold: true, color: MyColors.blackColor), + // ], + // ), + // ), backgroundColor: MyColors.backgroundColor, - bottomSheet:footer(), + bottomSheet: footer(), body: Column( children: [ Container( width: double.infinity, - margin: EdgeInsets.only(top: 28, left: 26, right: 26,), - padding: EdgeInsets.only(left: 14, right: 14,top: 13, bottom: 5), + margin: EdgeInsets.only( + top: 28, + left: 26, + right: 26, + ), + padding: EdgeInsets.only(left: 14, right: 14, top: 13, bottom: 5), height: 280, decoration: BoxDecoration( boxShadow: [ @@ -108,32 +115,31 @@ class _BasicDetailsState extends State { color: Colors.white, borderRadius: BorderRadius.circular(10.0), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - "Full Name".toText13(color: MyColors.lightGrayColor), - "${fullName}".toText16(isBold: true, color: MyColors.blackColor), - SizedBox( - height: 20,), - "Marital Status".toText13(color: MyColors.lightGrayColor), - "${maritalStatus}".toText16(isBold: true, color: MyColors.blackColor), - SizedBox( - height: 20,), - "Date of Birth".toText13(color: MyColors.lightGrayColor), - "${birthDate}".toText16(isBold: true, color: MyColors.blackColor), - SizedBox( - height: 20,), - "Civil Identity Number".toText13(color: MyColors.lightGrayColor), - "${civilIdentityNumber}".toText16(isBold: true, color: MyColors.blackColor), - ] - ), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + "Full Name".toText13(color: MyColors.lightGrayColor), + "${fullName}".toText16(isBold: true, color: MyColors.blackColor), + SizedBox( + height: 20, + ), + "Marital Status".toText13(color: MyColors.lightGrayColor), + "${maritalStatus}".toText16(isBold: true, color: MyColors.blackColor), + SizedBox( + height: 20, + ), + "Date of Birth".toText13(color: MyColors.lightGrayColor), + "${birthDate}".toText16(isBold: true, color: MyColors.blackColor), + SizedBox( + height: 20, + ), + "Civil Identity Number".toText13(color: MyColors.lightGrayColor), + "${civilIdentityNumber}".toText16(isBold: true, color: MyColors.blackColor), + ]), ), ], - ) - - ); + )); } - footer(){ + + footer() { return Container( decoration: BoxDecoration( // borderRadius: BorderRadius.circular(10),