elham commit

master_hussam
hussam al-habibeh 5 years ago
parent 80b9eea5ea
commit f7e464567a

@ -3,5 +3,5 @@
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

@ -21,21 +21,19 @@
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.

@ -2,5 +2,5 @@ package com.cloud.driverapp
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
class MainActivity : FlutterActivity() {
}

@ -1,12 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
import 'package:driverapp/config/config.dart';import 'package:driverapp/core/model/orders/next_order_request_model.dart';import 'package:driverapp/core/model/orders/pending_orders_req_model.dart';import 'package:driverapp/core/model/orders/pending_orders_res_model.dart';import 'package:driverapp/core/model/orders/update_order_status_request_model.dart';import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';import 'pack

@ -1,18 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@android:color/white</item>
</style>
</resources>
import 'package:barcode_scan/platform_wrapper.dart';import 'package:driverapp/config/config.dart';import 'package:driverapp/config/size_config.dart';import 'package:driverapp/core/enum/viewstate.dart';import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';import 'package:driverapp/core/viewModels/authentication_view_model.dart';import 'package:driverapp/core/viewModels/orders_view_model.dart';import 'package:driverapp/pages/delivery/information_page.dart';import 'package:driverapp/pages/orders/deliverd_orders_page.dart';import 'package:driverapp/pages/orders/pending_orders_page.dart';import 'package:driverapp/pages/setting/setting_page.dart';import 'package:driverapp/uitl/app_toast.dart';import 'package:driverapp/uitl/translations_delegate_base.dart';import 'package:driverapp/uitl/utils.dart';import 'package:driverapp/widgets/order/order_info_card.dart';import 'package:driverapp/widgets/others/app_scaffold_w

@ -3,5 +3,5 @@
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

@ -11,7 +11,7 @@
/// fonts:
/// - asset: fonts/DriverApp.ttf
///
///
///
///
import 'package:flutter/widgets.dart';
@ -21,19 +21,34 @@ class DriverApp {
static const _kFontFam = 'DriverApp';
static const _kFontPkg = null;
static const IconData location_1 = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logo = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData closed_box = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData location = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData open_box = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData phone_call = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData not_available = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData rejected_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData not_reachable_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData group_74 = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData message = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData whatsapp = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData call = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData deliverd_icon = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData location_1 =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logo =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData closed_box =
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData location =
IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData open_box =
IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData phone_call =
IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr =
IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData not_available =
IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData rejected_icon =
IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData not_reachable_icon =
IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData group_74 =
IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData message =
IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData whatsapp =
IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData call =
IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData deliverd_icon =
IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

@ -1,4 +1,5 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
/// End points
const BASE_URL = 'https://uat.hmgwebservices.com/Services';
@ -23,3 +24,11 @@ const MAX_SMALL_SCREEN = 660;
class AppGlobal {
static BuildContext context;
}
const LINEAR_GRADIENT = LinearGradient(
colors: [
Color(0xff45B7AE),
Color(0xff119FA9),
],
// stops: [0.0, 1.0],
);

@ -1,5 +1,3 @@
const TOKEN = 'token';
const APP_LANGUAGE = 'language';
const USER_PROFILE = 'user-profile';

@ -41,7 +41,7 @@ class SizeConfig {
}
_blockWidth = screenWidth / 100;
_blockHeight = screenHeight / 100;
textMultiplier = _blockHeight;
imageSizeMultiplier = _blockWidth;
heightMultiplier = _blockHeight;

@ -15,18 +15,18 @@ class AuthenticatedUser {
AuthenticatedUser(
{this.iD,
this.userID,
this.password,
this.userName,
this.roleID,
this.name,
this.active,
this.createdOn,
this.createdBy,
this.editedOn,
this.editedBy,
this.mobileNumber,
this.realRoleID});
this.userID,
this.password,
this.userName,
this.roleID,
this.name,
this.active,
this.createdOn,
this.createdBy,
this.editedOn,
this.editedBy,
this.mobileNumber,
this.realRoleID});
AuthenticatedUser.fromJson(Map<String, dynamic> json) {
iD = json['ID'];

@ -15,4 +15,4 @@ class LoginRequest {
data['Password'] = this.password;
return data;
}
}
}

@ -18,21 +18,21 @@ class HospitalsModel {
HospitalsModel(
{this.desciption,
this.desciptionN,
this.iD,
this.legalName,
this.legalNameN,
this.name,
this.nameN,
this.phoneNumber,
this.setupID,
this.distanceInKilometers,
this.isActive,
this.latitude,
this.longitude,
this.mainProjectID,
this.projectOutSA,
this.usingInDoctorApp});
this.desciptionN,
this.iD,
this.legalName,
this.legalNameN,
this.name,
this.nameN,
this.phoneNumber,
this.setupID,
this.distanceInKilometers,
this.isActive,
this.latitude,
this.longitude,
this.mainProjectID,
this.projectOutSA,
this.usingInDoctorApp});
HospitalsModel.fromJson(Map<String, dynamic> json) {
desciption = json['Desciption'];

@ -13,16 +13,16 @@ class RequestGetHospitalsModel {
RequestGetHospitalsModel(
{this.latitude,
this.longitude,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
this.longitude,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
RequestGetHospitalsModel.fromJson(Map<String, dynamic> json) {
latitude = json['Latitude'];

@ -135,7 +135,7 @@ class ItemsQuantitiesList {
String itemName;
String itemNameN;
int productID;
int quantity;
var quantity;
ItemsQuantitiesList(
{this.itemName, this.itemNameN, this.productID, this.quantity});

@ -23,4 +23,4 @@ class BaseService {
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
}
}
}
}

@ -16,7 +16,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// body: null);
class BaseAppClient {
post(
post(
String endPoint, {
Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,

@ -24,7 +24,7 @@ class HospitalService extends BaseService {
Future getHospitals() async {
await baseAppClient.post(GET_PROJECT,
onSuccess: (dynamic response, int statusCode) {
_hospitals.clear();
_hospitals.clear();
response['ListProject'].forEach((hospital) {
_hospitals.add(HospitalsModel.fromJson(hospital));
});

@ -1,21 +1,22 @@
import 'package:driverapp/config/config.dart';
import 'package:driverapp/core/model/orders/deliverd_order_req_model.dart';
import 'package:driverapp/core/model/orders/next_order_request_model.dart';
import 'package:driverapp/core/model/orders/pending_orders_req_model.dart';
import 'package:driverapp/core/model/orders/pending_orders_res_model.dart';
import 'package:driverapp/core/model/orders/update_order_status_request_model.dart';
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
import 'package:driverapp/core/service/base_service.dart';
import 'package:driverapp/core/model/orders/deliverd_order_req_model.dart';
import 'package:driverapp/uitl/utils.dart';
import 'package:location/location.dart';
import 'package:driverapp/core/model/orders/deliverd_order_res_model.dart';
class OrdersService extends BaseService {
List<PendingOrdersRes> _orders = List();
List<PendingOrdersRes> _nextOrdersList = List();
List<DeliverdOrderResModel> _deliverdOrderList = List();
List<DeliverdOrderModel> _deliverdOrderList = List();
List<PendingOrdersRes> get orders => _orders;
List<DeliverdOrderResModel> get deliverdOrderList => _deliverdOrderList;
List<DeliverdOrderModel> get deliverdOrderList => _deliverdOrderList;
List<PendingOrdersRes> get nextOrdersList => _nextOrdersList;
bool isOrderInserted;
@ -127,7 +128,7 @@ class OrdersService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
_deliverdOrderList.clear();
response['PatientER_Delivery_GetAllDeliverdOrderList'].forEach((order) {
_deliverdOrderList.add(DeliverdOrderResModel.fromJson(order));
_deliverdOrderList.add(DeliverdOrderModel.fromJson(order));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -81,6 +81,10 @@ class AuthenticationViewModel with ChangeNotifier {
}
logout() async {
isLoading = false;
isError = false;
isLogin = false;
await sharedPref.clear();
notifyListeners();
}
}

@ -5,7 +5,7 @@ import 'package:driverapp/core/model/orders/pending_orders_res_model.dart';
import 'package:driverapp/core/model/orders/update_order_status_request_model.dart';
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
import 'package:driverapp/core/service/orders_service.dart';
import 'package:driverapp/core/model/orders/deliverd_order_res_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
@ -14,7 +14,7 @@ class OrdersViewModel extends BaseViewModel {
List<PendingOrdersRes> get orders => _ordersService.orders;
List<DeliverdOrderResModel> get deliverdOrders =>
List<DeliverdOrderModel> get deliverdOrders =>
_ordersService.deliverdOrderList;
List<PendingOrdersRes> get nextOrdersList => _ordersService.nextOrdersList;

@ -3,6 +3,7 @@ import 'package:get_it/get_it.dart';
import 'core/service/authentication_service.dart';
import 'core/service/hospital_service.dart';
import 'core/service/orders_service.dart';
import 'core/viewModels/authentication_view_model.dart';
import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/orders_view_model.dart';
@ -17,6 +18,6 @@ void setupLocator() {
/// View Model
locator.registerFactory(() => HospitalViewModel());
// locator.registerFactory(() => AuthenticationViewModel());
locator.registerFactory(() => AuthenticationViewModel());
locator.registerFactory(() => OrdersViewModel());
}

@ -44,59 +44,57 @@ class LoginPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
FractionallySizedBox(
widthFactor: 0.80,
child: Column(
children: <Widget>[
SizedBox(
height: 40,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
child: Icon(
DriverApp.logo,
size: 70,
color: Theme.of(context).primaryColor,
),
margin: EdgeInsets.only(
right: projectViewModel.isArabic
? 0
: MediaQuery.of(context).size.width *
0.15,
left: !projectViewModel.isArabic
? 0
: MediaQuery.of(context).size.width *
0.15),
),
],
),
SizedBox(
height: 20,
),
Column(
children: <Widget>[
Text(
"Driver",
style: TextStyle(
fontSize: 50, fontWeight: FontWeight.bold),
),
Text(
"Delivery",
style: TextStyle(fontSize: 36, letterSpacing: 1),
widthFactor: 0.80,
child: Column(
children: <Widget>[
SizedBox(
height: 40,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
child: Icon(
DriverApp.logo,
size: 70,
color: Theme.of(context).primaryColor,
),
Text(
"APP",
style: TextStyle(
fontSize: 33,
letterSpacing: 33,
fontWeight: FontWeight.w400),
),
],
),
SizedBox(
height: 30,
),
margin: EdgeInsets.only(
right: projectViewModel.isArabic
? 0
: MediaQuery.of(context).size.width * 0.15,
left: !projectViewModel.isArabic
? 0
: MediaQuery.of(context).size.width * 0.15),
),
],
),
SizedBox(
height: 20,
),
Column(
children: <Widget>[
Text(
"Driver",
style: TextStyle(
fontSize: 50, fontWeight: FontWeight.bold),
),
Text(
"Delivery",
style: TextStyle(fontSize: 36, letterSpacing: 1),
),
Text(
"APP",
style: TextStyle(
fontSize: 33,
letterSpacing: 33,
fontWeight: FontWeight.w400),
),
],
),
SizedBox(
height: 30,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
@ -143,101 +141,100 @@ class LoginPage extends StatelessWidget {
// : Colors.transparent),
// ],
// ),
SizedBox(
height: 10,
),
Form(
key: loginFormKey,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Expanded(
child: Text(
TranslationBase.of(context)
.enterCredentialsMsg,
style: TextStyle(
fontSize: 13, color: Colors.grey),
),
),
SizedBox(
height: 10,
)
],
),
),
SizedBox(
height: 10,
),
Container(
child: TextFields(
hintText: TranslationBase.of(context).enterId,
validator: (value) {
if (value.isEmpty) {
return TranslationBase.of(context)
.pleaseEnterYourID;
}
return null;
},
onSaved: (value) {
loginRequest.userID =
int.parse(value.trim());
},
),
),
SizedBox(
height: 20,
),
Container(
child: TextFields(
borderRadiusValue: 6,
hintText:
TranslationBase.of(context).enterPassword,
validator: (value) {
if (value.isEmpty) {
return TranslationBase.of(context)
.pleaseEnterPassword;
}
return null;
},
onSaved: (value) {
loginRequest.password = value;
},
type: 'password',
),
),
SizedBox(
height: 25,
),
Row(
SizedBox(
height: 10,
),
Form(
key: loginFormKey,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Text(
TranslationBase.of(context).forgotPassword,
style: TextStyle(
fontSize: 14,
color: Theme.of(context).primaryColor),
Expanded(
child: Text(
TranslationBase.of(context)
.enterCredentialsMsg,
style: TextStyle(
fontSize: 13, color: Colors.grey),
),
),
SizedBox(
height: 10,
)
],
),
],
),
),
SizedBox(
height: 10,
),
Container(
child: TextFields(
hintText: TranslationBase.of(context).enterId,
validator: (value) {
if (value.isEmpty) {
return TranslationBase.of(context)
.pleaseEnterYourID;
}
return null;
},
onSaved: (value) {
loginRequest.userID = int.parse(value.trim());
},
),
),
SizedBox(
height: 20,
),
Container(
child: TextFields(
borderRadiusValue: 6,
hintText:
TranslationBase.of(context).enterPassword,
validator: (value) {
if (value.isEmpty) {
return TranslationBase.of(context)
.pleaseEnterPassword;
}
return null;
},
onSaved: (value) {
loginRequest.password = value;
},
type: 'password',
),
),
SizedBox(
height: 25,
),
//ToDo when forget page functions ready
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[
// Text(
// TranslationBase.of(context).forgotPassword,
// style: TextStyle(
// fontSize: 14,
// color: Theme.of(context).primaryColor),
// ),
// ],
// ),
],
),
],
),
),
SizedBox(
height: 20,
),
],
),
SizedBox(
height: 10,
),
),
SizedBox(
height: 20,
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.all(10),
height: MediaQuery.of(context).size.height * 0.22,
@ -263,5 +260,4 @@ class LoginPage extends StatelessWidget {
),
);
}
}

@ -1,4 +1,5 @@
import 'package:barcode_scan/platform_wrapper.dart';
import 'package:driverapp/config/config.dart';
import 'package:driverapp/config/size_config.dart';
import 'package:driverapp/core/enum/viewstate.dart';
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
@ -7,14 +8,13 @@ import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/pages/orders/deliverd_orders_page.dart';
import 'package:driverapp/pages/orders/pending_orders_page.dart';
import 'package:driverapp/pages/setting/setting.dart';
import 'package:driverapp/pages/setting/setting_page.dart';
import 'package:driverapp/uitl/app_toast.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/uitl/utils.dart';
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:driverapp/widgets/order/order_info_card.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:driverapp/widgets/others/network_base_view.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -93,23 +93,27 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column(
children: <Widget>[
InkWell(
child:CircleAvatar(
radius: 25.5,
backgroundColor: Color(0xff30B7B9),
child: CircleAvatar(
radius: 25.5,
backgroundColor: Color(0xff30B7B9),
maxRadius: 26.0,
child: Image.asset(
'assets/images/driver.png',
fit: BoxFit.contain,
),),
child: CircleAvatar(
backgroundColor: Color(0xff30B7B9),
maxRadius: 26.0,
child: Image.asset(
'assets/images/driver.png',
fit: BoxFit.contain,
),
),
),
onTap: (){
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
SettingPage(driverName:_authenticationViewModel.user.userName, driverID:_authenticationViewModel.user.userID)));
builder: (context) => SettingPage(
driverName: _authenticationViewModel
.user.userName,
driverID: _authenticationViewModel
.user.userID)));
},
),
],
@ -133,10 +137,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery.of(context).size.width * 0.44,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(colors: [
Color(0xff17AFB8),
Color(0xff49C1BC)
]),
gradient: LINEAR_GRADIENT,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -243,10 +244,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery.of(context).size.width * 0.45,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(colors: [
Color(0xff17AFB8),
Color(0xff49C1BC)
]),
gradient: LINEAR_GRADIENT,
),
child: InkWell(
onTap: () => Navigator.push(
@ -279,7 +277,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
),
Text(
'5',
'3',
style: TextStyle(
color: Colors.white,
fontSize:
@ -288,7 +286,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
Text(
TranslationBase.of(context)
.undeliveredPackages,
.deliveredPackages,
style: TextStyle(
color: Colors.white,
fontSize: MediaQuery.of(context)
@ -310,8 +308,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: 100,
height: 100,
decoration: BoxDecoration(
color: Colors.white10,
shape: BoxShape.circle),
color: Colors.white10,
shape: BoxShape.circle,
),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
@ -360,30 +359,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
_scanQrAndGetPatient(context, model);
},
child: Container(
height: MediaQuery
.of(context)
.orientation ==
Orientation.portrait
? MediaQuery
.of(context)
.size
.height * 0.18
: MediaQuery
.of(context)
.size
.height * 0.30,
width: MediaQuery
.of(context)
.size
.width * 0.50,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.18
: MediaQuery.of(context).size.height * 0.30,
width: MediaQuery.of(context).size.width * 0.50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(
colors: [
Hexcolor("#45B7AE"),
Hexcolor("#119FA9")
],
),
gradient: LINEAR_GRADIENT,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@ -396,32 +379,29 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery.of(context).size.width *
0.26,
height: MediaQuery.of(context)
.orientation ==
Orientation.portrait
.orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height *
0.14
0.14
: MediaQuery.of(context).size.height *
0.28,
0.28,
fit: BoxFit.contain,
)
],
),
Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 8.0),
child: Text(
TranslationBase
.of(context)
.scan,
TranslationBase.of(context).scan,
style: TextStyle(
fontSize: MediaQuery
.of(context)
.orientation ==
Orientation.landscape
fontSize: MediaQuery.of(context)
.orientation ==
Orientation.landscape
? SizeConfig.textMultiplier * 6.0
: SizeConfig.textMultiplier * 4.0,
color: Colors.white,
@ -432,14 +412,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
Padding(
padding: EdgeInsets.only(top: 0.0),
child: Text(
TranslationBase
.of(context)
TranslationBase.of(context)
.toAddPackageToQue,
style: TextStyle(
fontSize: MediaQuery
.of(context)
.orientation ==
Orientation.landscape
fontSize: MediaQuery.of(context)
.orientation ==
Orientation.landscape
? SizeConfig.textMultiplier * 3.0
: SizeConfig.textMultiplier * 2.0,
color: Colors.white,
@ -465,8 +443,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
children: <Widget>[
Column(
children: <Widget>[
Text(
TranslationBase.of(context).nearestDropOffs,
Text(TranslationBase.of(context).nearestDropOffs,
style: TextStyle(
fontSize: 18.0,
color: Hexcolor("#343333"),
@ -492,12 +469,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
],
),
onTap: () =>
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => OrdersListScreen()),
),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => OrdersListScreen()),
),
),
],
),
@ -514,142 +490,23 @@ class _DashboardScreenState extends State<DashboardScreen> {
? 0
: model.orders.length < 3 ? model.orders.length : 3,
itemBuilder: (BuildContext context, int index) {
model.orders.length == 0
? Text(
"There's No Orders To Deliver",
style: TextStyle(color: Colors.red),
)
: Text("");
return Padding(
padding: EdgeInsets.symmetric(horizontal: 0.2),
child: InkWell(
child: Container(
child: RoundedContainer(
showShadow: true,
raduis: 25.0,
height: MediaQuery
.of(context)
.orientation ==
Orientation.portrait
? MediaQuery
.of(context)
.size
.height * 0.120
: MediaQuery
.of(context)
.size
.height * 0.209,
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 15.0, top: 14.0),
child: Image.asset(
'assets/images/location.png',
height: MediaQuery
.of(context)
.orientation ==
Orientation.portrait
? MediaQuery
.of(context)
.size
.height *
0.06
: MediaQuery
.of(context)
.size
.height *
0.11,
width: MediaQuery
.of(context)
.orientation ==
Orientation.portrait
? MediaQuery
.of(context)
.size
.width *
0.05
: MediaQuery
.of(context)
.size
.width *
0.09,
),
)
],
),
),
if (model.orders.length != 0)
Expanded(
flex: 5,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Text(
model.orders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(
fontSize: 18.0,
color: Hexcolor("#343333"),
fontWeight: FontWeight.bold),
),
),
Text(
model.orders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0,
),
),
Expanded(
child: Text(
model.orders[index].orderID
.toString(),
style: TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
),
),
],
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: CircleContainer(
borderWidth: 1.5,
child: Text(
model.orders[index].distanceInKilometers
.toString() +
'\nK.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
),
),
],
),
),
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InformationPage(model.orders[index])));
},
),
child: OrderInfoCard(
order: model.orders[index],
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InformationPage(
model.orders[index])));
}),
);
},
),

@ -1,3 +1,4 @@
import 'package:driverapp/config/config.dart';
import 'package:driverapp/core/enum/viewstate.dart';
import 'package:driverapp/core/model/orders/next_order_request_model.dart';
import 'package:driverapp/core/model/orders/pending_orders_res_model.dart';
@ -23,13 +24,14 @@ class DeliveryConfirmedPage extends StatelessWidget {
Widget build(BuildContext context) {
return BaseView<OrdersViewModel>(
builder: (_, model, w) => AppScaffold(
isAppBarGradient: true,
isShowAppBar: true,
appBarColor: Theme.of(context).primaryColor,
arrowColor: Colors.white,
titleColor: Colors.white,
body: SafeArea(
child: Container(
color: Theme.of(context).primaryColor,
decoration: BoxDecoration(gradient: LINEAR_GRADIENT),
child: ListView(
children: <Widget>[
Stack(
@ -41,9 +43,12 @@ class DeliveryConfirmedPage extends StatelessWidget {
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 0.7,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.width * 0.7
: MediaQuery.of(context).size.width * 0.5,
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.12,
top: MediaQuery.of(context).size.width * 0.14,
),
decoration: BoxDecoration(
color: Colors.white10,
@ -61,7 +66,7 @@ class DeliveryConfirmedPage extends StatelessWidget {
0.03,
),
Text(
TranslationBase.of(context).deliveryInfo,
'Delivery Confirmed',
style: TextStyle(
color: Colors.white,
fontSize: 20,
@ -88,15 +93,21 @@ class DeliveryConfirmedPage extends StatelessWidget {
),
],
),
// Container(
// width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.width,
// ),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 1.0,
height: MediaQuery.of(context).orientation ==
Orientation.landscape
? MediaQuery.of(context).size.width * 0.6
: MediaQuery.of(context).size.width * 1.0,
margin: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.75,
top: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.width * 0.70
: MediaQuery.of(context).size.width * 0.60,
),
decoration: BoxDecoration(
color: Colors.white,
@ -105,48 +116,61 @@ class DeliveryConfirmedPage extends StatelessWidget {
topRight: Radius.circular(80)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
mainAxisAlignment: MediaQuery.of(context).orientation ==
Orientation.landscape
? MainAxisAlignment.center
: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(
bottom: MediaQuery.of(context).size.width * 0.09,
bottom: MediaQuery.of(context).size.width * 0.00,
),
child: Column(
children: <Widget>[
FlatButton.icon(
padding: EdgeInsets.all(8),
color: Colors.orangeAccent,
shape: RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(10.0),
),
label: Text(
TranslationBase.of(context).addNoteBtn,
style: TextStyle(color: Colors.white),
child: Padding(
padding: MediaQuery.of(context).orientation ==
Orientation.landscape
? EdgeInsets.only(top: 60.0)
: EdgeInsets.only(top: 30.0),
child: Column(
children: <Widget>[
FlatButton.icon(
padding: EdgeInsets.all(14.0),
color: Colors.orangeAccent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
label: Text(
TranslationBase.of(context).addNoteBtn,
style: TextStyle(
color: Colors.white, fontSize: 20.0),
),
icon: Icon(
Icons.mode_edit,
color: Colors.white,
),
onPressed: () {},
),
icon: Icon(
Icons.mode_edit,
color: Colors.white,
SizedBox(
height: MediaQuery.of(context).size.width *
0.00, //20,
),
onPressed: () {},
),
SizedBox(
height: MediaQuery.of(context).size.width *
0.02, //20,
),
Container(
margin: EdgeInsets.all(10),
child: SecondaryButton(
label: TranslationBase.of(context)
.nextDelivery,
loading: model.state == ViewState.BusyLocal,
onTap: () {
getNextOrder(context, model);
},
Padding(
padding: const EdgeInsets.only(top: 30.0),
child: Container(
margin: EdgeInsets.all(10),
child: SecondaryButton(
label: TranslationBase.of(context)
.nextDelivery,
loading:
model.state == ViewState.BusyLocal,
onTap: () {
getNextOrder(context, model);
},
),
),
),
),
],
],
),
),
),
],
@ -154,7 +178,10 @@ class DeliveryConfirmedPage extends StatelessWidget {
),
Container(
margin: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.6,
top: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.width * 0.6
: MediaQuery.of(context).size.width * 0.4,
),
child: CustomerBriefCard(
itemId: item.orderID,

File diff suppressed because one or more lines are too long

@ -8,10 +8,8 @@ class ReplayPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
body: Center(
child: InkWell(onTap: () {},
child: Texts('Replay Page')),
child: InkWell(onTap: () {}, child: Texts('Replay Page')),
),
);
}
}

@ -1,11 +1,9 @@
import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:driverapp/widgets/order/order_info_card.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:driverapp/widgets/others/network_base_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../base/base_view.dart';
@ -29,123 +27,32 @@ class _DeliverdOrdersPageState extends State<DeliverdOrdersPage> {
SizedBox(
height: 20,
),
Expanded(
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: model.deliverdOrders == null
? 0
: model.deliverdOrders.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
raduis: 25.0,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.120
: MediaQuery.of(context).size.height * 0.209,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding:
EdgeInsets.only(left: 15.0, top: 14.0),
child: Image.asset(
'assets/images/location.png',
height: MediaQuery.of(context)
.orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height *
0.06
: MediaQuery.of(context).size.height *
0.11,
width: MediaQuery.of(context)
.orientation ==
Orientation.portrait
? MediaQuery.of(context).size.width *
0.05
: MediaQuery.of(context).size.width *
0.09,
),
)
],
),
),
if (model.orders.length != 0)
Expanded(
flex: 5,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Text(
model.deliverdOrders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(
fontSize: 18.0,
color: Hexcolor("#343333"),
fontWeight: FontWeight.bold),
),
),
Text(
model.deliverdOrders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0,
),
),
Expanded(
child: Text(
model.deliverdOrders[index].orderID
.toString(),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
),
),
],
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: CircleContainer(
child: Text(
model.deliverdOrders[index]
.distanceInKilometers
.toString() +
'\nK.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
),
),
],
),
model.deliverdOrders.length == 0
? Text("There's No Orders To Deliver",
style: TextStyle(color: Colors.red))
: Text(""),
NetworkBaseView(
baseViewModel: model,
child: Expanded(
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: model.deliverdOrders == null
? 0
: model.deliverdOrders.length,
itemBuilder: (BuildContext context, int index) {
model.deliverdOrders.length == 0
? Text("There's No Orders To Deliver",
style: TextStyle(color: Colors.red))
: Text("");
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: OrderInfoCard(
order: model.deliverdOrders[index],
),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// InformationPage(model.orders[index])));
// },
),
);
},
);
},
),
),
),
],

@ -1,12 +1,10 @@
import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:driverapp/widgets/order/order_info_card.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../base/base_view.dart';
@ -30,6 +28,9 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
SizedBox(
height: 20,
),
model.orders.length == 0
? Text("There's No Orders To Deliver")
: Text(""),
Expanded(
child: ListView.builder(
shrinkWrap: true,
@ -38,101 +39,8 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
raduis: 25.0,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.120
: MediaQuery.of(context).size.height * 0.209,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding:
EdgeInsets.only(left: 15.0, top: 14.0),
child: Image.asset(
'assets/images/location.png',
height: MediaQuery.of(context)
.orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height *
0.06
: MediaQuery.of(context).size.height *
0.11,
width: MediaQuery.of(context)
.orientation ==
Orientation.portrait
? MediaQuery.of(context).size.width *
0.05
: MediaQuery.of(context).size.width *
0.09,
),
)
],
),
),
if (model.orders.length != 0)
Expanded(
flex: 5,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Text(
model.orders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(
fontSize: 18.0,
color: Hexcolor("#343333"),
fontWeight: FontWeight.bold),
),
),
Text(
model.orders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0,
),
),
Expanded(
child: Text(
model.orders[index].orderID.toString(),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
),
),
],
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: CircleContainer(
child: Text(
model.orders[index].distanceInKilometers
.toString() +
'\nK.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
),
),
],
),
),
child: OrderInfoCard(
order: model.orders[index],
onTap: () {
Navigator.push(
context,

@ -1,11 +1,12 @@
import 'package:driverapp/core/viewModels/authentication_view_model.dart';
import 'package:driverapp/pages/authentication/login_page.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../root_page.dart';
class SettingPage extends StatelessWidget {
final String driverName; //_authenticationViewModel.user.userName
final int driverID;
@ -39,38 +40,40 @@ class SettingPage extends StatelessWidget {
maxRadius: 200.0,
child: Image.asset(
'assets/images/driver.png',
height: MediaQuery.of(context).size.width * 1 ,
height: MediaQuery.of(context).size.width * 1,
width: MediaQuery.of(context).size.width * 1,
fit: BoxFit.contain,
),
),
),
),
SizedBox(height: MediaQuery.of(context).size.width *0.05,),
SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
Container(
child: Text(
driverName,
style: TextStyle(
fontSize: 40,
fontWeight: FontWeight.w600,
color: Colors.white
),
color: Colors.white),
),
),
SizedBox(height: MediaQuery.of(context).size.width *0.05,),
SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
Container(
child: Text(
'ID: ${driverID.toString()}',
style: TextStyle(
fontSize: 20,
color: Colors.white
),
style: TextStyle(fontSize: 20, color: Colors.white),
),
),
],
),
),
SizedBox(height: MediaQuery.of(context).size.width *0.1,),
SizedBox(
height: MediaQuery.of(context).size.width * 0.1,
),
Container(
margin: EdgeInsets.only(left: 35),
child: Column(
@ -79,11 +82,9 @@ class SettingPage extends StatelessWidget {
InkWell(
onTap: () async {
await _authenticationViewModel.logout();
Navigator.push(
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => LoginPage()
),
MaterialPageRoute(builder: (context) => RootPage()),
);
},
child: Column(
@ -98,23 +99,25 @@ class SettingPage extends StatelessWidget {
size: 40,
color: Colors.white,
),
SizedBox(width: MediaQuery.of(context).size.width *0.05,),
SizedBox(
width: MediaQuery.of(context).size.width * 0.05,
),
Text(
TranslationBase.of(context).logout,
style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.white,
fontSize: 18
),
fontSize: 18),
),
],
),
),
SizedBox(
height: MediaQuery.of(context).size.width *0.05,
height: MediaQuery.of(context).size.width * 0.05,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30),
margin:
EdgeInsetsDirectional.only(start: 0, end: 30),
height: 1.0,
color: Colors.white,
),
@ -123,7 +126,9 @@ class SettingPage extends StatelessWidget {
],
),
),
SizedBox(height: MediaQuery.of(context).size.width*0.05,),
SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -145,8 +150,7 @@ class SettingPage extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.white,
fontSize: 18
),
fontSize: 18),
),
],
),
@ -155,13 +159,16 @@ class SettingPage extends StatelessWidget {
height: 10.0,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30),
margin:
EdgeInsetsDirectional.only(start: 0, end: 30),
height: 1.0,
color: Colors.white,
),
),
),
SizedBox(height: MediaQuery.of(context).size.width*0.05,),
SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
],
),
),
@ -173,4 +180,4 @@ class SettingPage extends StatelessWidget {
),
);
}
}
}

@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
class AppToast {
/// show long toast message
/// [message] to show for user
/// [timeInSeconds] how many second the toast will appear to the user

@ -1,5 +1,4 @@
class DateUtil {
/// convert String To Date function
/// [date] String we want to convert
static DateTime convertStringToDate(String date) {
@ -91,7 +90,6 @@ class DateUtil {
}
}
/// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted
static String getMonthDayYearDateFormatted(DateTime dateTime) {
@ -105,7 +103,6 @@ class DateUtil {
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted
static String getDayMonthYearDateFormatted(DateTime dateTime) {
@ -120,7 +117,6 @@ class DateUtil {
return "";
}
static String convertStringToHours(String date) {
DateTime stringDate = convertStringToDate(date);
DateTime dateTime = DateTime.parse(stringDate.toString());
@ -128,5 +124,4 @@ class DateUtil {
hours = hours.substring(10, 16);
return hours;
}
}

@ -39,13 +39,18 @@ class TranslationBase {
String get logout => localizedValues['logout'][locale.languageCode];
String get booking => localizedValues['booking'][locale.languageCode];
String get enterId => localizedValues['enterId'][locale.languageCode];
String get pleaseEnterYourID =>
localizedValues['pleaseEnterYourID'][locale.languageCode];
String get enterPassword =>
localizedValues['enterPassword'][locale.languageCode];
String get pleaseEnterPassword =>
localizedValues['pleaseEnterPassword'][locale.languageCode];
String get english => localizedValues['english'][locale.languageCode];
String get arabic => localizedValues['arabic'][locale.languageCode];
@ -55,6 +60,7 @@ class TranslationBase {
String get forgotPassword =>
localizedValues['forgotPassword'][locale.languageCode];
String get login => localizedValues['login'][locale.languageCode];
String get haveGreatDay =>
@ -103,8 +109,10 @@ class TranslationBase {
String get confirmationSent =>
localizedValues['confirmationSent'][locale.languageCode];
String get yourDeliveryQue =>
localizedValues['yourDeliveryQue'][locale.languageCode];
String get toAddPackageToQue =>
localizedValues['toAddPackageToQue'][locale.languageCode];

@ -49,4 +49,16 @@ class Utils {
LocationData currentLocation = await location.getLocation();
return currentLocation;
}
static formatStringToPascalCase(String name) {
List<String> names = name.split(" ");
List<String> formattedNamesList = [];
names.forEach((name) {
name = name.toLowerCase();
name = name != "" ? name[0].toUpperCase() + name.substring(1) : "";
formattedNamesList.add(name);
});
return formattedNamesList.join(' ');
}
}

@ -103,7 +103,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
: 19),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: Hexcolor('#515b5d'),
color: Hexcolor('#515b5d'),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(

@ -10,13 +10,11 @@ enum MINI_BUTTON { Secondary, Primary }
/// [variant] determine the color button
class MiniButton extends StatefulWidget {
MiniButton(
{
this.label: "",
{this.label: "",
this.icon,
this.onTap,
this.variant: MINI_BUTTON.Secondary});
final String label;
final IconData icon;
final VoidCallback onTap;

@ -1,3 +1,4 @@
import 'package:driverapp/config/config.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -169,15 +170,10 @@ class _SecondaryButtonState extends State<SecondaryButton>
left: 0,
bottom: 0,
child: Container(
width: MediaQuery
.of(context)
.size
.width,
width: MediaQuery.of(context).size.width,
height: 100,
decoration: BoxDecoration(
color: Theme
.of(context)
.disabledColor,
color: Theme.of(context).disabledColor,
),
),
),
@ -191,14 +187,8 @@ class _SecondaryButtonState extends State<SecondaryButton>
height: MediaQuery.of(context).size.width * 2.2,
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: widget.color != null
? null
: LinearGradient(
colors: [
Hexcolor("#45B7AE"),
Hexcolor("#119FA9")
],
),
gradient:
widget.color != null ? null : LINEAR_GRADIENT,
color: widget.color != null
? widget.color
: Hexcolor("#000000"),
@ -210,10 +200,10 @@ class _SecondaryButtonState extends State<SecondaryButton>
padding: widget.iconOnly
? EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0)
: EdgeInsets.only(
top: widget.small ? 8.0 : 16.0,
bottom: widget.small ? 6.0 : 16.0,
left: 18.0,
right: 18.0),
top: widget.small ? 8.0 : 16.0,
bottom: widget.small ? 6.0 : 16.0,
left: 18.0,
right: 18.0),
child: Stack(
children: <Widget>[
Positioned(
@ -232,7 +222,8 @@ class _SecondaryButtonState extends State<SecondaryButton>
width: 19.0,
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
valueColor:
AlwaysStoppedAnimation<Color>(
Colors.grey[300],
),
),

@ -6,7 +6,7 @@ class CircleContainer extends StatelessWidget {
{this.child,
this.color = Colors.white,
this.borderColor,
this.borderWidth = 1.5,
this.borderWidth = 2,
this.onTap});
final Widget child;

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
/// Flexible container widget
/// [widthFactor] If non-null, the fraction of the incoming width given to the child.
/// If non-null, the child is given a tight width constraint that is the max

@ -208,8 +208,7 @@ class _TextsState extends State<Texts> {
)
: TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null,
color:
widget.color ?? Colors.black,
color: widget.color ?? Colors.black,
fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing:
widget.variant == "overline" ? 1.5 : null,

@ -1,6 +1,8 @@
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:flutter/material.dart';
import 'package:driverapp/config/size_config.dart';
import 'package:driverapp/uitl/utils.dart';
import 'package:driverapp/widgets/delivery/distance_in_kilometers.dart';
import 'package:flutter/material.dart';
import '../../uitl/date_uitl.dart';
import '../../uitl/translations_delegate_base.dart';
@ -34,144 +36,147 @@ class CustomerBriefCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Container(
width: MediaQuery.of(context).orientation == Orientation.landscape
? SizeConfig.widthMultiplier * 125.0
: SizeConfig.widthMultiplier * 90.0,
height: 290,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
bottomRight: Radius.circular(30),
bottomLeft: Radius.circular(30)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3),
),
],
),
child: Padding(
padding: EdgeInsets.only(bottom: 0.0),
child: Container(
padding: EdgeInsets.only(left: 30, top: 20, right: 30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Text(
'ID: ${itemId}',
style: TextStyle(
color: Color(0xFFADACAD),
fontWeight: FontWeight.w800,
fontSize: 17.5),
width: MediaQuery.of(context).orientation == Orientation.landscape
? SizeConfig.widthMultiplier * 125.0
: SizeConfig.widthMultiplier * 90.0,
height: 290,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
bottomRight: Radius.circular(30),
bottomLeft: Radius.circular(30)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3),
),
],
),
child: Container(
padding: EdgeInsets.only(left: 30, top: 20, right: 30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Text(
'ID: ${itemId}',
style: TextStyle(
color: Color(0xff636363),
fontWeight: FontWeight.w500,
fontSize: 17.5),
),
),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(8.0),
child: CircleContainer(
child: Text(
'0 K.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
Expanded(
child: Padding(
padding: EdgeInsets.all(8.0),
child: DistanceInKilometers(
distanceInKilometers: 0.0,
),
),
),
],
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.02,
),
Text(
Utils.formatStringToPascalCase(
'${customerFirstName} ${customerLastName}'),
style: TextStyle(
color: Color(0xff343333),
fontWeight: FontWeight.bold,
fontSize: 20.0,
),
],
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.02,
),
Text(
'${customerFirstName} ${customerLastName}',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.019,
),
Text(
mobileNo,
style: TextStyle(color: Color(0xFF50BDC5)),
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.005,
),
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.019,
),
Text(
mobileNo,
style: TextStyle(
color: Color(0xff14A0A9), fontWeight: FontWeight.w400),
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.005,
),
// Text(
// 'Olaya street, behind KFC resturant, next to kingdom towers 2nd floor ofice 277',
// style: TextStyle(
// color: Color(0xFF464748), fontWeight: FontWeight.w600),
// ),
SizedBox(
height: 10,
),
SizedBox(
height: 10.0,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 1.0, end: 1.0),
height: 1.0,
color: Colors.grey,
SizedBox(
height: 10,
),
SizedBox(
height: 10.0,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 1.0, end: 1.0),
height: 1.0,
color: Colors.grey,
),
),
),
),
SizedBox(
height: 20,
),
Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context).payment,
textAlign: TextAlign.start,
),
),
SizedBox(
width: 170,
),
Expanded(
child: Text(
totalPayment.toString(),
textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w400),
SizedBox(
height: 20,
),
Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context).payment,
textAlign: TextAlign.start,
),
),
),
],
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.03,
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).delivryTime,
textAlign: TextAlign.start,
SizedBox(
width: 170,
),
),
Expanded(
child: Text(
'${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}',
Expanded(
child: Text(
totalPayment.toString(),
textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w400)),
),
],
)
],
),
],
style: TextStyle(fontWeight: FontWeight.w400),
),
),
],
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.03,
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).delivryTime,
textAlign: TextAlign.start,
),
),
Expanded(
child: Text(
'${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}',
textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w400)),
),
],
)
],
),
],
),
),
),
),

@ -8,6 +8,7 @@ class DeliveryInfoButton extends StatelessWidget {
DeliveryInfoButton(
{this.btnColor, this.btnIcon, this.btnFunction, this.btnName});
@override
Widget build(BuildContext context) {
print(btnColor);

@ -0,0 +1,44 @@
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:flutter/material.dart';
class DistanceInKilometers extends StatelessWidget {
const DistanceInKilometers({
@required this.distanceInKilometers,
Key key,
}) : super(key: key);
final dynamic distanceInKilometers;
@override
Widget build(BuildContext context) {
return CircleContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
distanceInKilometers.toString(),
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
Text(
'K.m',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
Text(
'away',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
],
),
);
}
}

@ -27,4 +27,4 @@ class packageContent extends StatelessWidget {
],
);
}
}
}

@ -6,8 +6,6 @@ import 'package:flutter/material.dart';
import '../../config/size_config.dart';
import 'drawer_item_widget.dart';
class AppDrawer extends StatefulWidget {
@override
_AppDrawerState createState() => _AppDrawerState();

@ -0,0 +1,100 @@
import 'package:driverapp/uitl/utils.dart';
import 'package:driverapp/widgets/delivery/distance_in_kilometers.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class OrderInfoCard extends StatelessWidget {
const OrderInfoCard({Key key, this.order, this.onTap}) : super(key: key);
final dynamic order;
final Function onTap;
@override
Widget build(BuildContext context) {
return InkWell(
child: Container(
child: RoundedContainer(
showShadow: true,
raduis: 25.0,
height: MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.120
: MediaQuery.of(context).size.height * 0.209,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 15.0, top: 14.0),
child: Image.asset(
'assets/images/location.png',
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.06
: MediaQuery.of(context).size.height * 0.11,
width: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.width * 0.05
: MediaQuery.of(context).size.width * 0.09,
),
)
],
),
),
Expanded(
flex: 5,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Text(
Utils.formatStringToPascalCase(
order.firstName + ' ' + order.lastName),
style: TextStyle(
fontSize: 18.0,
color: Hexcolor("#343333"),
fontWeight: FontWeight.bold),
),
),
Text(
order.mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0,
),
),
Expanded(
child: Text(
order.orderID.toString(),
style: TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
),
),
],
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: DistanceInKilometers(
distanceInKilometers: order.distanceInKilometers,
),
),
],
),
),
),
onTap: () {
onTap();
},
);
}
}

@ -1,7 +1,9 @@
import 'package:driverapp/config/config.dart';
import 'package:driverapp/core/viewModels/base_view_model.dart';
import 'package:driverapp/uitl/utils.dart';
import 'package:driverapp/widgets/progress_indicator/app_loader_widget.dart';
import 'package:flutter/material.dart';
import 'package:gradient_app_bar/gradient_app_bar.dart';
import 'arrow_back.dart';
import 'network_base_view.dart';
@ -16,6 +18,7 @@ class AppScaffold extends StatelessWidget {
final Color titleColor;
final Color arrowColor;
final Color appBarColor;
final bool isAppBarGradient;
AppScaffold(
{@required this.body,
@ -27,18 +30,18 @@ class AppScaffold extends StatelessWidget {
this.titleColor,
this.arrowColor,
this.appBarColor,
});
this.isAppBarGradient = false});
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
return SafeArea(
// top: false,
// bottom: false,
top: false,
bottom: false,
child: Scaffold(
backgroundColor:
appBarColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar
appBar: isShowAppBar && !isAppBarGradient
? AppBar(
elevation: 0,
backgroundColor: Theme.of(context).appBarTheme.color,
@ -46,14 +49,16 @@ class AppScaffold extends StatelessWidget {
headline6: TextStyle(
color: titleColor ?? Colors.white,
fontWeight: FontWeight.bold),
),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack(arrowColor: arrowColor,);
},
),
centerTitle: true,
),
title: Text(Utils.formatStringToPascalCase(appBarTitle)),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack(
arrowColor: arrowColor,
);
},
),
centerTitle: true,
// actions: <Widget>[
// IconButton(
// icon: Icon(FontAwesomeIcons.home),
@ -63,14 +68,30 @@ class AppScaffold extends StatelessWidget {
// },
// ),
// ],
)
: null,
)
: isShowAppBar && isAppBarGradient
? GradientAppBar(
gradient: LINEAR_GRADIENT,
title: Text(
Utils.formatStringToPascalCase(appBarTitle),
style: TextStyle(color: Colors.white),
),
centerTitle: true,
leading: Builder(
builder: (BuildContext context) {
return ArrowBack(
arrowColor: arrowColor,
);
},
))
: null,
body: baseViewModel != null
? NetworkBaseView(
child: buildBodyWidget(),
baseViewModel: baseViewModel,
)
: buildBodyWidget(), bottomSheet: bottomSheet,
child: buildBodyWidget(),
baseViewModel: baseViewModel,
)
: buildBodyWidget(),
bottomSheet: bottomSheet,
),
);
}

@ -1,22 +1,19 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
class CloseBack extends StatelessWidget{
class CloseBack extends StatelessWidget {
final Function onTap;
CloseBack({Key key,
this.onTap
}) : super(key: key);
CloseBack({Key key, this.onTap}) : super(key: key);
@override
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() {
onTap!=null ? onTap() : Navigator.pop(context);
onTap != null ? onTap() : Navigator.pop(context);
}, context),
child: Icon(EvaIcons.close, color: Color.fromRGBO(78, 62, 253, 1.0)),
);
}
}
}

@ -41,7 +41,6 @@ class RoundedContainer extends StatefulWidget {
_RoundedContainerState createState() => _RoundedContainerState();
}
class _RoundedContainerState extends State<RoundedContainer> {
@override
Widget build(BuildContext context) {
@ -49,40 +48,38 @@ class _RoundedContainerState extends State<RoundedContainer> {
width: widget.width,
height: widget.height,
margin: EdgeInsets.all(widget.margin),
decoration:
BoxDecoration(
color: Theme
.of(context)
.primaryColor,
border: widget.showBorder == true ? Border.all(
color: widget.borderColor, width: widget.borderWidth) : null,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
border: widget.showBorder == true
? Border.all(
color: widget.borderColor, width: widget.borderWidth)
: null,
borderRadius: widget.customCornerRaduis
? BorderRadius.only(
topLeft: Radius.circular(widget.topLeft),
topRight: Radius.circular(widget.topRight),
bottomRight: Radius.circular(widget.bottomRight),
bottomLeft: Radius.circular(widget.bottomLeft))
topLeft: Radius.circular(widget.topLeft),
topRight: Radius.circular(widget.topRight),
bottomRight: Radius.circular(widget.bottomRight),
bottomLeft: Radius.circular(widget.bottomLeft))
: BorderRadius.circular(widget.raduis),
boxShadow: widget.showShadow ? [
BoxShadow(
color: Hexcolor("#DBE5E6"),
spreadRadius: 15,
blurRadius: 15,
offset: Offset(0, 7), // changes position of shadow
),
] : [])
,
boxShadow: widget.showShadow
? [
BoxShadow(
color: Hexcolor("#DBE5E6"),
spreadRadius: 15,
blurRadius: 15,
offset: Offset(0, 7), // changes position of shadow
),
]
: []),
child: Card(
margin: EdgeInsets.all(0),
shape: RoundedRectangleBorder(
borderRadius: widget.customCornerRaduis
? BorderRadius.only(
topLeft: Radius.circular(widget.topLeft),
topRight: Radius.circular(widget.topRight),
bottomRight: Radius.circular(widget.bottomRight),
bottomLeft: Radius.circular(widget.bottomLeft))
topLeft: Radius.circular(widget.topLeft),
topRight: Radius.circular(widget.topRight),
bottomRight: Radius.circular(widget.bottomRight),
bottomLeft: Radius.circular(widget.bottomLeft))
: BorderRadius.circular(widget.raduis),
),
color: widget.backgroundColor,

@ -4,29 +4,26 @@ import 'package:flutter/material.dart';
/// [page]
class FadePage extends PageRouteBuilder {
final Widget page;
FadePage({this.page})
: super(
opaque: false,
fullscreenDialog: true,
barrierDismissible: true,
barrierColor: Colors.black.withOpacity(0.8),
pageBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
) =>
page,
transitionDuration: Duration(milliseconds: 300),
transitionsBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
return FadeTransition(
opacity: animation,
child: child
);
}
);
}
: super(
opaque: false,
fullscreenDialog: true,
barrierDismissible: true,
barrierColor: Colors.black.withOpacity(0.8),
pageBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
) =>
page,
transitionDuration: Duration(milliseconds: 300),
transitionsBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
return FadeTransition(opacity: animation, child: child);
});
}

@ -72,6 +72,8 @@ dependencies:
# location
location: ^3.0.2
#gradient
gradient_app_bar: ^0.1.3
@ -108,6 +110,6 @@ flutter:
- family: Metropolis
fonts:
- asset: assets/fonts/Metropolis/Metropolis-Regular.otf
- asset: assets/fonts/Metropolis/Metropolis-Bold.otf
- asset: assets/fonts/Metropolis/Metropolis-Light.otf
- asset: assets/fonts/Metropolis/Metropolis-Regular.otf
- asset: assets/fonts/Metropolis/Metropolis-Bold.otf
- asset: assets/fonts/Metropolis/Metropolis-Light.otf

@ -5,11 +5,10 @@
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:driverapp/main.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:driverapp/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.

Loading…
Cancel
Save