From 979f04de8192d20303e47be6b21d2cba1ea79437 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 13 Sep 2020 15:05:55 +0300 Subject: [PATCH] update apr scaffold --- .../orders/deliverd_order_res_model.dart | 2 +- lib/widgets/others/app_scaffold_widget.dart | 77 +++++++++---------- 2 files changed, 38 insertions(+), 41 deletions(-) diff --git a/lib/core/model/orders/deliverd_order_res_model.dart b/lib/core/model/orders/deliverd_order_res_model.dart index 46807f8..eec0584 100644 --- a/lib/core/model/orders/deliverd_order_res_model.dart +++ b/lib/core/model/orders/deliverd_order_res_model.dart @@ -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}); diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index c3ae840..52040c1 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -30,7 +30,7 @@ class AppScaffold extends StatelessWidget { this.titleColor, this.arrowColor, this.appBarColor, - this.isAppBarGradient}); + this.isAppBarGradient = false}); @override Widget build(BuildContext context) { @@ -43,25 +43,22 @@ class AppScaffold extends StatelessWidget { appBarColor ?? Theme.of(context).scaffoldBackgroundColor, 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(Utils.formatStringToPascalCase(appBarTitle)), - 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: [ // IconButton( // icon: Icon(FontAwesomeIcons.home), @@ -71,28 +68,28 @@ class AppScaffold extends StatelessWidget { // }, // ), // ], - ) - : 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, + ) + : 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, ),