prescription tab bar improvement.

merge-requests/390/head
Sikander Saleem 3 years ago
parent 3cc18cfb24
commit cfa3ca62b6

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

@ -362,12 +362,14 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: AppointmentDetails(
context,
FadePage(
page: AppointmentDetails(
appo: _appointmentResult,
parentIndex: _currentPage,
))).then((value) {
),
),
).then((value) {
getPatientAppointmentHistory();
}),
isInOutPatient: _appointmentResult.isInOutPatient,

@ -18,8 +18,7 @@ class HomePrescriptionsPage extends StatefulWidget {
_HomePrescriptionsPageState createState() => _HomePrescriptionsPageState();
}
class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
with SingleTickerProviderStateMixin {
class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> with SingleTickerProviderStateMixin {
TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@ -27,8 +26,10 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
void initState() {
super.initState();
_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(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'));
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(
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
@ -50,48 +51,43 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: true,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Column(
children: <Widget>[
TabBar(
tabs: [
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,
),
Divider(
color: Colors.grey[600],
thickness: 0.5,
),
],
body: Column(
children: <Widget>[
TabBar(
// isScrollable: true,
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,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).prescriptions), Text(TranslationBase.of(context).history)],
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
PrescriptionsPage(
prescriptionsViewModel: model,
),
PrescriptionsHistoryPage(
prescriptionsViewModel: model,
)
],
),
)
],
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
PrescriptionsPage(
prescriptionsViewModel: model,
),
PrescriptionsHistoryPage(
prescriptionsViewModel: model,
)
],
),
)
],
),
),
);

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

Loading…
Cancel
Save