update apr scaffold

merge-requests/101/head
hussam al-habibeh 5 years ago
parent da5c95f33d
commit 979f04de81

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

@ -30,7 +30,7 @@ class AppScaffold extends StatelessWidget {
this.titleColor, this.titleColor,
this.arrowColor, this.arrowColor,
this.appBarColor, this.appBarColor,
this.isAppBarGradient}); this.isAppBarGradient = false});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -43,25 +43,22 @@ class AppScaffold extends StatelessWidget {
appBarColor ?? Theme.of(context).scaffoldBackgroundColor, appBarColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar && !isAppBarGradient appBar: isShowAppBar && !isAppBarGradient
? AppBar( ? AppBar(
elevation: 0, elevation: 0,
backgroundColor: Theme backgroundColor: Theme.of(context).appBarTheme.color,
.of(context) textTheme: TextTheme(
.appBarTheme headline6: TextStyle(
.color, color: titleColor ?? Colors.white,
textTheme: TextTheme( fontWeight: FontWeight.bold),
headline6: TextStyle( ),
color: titleColor ?? Colors.white, title: Text(Utils.formatStringToPascalCase(appBarTitle)),
fontWeight: FontWeight.bold), leading: Builder(
), builder: (BuildContext context) {
title: Text(Utils.formatStringToPascalCase(appBarTitle)), return ArrowBack(
leading: Builder( arrowColor: arrowColor,
builder: (BuildContext context) { );
return ArrowBack( },
arrowColor: arrowColor, ),
); centerTitle: true,
},
),
centerTitle: true,
// actions: <Widget>[ // actions: <Widget>[
// IconButton( // IconButton(
// icon: Icon(FontAwesomeIcons.home), // icon: Icon(FontAwesomeIcons.home),
@ -71,28 +68,28 @@ class AppScaffold extends StatelessWidget {
// }, // },
// ), // ),
// ], // ],
) )
: isShowAppBar && isAppBarGradient ? GradientAppBar( : isShowAppBar && isAppBarGradient
? GradientAppBar(
gradient: LINEAR_GRADIENT, gradient: LINEAR_GRADIENT,
title: Text( title: Text(
Utils.formatStringToPascalCase(appBarTitle), Utils.formatStringToPascalCase(appBarTitle),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
centerTitle: true, centerTitle: true,
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return ArrowBack( return ArrowBack(
arrowColor: arrowColor, arrowColor: arrowColor,
); );
}, },
) ))
) : null, : null,
body: baseViewModel != null body: baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
child: buildBodyWidget(), child: buildBodyWidget(),
baseViewModel: baseViewModel, baseViewModel: baseViewModel,
) )
: buildBodyWidget(), : buildBodyWidget(),
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
), ),

Loading…
Cancel
Save