From 00b0154987041214df2bdda9c2e7bf5748dbf1c5 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Thu, 19 Nov 2020 09:13:00 +0300 Subject: [PATCH] my family --- lib/pages/DrawerPages/family/my-family.dart | 132 ++++++++++---------- lib/pages/landing/landing_page.dart | 3 +- 2 files changed, 71 insertions(+), 64 deletions(-) diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index d5fd81c1..d3de1b62 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -20,6 +20,8 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/routes.dart'; class MyFamily extends StatefulWidget { + final bool isAppbarVisible; + MyFamily({this.isAppbarVisible =true}); @override _MyFamily createState() => _MyFamily(); } @@ -39,65 +41,66 @@ class _MyFamily extends State with TickerProviderStateMixin { bool expandFlag = false; Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - bottom: TabBar( - indicatorColor: Colors.red, - tabs: [ - Padding( - padding: EdgeInsets.all(6), - child: AppText( - TranslationBase.of(context).family, - color: Colors.white, - )), - Padding( - padding: EdgeInsets.all(6), - child: AppText( - TranslationBase.of(context).request, - color: Colors.white, - )), - ], - controller: _tabController, - ), - title: AppText(TranslationBase.of(context).myFamilyFiles, - color: Colors.white)), - body: TabBarView( - // physics: NeverScrollableScrollPhysics(), - children: [myFamilyDetails(context), myFamilyRequest(context)], - controller: _tabController), - bottomNavigationBar: BottomBarSearch()); + // return Scaffold( + // appBar: AppBar( + // bottom: TabBar( + // indicatorColor: Colors.red, + // tabs: [ + // Padding( + // padding: EdgeInsets.all(6), + // child: AppText( + // TranslationBase.of(context).family, + // color: Colors.white, + // )), + // Padding( + // padding: EdgeInsets.all(6), + // child: AppText( + // TranslationBase.of(context).request, + // color: Colors.white, + // )), + // ], + // controller: _tabController, + // ), + // + // ), + // body: TabBarView( + // // physics: NeverScrollableScrollPhysics(), + // children: [myFamilyDetails(context), myFamilyRequest(context)], + // controller: _tabController), + // ); + // //bottomNavigationBar: BottomBarSearch()); - // AppScaffold( - // appBarTitle: TranslationBase.of(context).myFamilyFiles, - // isShowAppBar: true, - // body: SingleChildScrollView( - // child: Container( - // height: SizeConfig.screenHeight, - // width: SizeConfig.realScreenWidth, - // padding: EdgeInsets.all(20), - // child: Stack( - // children: [ - // TabBar( - // controller: _tabController, - // indicatorColor: Colors.red, - // tabs: [ - // Padding( - // padding: EdgeInsets.all(6), - // child: Text(TranslationBase.of(context).family)), - // Padding( - // padding: EdgeInsets.all(6), - // child: Text(TranslationBase.of(context).request)), - // ], - // ), - // TabBarView( - // controller: _tabController, - // children: [ - // myFamilyDetails(context), - // myFamilyRequest(context) - // ], - // ) - // ], - // )))); + return AppScaffold( + appBarTitle: TranslationBase.of(context).myFamilyFiles, + isShowAppBar: widget.isAppbarVisible, + body: SingleChildScrollView( + child: Container( + height: SizeConfig.screenHeight, + width: SizeConfig.realScreenWidth, + padding: EdgeInsets.all(20), + child: Stack( + children: [ + TabBar( + controller: _tabController, + indicatorColor: Colors.red, + tabs: [ + Padding( + padding: EdgeInsets.all(6), + child: Text(TranslationBase.of(context).family)), + Padding( + padding: EdgeInsets.all(6), + child: Text(TranslationBase.of(context).request)), + ], + ), + TabBarView( + controller: _tabController, + children: [ + myFamilyDetails(context), + myFamilyRequest(context) + ], + ) + ], + )))); } Widget myFamilyDetails(context) { @@ -219,12 +222,15 @@ class _MyFamily extends State with TickerProviderStateMixin { } Widget myFamilyRequest(context) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 10.0), - child: SingleChildScrollView( - child: Column( + return //Padding( + // padding: const EdgeInsets.symmetric(horizontal: 10.0), + // child: + SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height, + margin: EdgeInsets.only(top:50), + child: Column( children: [ - // SizedBox(height: 20.0), RoundedContainer( child: ExpansionTile( title: Text( diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 9e11ee9a..3b6aee91 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; @@ -387,7 +388,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { ), MedicalProfilePage(), BookingOptions(), - Container(), + MyFamily(isAppbarVisible:false), ToDo(), ], // Please do not remove the BookingOptions from this array ),