|
|
|
|
@ -3,6 +3,7 @@ import 'dart:ui';
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.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/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
@ -45,123 +46,79 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBar: PatientSearchHeader(
|
|
|
|
|
title: TranslationBase.of(context).patientsreferral,
|
|
|
|
|
),
|
|
|
|
|
body: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
//height: MediaQuery.of(context).size.height * 0.050,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border(
|
|
|
|
|
bottom: BorderSide(
|
|
|
|
|
color: Theme.of(context).dividerColor,
|
|
|
|
|
width: 1), //width: 0.7
|
|
|
|
|
),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: TabBar(
|
|
|
|
|
isScrollable: false,
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
indicatorColor: Colors.transparent,
|
|
|
|
|
indicatorWeight: 1.0,
|
|
|
|
|
indicatorSize: TabBarIndicatorSize.tab,
|
|
|
|
|
labelColor: Theme.of(context).primaryColor,
|
|
|
|
|
labelPadding:
|
|
|
|
|
EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0),
|
|
|
|
|
unselectedLabelColor: Colors.grey[800],
|
|
|
|
|
tabs: [
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.33,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.070,
|
|
|
|
|
decoration: TextFieldsUtils.containerBorderDecoration(
|
|
|
|
|
Color(0Xffffffff), Color(0xFFCCCCCC),
|
|
|
|
|
borderRadius: 4, borderWidth: 0),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
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,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBar: PatientSearchHeader(
|
|
|
|
|
title: TranslationBase.of(context).patientsreferral,
|
|
|
|
|
),
|
|
|
|
|
appBarTitle: TranslationBase.of(context).patientsreferral,
|
|
|
|
|
body: Scaffold(
|
|
|
|
|
extendBodyBehindAppBar: true,
|
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
|
appBar: PreferredSize(
|
|
|
|
|
preferredSize:
|
|
|
|
|
Size.fromHeight(MediaQuery.of(context).size.height * 0.070),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: Helpers.getTabHeight(context),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: TabBar(
|
|
|
|
|
isScrollable: false,
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
indicatorColor: Colors.transparent,
|
|
|
|
|
indicatorWeight: 1.0,
|
|
|
|
|
indicatorSize: TabBarIndicatorSize.tab,
|
|
|
|
|
labelColor: Theme.of(context).primaryColor,
|
|
|
|
|
labelPadding:
|
|
|
|
|
EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0),
|
|
|
|
|
unselectedLabelColor: Colors.grey[800],
|
|
|
|
|
tabs: [
|
|
|
|
|
Container(
|
|
|
|
|
decoration: Helpers.getBoxTabsBoxDecoration(
|
|
|
|
|
isActive: index == 0, isFirst: true),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Helpers.getTabText(title:TranslationBase.of(context).myReferredPatient, isActive:index == 0 )
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.34,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.070,
|
|
|
|
|
decoration: TextFieldsUtils.containerBorderDecoration(
|
|
|
|
|
Color(0Xffffffff), Color(0xFFCCCCCC),
|
|
|
|
|
borderRadius: 4, borderWidth: 0),
|
|
|
|
|
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,
|
|
|
|
|
Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration:Helpers.getBoxTabsBoxDecoration(
|
|
|
|
|
isActive: index == 1, isMiddle: true),
|
|
|
|
|
child: Center(
|
|
|
|
|
child:Helpers.getTabText(title:TranslationBase.of(context).referral, isActive:index == 1 )
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.33,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.070,
|
|
|
|
|
decoration: TextFieldsUtils.containerBorderDecoration(
|
|
|
|
|
Color(0Xffffffff), Color(0xFFCCCCCC),
|
|
|
|
|
borderRadius: 4, borderWidth: 0),
|
|
|
|
|
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,
|
|
|
|
|
Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration:Helpers.getBoxTabsBoxDecoration(
|
|
|
|
|
isActive: index == 2, isLast: true),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Helpers.getTabText(title:TranslationBase.of(context).discharged, isActive:index == 2 ),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: TabBarView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ReferredPatientScreen(),
|
|
|
|
|
MyReferralInPatientScreen(),
|
|
|
|
|
ReferralDischargedPatientPage()
|
|
|
|
|
// MyReferredPatient(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
body: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: TabBarView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ReferredPatientScreen(),
|
|
|
|
|
MyReferralInPatientScreen(),
|
|
|
|
|
ReferralDischargedPatientPage()
|
|
|
|
|
// MyReferredPatient(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|