Merge branch 'DistanceInKilometers' into 'development'

Distance in kilometers

See merge request Cloud_Solution/driver-app!91
merge-requests/90/head
Mohammad Aljammal 6 years ago
commit 027ad23c8e

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

@ -1,4 +1,5 @@
import 'package:barcode_scan/platform_wrapper.dart'; import 'package:barcode_scan/platform_wrapper.dart';
import 'package:driverapp/config/config.dart';
import 'package:driverapp/config/size_config.dart'; import 'package:driverapp/config/size_config.dart';
import 'package:driverapp/core/enum/viewstate.dart'; import 'package:driverapp/core/enum/viewstate.dart';
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart'; import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
@ -137,10 +138,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery.of(context).size.width * 0.44, width: MediaQuery.of(context).size.width * 0.44,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(colors: [ gradient: LINEAR_GRADIENT,
Color(0xff17AFB8),
Color(0xff49C1BC)
]),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -247,10 +245,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(colors: [ gradient: LINEAR_GRADIENT,
Color(0xff17AFB8),
Color(0xff49C1BC)
]),
), ),
child: InkWell( child: InkWell(
onTap: () => Navigator.push( onTap: () => Navigator.push(
@ -314,8 +309,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: 100, width: 100,
height: 100, height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white10, color: Colors.white10,
shape: BoxShape.circle), shape: BoxShape.circle,
),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
@ -371,12 +367,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery.of(context).size.width * 0.50, width: MediaQuery.of(context).size.width * 0.50,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient( gradient: LINEAR_GRADIENT,
colors: [
Hexcolor("#45B7AE"),
Hexcolor("#119FA9")
],
),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,

@ -49,4 +49,6 @@ class Utils {
LocationData currentLocation = await location.getLocation(); LocationData currentLocation = await location.getLocation();
return currentLocation; return currentLocation;
} }
static nameFormat(String) {}
} }

@ -1,3 +1,4 @@
import 'package:driverapp/config/config.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -13,19 +14,18 @@ import 'package:hexcolor/hexcolor.dart';
/// [borderColor] the button border color /// [borderColor] the button border color
/// [noBorderRadius] remove border radius /// [noBorderRadius] remove border radius
class SecondaryButton extends StatefulWidget { class SecondaryButton extends StatefulWidget {
SecondaryButton( SecondaryButton({Key key,
{Key key, this.label = "",
this.label = "", this.icon,
this.icon, this.iconOnly = false,
this.iconOnly = false, this.color,
this.color, this.textColor,
this.textColor, this.onTap,
this.onTap, this.loading: false,
this.loading: false, this.small = false,
this.small = false, this.disabled = false,
this.disabled = false, this.borderColor,
this.borderColor, this.noBorderRadius = false})
this.noBorderRadius = false})
: super(key: key); : super(key: key);
final String label; final String label;
@ -148,7 +148,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
decoration: BoxDecoration( decoration: BoxDecoration(
border: widget.borderColor != null border: widget.borderColor != null
? Border.all( ? Border.all(
color: widget.borderColor.withOpacity(0.1), width: 2.0) color: widget.borderColor.withOpacity(0.1), width: 2.0)
: null, : null,
borderRadius: BorderRadius.all(Radius.circular(100.0)), borderRadius: BorderRadius.all(Radius.circular(100.0)),
boxShadow: [ boxShadow: [
@ -191,14 +191,8 @@ class _SecondaryButtonState extends State<SecondaryButton>
height: MediaQuery.of(context).size.width * 2.2, height: MediaQuery.of(context).size.width * 2.2,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
gradient: widget.color != null gradient:
? null widget.color != null ? null : LINEAR_GRADIENT,
: LinearGradient(
colors: [
Hexcolor("#45B7AE"),
Hexcolor("#119FA9")
],
),
color: widget.color != null color: widget.color != null
? widget.color ? widget.color
: Hexcolor("#000000"), : Hexcolor("#000000"),
@ -226,29 +220,29 @@ class _SecondaryButtonState extends State<SecondaryButton>
children: <Widget>[ children: <Widget>[
widget.loading widget.loading
? Padding( ? Padding(
padding: EdgeInsets.all(2.6), padding: EdgeInsets.all(2.6),
child: SizedBox( child: SizedBox(
height: 19.0, height: 19.0,
width: 19.0, width: 19.0,
child: CircularProgressIndicator( child: CircularProgressIndicator(
backgroundColor: Colors.white, backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
Colors.grey[300], Colors.grey[300],
), ),
), ),
), ),
) )
: Padding( : Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
bottom: widget.small ? 4.0 : 2.0), bottom: widget.small ? 4.0 : 2.0),
child: Text(widget.label, child: Text(widget.label,
style: TextStyle( style: TextStyle(
color: widget.textColor != null color: widget.textColor != null
? widget.textColor ? widget.textColor
: Colors.white, : Colors.white,
fontSize: 17.0, fontSize: 17.0,
fontFamily: "WorkSans")), fontFamily: "WorkSans")),
) )
], ],
) )
], ],

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

Loading…
Cancel
Save