prescription tab bar improvement.

merge-update-with-lab-changes
Sikander Saleem 5 years ago
parent 3cc18cfb24
commit cfa3ca62b6

@ -268,7 +268,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
list.add( list.add(
Expanded( Expanded(
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).bookNow, TranslationBase.of(context).reviewAppointment,
DocAvailableAppointments.areSlotsAvailable ? goToBookConfirm : null, DocAvailableAppointments.areSlotsAvailable ? goToBookConfirm : null,
color: Color(0xFFD02127), color: Color(0xFFD02127),
disabledColor: Color(0xff28323A).withOpacity(0.3), disabledColor: Color(0xff28323A).withOpacity(0.3),

@ -367,7 +367,9 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
page: AppointmentDetails( page: AppointmentDetails(
appo: _appointmentResult, appo: _appointmentResult,
parentIndex: _currentPage, parentIndex: _currentPage,
))).then((value) { ),
),
).then((value) {
getPatientAppointmentHistory(); getPatientAppointmentHistory();
}), }),
isInOutPatient: _appointmentResult.isInOutPatient, isInOutPatient: _appointmentResult.isInOutPatient,

@ -18,8 +18,7 @@ class HomePrescriptionsPage extends StatefulWidget {
_HomePrescriptionsPageState createState() => _HomePrescriptionsPageState(); _HomePrescriptionsPageState createState() => _HomePrescriptionsPageState();
} }
class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
@ -27,8 +26,10 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/0.png')); imagesInfo.add(ImagesInfo(
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/1.png')); imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/1.png'));
} }
@override @override
@ -50,32 +51,28 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
showNewAppBar: true, showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: true, showNewAppBarTitle: true,
body: Scaffold( body: Column(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Column(
children: <Widget>[ children: <Widget>[
TabBar( TabBar(
tabs: [ // isScrollable: true,
Tab(child: Text(TranslationBase.of(context).prescriptions, style: TextStyle(color: Colors.black))),
Tab(
child: Text(TranslationBase.of(context).history, style: TextStyle(color: Colors.black)),
),
],
controller: _tabController, controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
), ),
Divider( unselectedLabelStyle: TextStyle(
color: Colors.grey[600], fontSize: 16,
thickness: 0.5, fontWeight: FontWeight.w600,
), letterSpacing: -0.48,
],
), ),
tabs: [Text(TranslationBase.of(context).prescriptions), Text(TranslationBase.of(context).history)],
), ),
body: Column(
children: <Widget>[
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -93,7 +90,6 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
], ],
), ),
), ),
),
); );
} }
} }

@ -132,7 +132,7 @@ class DoctorCard extends StatelessWidget {
), ),
Text( Text(
// DateUtil.formatDateToTime(date), // DateUtil.formatDateToTime(date),
appointmentTime, appointmentTime ?? "",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12),
), ),
], ],

Loading…
Cancel
Save