prescription tab bar improvement.

merge-update-with-lab-changes
Sikander Saleem 4 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),

@ -362,12 +362,14 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
return DoctorCard( return DoctorCard(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
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,48 +51,43 @@ 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, children: <Widget>[
appBar: PreferredSize( TabBar(
preferredSize: Size.fromHeight(65.0), // isScrollable: true,
child: Column( controller: _tabController,
children: <Widget>[ indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
TabBar( labelColor: Color(0xff2B353E),
tabs: [ unselectedLabelColor: Color(0xff575757),
Tab(child: Text(TranslationBase.of(context).prescriptions, style: TextStyle(color: Colors.black))), labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
Tab( labelStyle: TextStyle(
child: Text(TranslationBase.of(context).history, style: TextStyle(color: Colors.black)), fontSize: 16,
), fontWeight: FontWeight.w600,
letterSpacing: -0.48,
], ),
controller: _tabController, unselectedLabelStyle: TextStyle(
), fontSize: 16,
Divider( fontWeight: FontWeight.w600,
color: Colors.grey[600], letterSpacing: -0.48,
thickness: 0.5, ),
), tabs: [Text(TranslationBase.of(context).prescriptions), Text(TranslationBase.of(context).history)],
],
), ),
), Expanded(
body: Column( child: TabBarView(
children: <Widget>[ physics: BouncingScrollPhysics(),
Expanded( controller: _tabController,
child: TabBarView( children: <Widget>[
physics: BouncingScrollPhysics(), PrescriptionsPage(
controller: _tabController, prescriptionsViewModel: model,
children: <Widget>[ ),
PrescriptionsPage( PrescriptionsHistoryPage(
prescriptionsViewModel: model, prescriptionsViewModel: model,
), )
PrescriptionsHistoryPage( ],
prescriptionsViewModel: model, ),
) )
], ],
),
)
],
),
), ),
), ),
); );

@ -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