merge-requests/924/head
Elham Rababh 4 years ago
parent bff995ecfa
commit 70b3776aa7

@ -2,6 +2,7 @@ import 'dart:ui';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -17,10 +18,10 @@ class PatientReferralScreen extends StatefulWidget {
_PatientReferralScreen createState() => _PatientReferralScreen(); _PatientReferralScreen createState() => _PatientReferralScreen();
} }
class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTickerProviderStateMixin { class _PatientReferralScreen extends State<PatientReferralScreen>
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
int index=0; int index = 0;
@override @override
void initState() { void initState() {
@ -41,7 +42,6 @@ class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTic
_tabController.dispose(); _tabController.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -51,17 +51,11 @@ class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTic
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
// backgroundColor: Colors.white, // backgroundColor: Colors.white,
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070), preferredSize:
Size.fromHeight(MediaQuery.of(context).size.height * 0.070),
child: Center( child: Center(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.070, height: Helpers.getTabHeight(context),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 1), //width: 0.7
),
color: Colors.white),
child: Center( child: Center(
child: TabBar( child: TabBar(
isScrollable: false, isScrollable: false,
@ -69,93 +63,36 @@ class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTic
indicatorColor: Colors.transparent, indicatorColor: Colors.transparent,
indicatorWeight: 1.0, indicatorWeight: 1.0,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 0, left:0, right: 0,bottom: 0), labelPadding:
EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.33, decoration: Helpers.getBoxTabsBoxDecoration(
height: MediaQuery.of(context).size.height * 0.070, isActive: index == 0, isFirst: true),
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
child: Center( child: Center(
child: Container( child: Helpers.getTabText(title:TranslationBase.of(context).myReferredPatient, isActive:index == 0 )
height: MediaQuery.of(context).size.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
index == 0
? Color(0xFFD02127 )
: Color(0xFFEAEAEA),
index == 0 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
TranslationBase.of(context).myReferredPatient,
fontSize: SizeConfig.textMultiplier * 1.8,
color: index == 0 ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
), ),
), ),
Container( Center(
width: MediaQuery.of(context).size.width * 0.34, child: Container(
height: MediaQuery.of(context).size.height * 0.070, decoration:Helpers.getBoxTabsBoxDecoration(
decoration: TextFieldsUtils.containerBorderDecoration( isActive: index == 1, isMiddle: true),
Color(0Xffffffff), Color(0xFFCCCCCC), child: Center(
borderRadius: 4, borderWidth: 0), child:Helpers.getTabText(title:TranslationBase.of(context).referral, isActive:index == 1 )
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
index == 1
? Color(0xFFD02127 )
: Color(0xFFEAEAEA),
index == 1 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
TranslationBase.of(context).referral,
fontSize: SizeConfig.textMultiplier * 1.8,
color: index == 1 ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
), ),
), ),
), ),
Container( Center(
width: MediaQuery.of(context).size.width * 0.33, child: Container(
height: MediaQuery.of(context).size.height * 0.070, decoration:Helpers.getBoxTabsBoxDecoration(
decoration: TextFieldsUtils.containerBorderDecoration( isActive: index == 2, isLast: true),
Color(0Xffffffff), Color(0xFFCCCCCC), child: Center(
borderRadius: 4, borderWidth: 0), child: Helpers.getTabText(title:TranslationBase.of(context).discharged, isActive:index == 2 ),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
index == 2
? Color(0xFFD02127 )
: Color(0xFFEAEAEA),
index == 2 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
TranslationBase.of(context).discharged,
fontSize: SizeConfig.textMultiplier * 1.8,
color: index == 2 ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
), ),
), ),
), ),
], ],
), ),
), ),

Loading…
Cancel
Save