Merge branch 'development' into 'master'

Development

See merge request Cloud_Solution/driver-app!98
merge-requests/101/head
Mohammad Aljammal 5 years ago
commit da5c95f33d

@ -27,7 +27,8 @@ class AppGlobal {
const LINEAR_GRADIENT = LinearGradient(
colors: [
Color(0xff49C1BC),
Color(0xff17AFB8),
Color(0xff45B7AE),
Color(0xff119FA9),
],
// stops: [0.0, 1.0],
);

File diff suppressed because one or more lines are too long

@ -1,4 +1,5 @@
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/order/order_info_card.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
@ -35,7 +36,16 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: OrderInfoCard(order: model.orders[index]),
child: OrderInfoCard(
order: model.orders[index],
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InformationPage(model.orders[index])));
},
),
);
},
),

@ -50,7 +50,7 @@ class Utils {
return currentLocation;
}
static formatName(String name) {
static formatStringToPascalCase(String name) {
List<String> names = name.split(" ");
List<String> formattedNamesList = [];
names.forEach((name) {

@ -1,4 +1,5 @@
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';
@ -68,8 +69,8 @@ class CustomerBriefCard extends StatelessWidget {
child: Text(
'ID: ${itemId}',
style: TextStyle(
color: Color(0xFFADACAD),
fontWeight: FontWeight.w800,
color: Color(0xff636363),
fontWeight: FontWeight.w500,
fontSize: 17.5),
),
),
@ -87,15 +88,22 @@ class CustomerBriefCard extends StatelessWidget {
height: MediaQuery.of(context).size.width * 0.02,
),
Text(
'${customerFirstName} ${customerLastName}',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
Utils.formatStringToPascalCase(
'${customerFirstName} ${customerLastName}'),
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
color: Color(0xff343333),
fontFamily: 'Metropolis',
),
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.019,
),
Text(
mobileNo,
style: TextStyle(color: Color(0xFF50BDC5)),
style: TextStyle(
color: Color(0xff14A0A9), fontWeight: FontWeight.w400),
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.005,

@ -54,7 +54,7 @@ class OrderInfoCard extends StatelessWidget {
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Text(
Utils.formatName(
Utils.formatStringToPascalCase(
order.firstName + ' ' + order.lastName),
style: TextStyle(
fontSize: 18.0,

@ -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,46 +18,50 @@ class AppScaffold extends StatelessWidget {
final Color titleColor;
final Color arrowColor;
final Color appBarColor;
final bool isAppBarGradient;
AppScaffold({
@required this.body,
this.appBarTitle = '',
this.isLoading = false,
this.isShowAppBar = false,
this.baseViewModel,
this.bottomSheet,
this.titleColor,
this.arrowColor,
this.appBarColor,
});
AppScaffold(
{@required this.body,
this.appBarTitle = '',
this.isLoading = false,
this.isShowAppBar = false,
this.baseViewModel,
this.bottomSheet,
this.titleColor,
this.arrowColor,
this.appBarColor,
this.isAppBarGradient});
@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,
textTheme: TextTheme(
headline6: TextStyle(
color: titleColor ?? Colors.white,
fontWeight: FontWeight.bold),
),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack(
arrowColor: arrowColor,
);
},
),
centerTitle: true,
elevation: 0,
backgroundColor: Theme
.of(context)
.appBarTheme
.color,
textTheme: TextTheme(
headline6: TextStyle(
color: titleColor ?? Colors.white,
fontWeight: FontWeight.bold),
),
title: Text(Utils.formatStringToPascalCase(appBarTitle)),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack(
arrowColor: arrowColor,
);
},
),
centerTitle: true,
// actions: <Widget>[
// IconButton(
// icon: Icon(FontAwesomeIcons.home),
@ -65,13 +71,28 @@ 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,
)
child: buildBodyWidget(),
baseViewModel: baseViewModel,
)
: buildBodyWidget(),
bottomSheet: bottomSheet,
),

@ -72,6 +72,8 @@ dependencies:
# location
location: ^3.0.2
#gradient
gradient_app_bar: ^0.1.3

Loading…
Cancel
Save