|
|
|
@ -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,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|