|
|
@ -2,12 +2,13 @@ import 'dart:ui';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart';
|
|
|
|
import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart';
|
|
|
|
import 'OrderLogPage.dart';
|
|
|
|
import 'OrderLogPage.dart';
|
|
|
@ -17,8 +18,7 @@ class AmbulanceReq extends StatefulWidget {
|
|
|
|
_AmbulanceReqState createState() => _AmbulanceReqState();
|
|
|
|
_AmbulanceReqState createState() => _AmbulanceReqState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _AmbulanceReqState extends State<AmbulanceReq>
|
|
|
|
class _AmbulanceReqState extends State<AmbulanceReq> with SingleTickerProviderStateMixin {
|
|
|
|
with SingleTickerProviderStateMixin {
|
|
|
|
|
|
|
|
TabController _tabController;
|
|
|
|
TabController _tabController;
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
|
|
|
|
|
|
|
@ -36,101 +36,61 @@ class _AmbulanceReqState extends State<AmbulanceReq>
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
imagesInfo.add(ImagesInfo(
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
imageEn:
|
|
|
|
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
|
|
|
|
'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png',
|
|
|
|
|
|
|
|
imageAr:
|
|
|
|
|
|
|
|
'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return BaseView<AmRequestViewModel>(
|
|
|
|
return BaseView<AmRequestViewModel>(
|
|
|
|
onModelReady: (model) => model.getAmRequestOrders(),
|
|
|
|
onModelReady: (model) => model.getAmRequestOrders(),
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
isShowAppBar: true,
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
|
|
|
|
showNewAppBar: true,
|
|
|
|
appBarTitle: TranslationBase.of(context).transportationService,
|
|
|
|
appBarTitle: TranslationBase.of(context).transportationService,
|
|
|
|
description: TranslationBase.of(context).infoAmbulance,
|
|
|
|
description: TranslationBase.of(context).infoAmbulance,
|
|
|
|
imagesInfo: imagesInfo,
|
|
|
|
imagesInfo: imagesInfo,
|
|
|
|
baseViewModel: model,
|
|
|
|
baseViewModel: model,
|
|
|
|
body: Scaffold(
|
|
|
|
body: Column(
|
|
|
|
extendBodyBehindAppBar: true,
|
|
|
|
children: [
|
|
|
|
appBar: PreferredSize(
|
|
|
|
TabBar(
|
|
|
|
preferredSize: Size.fromHeight(65.0),
|
|
|
|
isScrollable: false,
|
|
|
|
child: Stack(
|
|
|
|
controller: _tabController,
|
|
|
|
children: <Widget>[
|
|
|
|
indicatorWeight: 3.0,
|
|
|
|
Positioned(
|
|
|
|
indicatorSize: TabBarIndicatorSize.tab,
|
|
|
|
bottom: 1,
|
|
|
|
labelColor: Color(0xff2B353E),
|
|
|
|
left: 0,
|
|
|
|
unselectedLabelColor: Color(0xff575757),
|
|
|
|
right: 0,
|
|
|
|
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
|
|
|
|
child: BackdropFilter(
|
|
|
|
labelStyle: TextStyle(
|
|
|
|
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
|
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
|
|
child: Container(
|
|
|
|
fontSize: 15,
|
|
|
|
color: Theme.of(context)
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
.scaffoldBackgroundColor
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
.withOpacity(0.8),
|
|
|
|
),
|
|
|
|
height: 70.0,
|
|
|
|
unselectedLabelStyle: TextStyle(
|
|
|
|
),
|
|
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
|
|
),
|
|
|
|
fontSize: 15,
|
|
|
|
),
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
Center(
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
child: Container(
|
|
|
|
),
|
|
|
|
height: 60.0,
|
|
|
|
tabs: [
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
Text(TranslationBase.of(context).transportationService),
|
|
|
|
width: MediaQuery.of(context).size.width * 0.90,
|
|
|
|
Text(TranslationBase.of(context).ordersLog),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
border: Border(
|
|
|
|
|
|
|
|
bottom: BorderSide(
|
|
|
|
|
|
|
|
color: Theme.of(context).dividerColor,
|
|
|
|
|
|
|
|
width: 0.7),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: TabBar(
|
|
|
|
|
|
|
|
isScrollable: true,
|
|
|
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
|
|
|
indicatorWeight: 5.0,
|
|
|
|
|
|
|
|
indicatorSize: TabBarIndicatorSize.label,
|
|
|
|
|
|
|
|
labelColor: Theme.of(context).primaryColor,
|
|
|
|
|
|
|
|
labelPadding:
|
|
|
|
|
|
|
|
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
|
|
|
|
|
|
|
|
unselectedLabelColor: Colors.grey[800],
|
|
|
|
|
|
|
|
tabs: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.40,
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: Texts(TranslationBase.of(context).transportationService),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.30,
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: Texts(TranslationBase.of(context).ordersLog),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
body: Column(
|
|
|
|
child: TabBarView(
|
|
|
|
children: <Widget>[
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
Expanded(
|
|
|
|
controller: _tabController,
|
|
|
|
child: TabBarView(
|
|
|
|
children: <Widget>[
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
AmbulanceRequestIndexPage(
|
|
|
|
controller: _tabController,
|
|
|
|
amRequestViewModel: model,
|
|
|
|
children: <Widget>[
|
|
|
|
),
|
|
|
|
AmbulanceRequestIndexPage(
|
|
|
|
OrderLogPage(
|
|
|
|
amRequestViewModel: model,
|
|
|
|
amRequestViewModel: model,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
OrderLogPage(
|
|
|
|
],
|
|
|
|
amRequestViewModel: model,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|