Improvement on the Ui

logut
Elham Rababah 6 years ago
parent 8c36996cb0
commit 7f15522f67

@ -58,29 +58,18 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': 'رسالة نصية' 'ar': 'رسالة نصية'
}, },
'packageContent': { 'packageContent': {
'en': 'Package Content', 'en': 'Package Content', 'ar': 'محتوى الحزمة'},
'ar': 'محتوى الحزمة' 'payment': {'en': 'Payment', 'ar': 'دفع'},
}, 'delivryTime': {'en': 'Delivery Time', 'ar': 'وقت التوصيل'},
'payment': { 'clientReached': {'en': 'Client Reached', 'ar': 'الوصول الى العميل'},
'en': 'Payment', 'addNoteBtn': {'en': 'Add Note', 'ar': 'اضافة ملاحظة'},
'ar': 'دفع' 'nextDelivery': {'en': 'Next Delivery', 'ar': 'الشحنة التالية'},
}, 'delivered': {'en': 'Delivered', 'ar': 'وصل'},
'delivryTime': { 'deliveredAccepted': {'en': 'Delivered/Accepted', 'ar': 'تم التوصيل/مقبول'},
'en': 'Delivery Time', 'deliveredRejected': {'en': 'Delivered/Rejected', 'ar': 'تم التوصيل/مرفوض'},
'ar': 'وقت التوصيل' 'canceled': {'en': 'Canceled', 'ar': 'الغى'},
}, 'selectAction': {'en': 'Select Action', 'ar': 'الرجاء الاختيار'},
'clientReached': { 'youHaveSelected': {'en': 'You have selected:', 'ar': 'لقد قمت باختيار:'},
'en': 'Client Reached', 'confirm': {'en': 'Confirm', 'ar': 'تأكيد'},
'ar': 'الوصول الى العميل' 'areYouSure': {'en': 'Are you sure?', 'ar': 'هل أنت واثق؟'},
},
'addNoteBtn': {
'en': 'Add Note',
'ar': 'اضافة ملاحظة'
},
'nextDelivery': {
'en': 'Next Delivery',
'ar': 'الشحنة التالية'
}
}; };

@ -10,9 +10,9 @@ import 'package:driverapp/widgets/others/network_base_view.dart';
import 'package:driverapp/widgets/others/rounded_container.dart'; import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../base/base_view.dart'; import '../base/base_view.dart';
import 'package:driverapp/config/shared_pref_kay.dart';
class DashboardScreen extends StatefulWidget { class DashboardScreen extends StatefulWidget {
@override @override
@ -257,11 +257,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
height: MediaQuery.of(context).size.height * 0.18, height: MediaQuery.of(context).size.height * 0.18,
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(colors: [ gradient: LinearGradient(
Color(0xff48C0BC), colors: [Hexcolor("#45B7AE"), Hexcolor("#119FA9")],
Color(0xff17AFB8) ),
])), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[

File diff suppressed because one or more lines are too long

@ -103,6 +103,26 @@ class TranslationBase {
String get confirmationSent => String get confirmationSent =>
localizedValues['confirmationSent'][locale.languageCode]; localizedValues['confirmationSent'][locale.languageCode];
String get delivered => localizedValues['delivered'][locale.languageCode];
String get deliveredAccepted =>
localizedValues['deliveredAccepted'][locale.languageCode];
String get deliveredRejected =>
localizedValues['deliveredRejected'][locale.languageCode];
String get canceled => localizedValues['canceled'][locale.languageCode];
String get selectAction =>
localizedValues['selectAction'][locale.languageCode];
String get youHaveSelected =>
localizedValues['youHaveSelected'][locale.languageCode];
String get confirm => localizedValues['confirm'][locale.languageCode];
String get areYouSure => localizedValues['areYouSure'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -15,16 +15,18 @@ class ActionSheetButton extends StatelessWidget {
onTap: onTap, onTap: onTap,
child: Container( child: Container(
height: SizeConfig.isMobilePortrait height: SizeConfig.isMobilePortrait
? MediaQuery.of(context).size.height * 0.07 ? MediaQuery.of(context).size.height * 0.08
: MediaQuery.of(context).size.height * 0.14, : MediaQuery.of(context).size.height * 0.14,
decoration: BoxDecoration( decoration: BoxDecoration(boxShadow: [
border: Border.all(color: Colors.blue), BoxShadow(
borderRadius: BorderRadius.circular(6), color: Hexcolor("#DBE5E6"),
gradient: LinearGradient(colors: [ spreadRadius: 15,
Hexcolor('#DCE6E8'), blurRadius: 15,
Hexcolor('#FFFFFF'), offset: Offset(0, 7),
], begin: Alignment.topLeft),
), // changes position of shadow
),
], borderRadius: BorderRadius.circular(15), color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -61,7 +63,9 @@ class ActionSheetButton extends StatelessWidget {
padding: EdgeInsets.only(top: 5.0), padding: EdgeInsets.only(top: 5.0),
child: Text( child: Text(
label, label,
style: TextStyle(fontSize: 18.0), style: TextStyle(fontSize: 22.0,
fontFamily: "Metropolis-Bold",
color: Hexcolor("##1A1818")),
), ),
) )
], ],

@ -12,7 +12,7 @@ class CustomBottomSheet extends StatelessWidget {
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 12.0), padding: EdgeInsets.symmetric(vertical: 12.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor("#FEFEFE"), color: Colors.white,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0), topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0), topRight: Radius.circular(30.0),

@ -191,8 +191,17 @@ 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,
color: widget.color != null ? widget.color : Hexcolor( gradient: widget.color != null
"#1CA4AA"), ? null
: LinearGradient(
colors: [
Hexcolor("#45B7AE"),
Hexcolor("#119FA9")
],
),
color: widget.color != null
? widget.color
: Hexcolor("#000000"),
), ),
), ),
), ),
@ -201,10 +210,10 @@ class _SecondaryButtonState extends State<SecondaryButton>
padding: widget.iconOnly padding: widget.iconOnly
? EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0) ? EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0)
: EdgeInsets.only( : EdgeInsets.only(
top: widget.small ? 8.0 : 12.0, top: widget.small ? 8.0 : 16.0,
bottom: widget.small ? 6.0 : 12.0, bottom: widget.small ? 6.0 : 16.0,
left: 18.0, left: 18.0,
right: 18.0), right: 18.0),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Positioned( Positioned(

@ -1,6 +1,7 @@
import 'package:driverapp/core/enum/viewstate.dart'; import 'package:driverapp/core/enum/viewstate.dart';
import 'package:driverapp/core/viewModels/orders_view_model.dart'; import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/base/base_view.dart'; import 'package:driverapp/pages/base/base_view.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/buttons/secondary_button.dart'; import 'package:driverapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -34,7 +35,7 @@ class CustomDialog extends StatelessWidget {
height: 30, height: 30,
), ),
Text( Text(
'you have selected:', TranslationBase.of(context).youHaveSelected,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Colors.black, color: Colors.black,
@ -54,7 +55,9 @@ class CustomDialog extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
Texts( Texts(
'Are you sure?', TranslationBase
.of(context)
.areYouSure,
color: Colors.black, color: Colors.black,
fontSize: 20, fontSize: 20,
), ),
@ -62,7 +65,9 @@ class CustomDialog extends StatelessWidget {
height: 10, height: 10,
), ),
SecondaryButton( SecondaryButton(
label: "Confirm", label: TranslationBase
.of(context)
.confirm,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onTap: () { onTap: () {
model.setState(ViewState.BusyLocal); model.setState(ViewState.BusyLocal);
@ -73,7 +78,9 @@ class CustomDialog extends StatelessWidget {
height: 10, height: 10,
), ),
SecondaryButton( SecondaryButton(
label: "Cancel", label: TranslationBase
.of(context)
.canceled,
onTap: () { onTap: () {
model.hideBottomSheet(); model.hideBottomSheet();
Navigator.of(context).pop(); Navigator.of(context).pop();

@ -33,17 +33,16 @@ class AppScaffold extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context; AppGlobal.context = context;
return SafeArea( return SafeArea(
bottom: false,
child: Scaffold( child: Scaffold(
backgroundColor: appBarColor ?? Theme.of(context).scaffoldBackgroundColor, backgroundColor:
appBarColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar appBar: isShowAppBar
? AppBar( ? AppBar(
elevation: 0, elevation: 0,
backgroundColor: Theme backgroundColor: Theme.of(context).appBarTheme.color,
.of(context) textTheme: TextTheme(
.appBarTheme headline6: TextStyle(
.color,
textTheme: TextTheme(
headline6: TextStyle(
color: titleColor ?? Colors.white, color: titleColor ?? Colors.white,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
@ -80,6 +79,6 @@ class AppScaffold extends StatelessWidget {
} }
buildBodyWidget() { buildBodyWidget() {
return Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]); return body;
} }
} }

Loading…
Cancel
Save