|
|
|
|
@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:gradient_app_bar/gradient_app_bar.dart';
|
|
|
|
|
|
|
|
|
|
import 'arrow_back.dart';
|
|
|
|
|
import 'network_base_view.dart';
|
|
|
|
|
|
|
|
|
|
class AppScaffold extends StatelessWidget {
|
|
|
|
|
@ -21,6 +22,7 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
|
final Color appBarColor;
|
|
|
|
|
final bool isAppBarGradient;
|
|
|
|
|
final bool isShowHomeIcon;
|
|
|
|
|
final bool isShowBackIcon;
|
|
|
|
|
|
|
|
|
|
AppScaffold(
|
|
|
|
|
{@required this.body,
|
|
|
|
|
@ -33,7 +35,8 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
|
this.arrowColor,
|
|
|
|
|
this.appBarColor,
|
|
|
|
|
this.isAppBarGradient = false,
|
|
|
|
|
this.isShowHomeIcon = false});
|
|
|
|
|
this.isShowHomeIcon = false,
|
|
|
|
|
this.isShowBackIcon = false});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -61,13 +64,13 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
|
title: Text(Utils.formatStringToPascalCase(appBarTitle)),
|
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
|
|
|
|
|
|
// leading: Builder(
|
|
|
|
|
// builder: (BuildContext context) {
|
|
|
|
|
// return ArrowBack(
|
|
|
|
|
// arrowColor: arrowColor,
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
leading: isShowBackIcon ? Builder(
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return ArrowBack(
|
|
|
|
|
arrowColor: arrowColor,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
) : null,
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
actions: <Widget>[
|
|
|
|
|
if (isShowHomeIcon)
|
|
|
|
|
@ -90,6 +93,13 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
leading: isShowBackIcon ? Builder(
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return ArrowBack(
|
|
|
|
|
arrowColor: arrowColor,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
) : null,
|
|
|
|
|
actions: <Widget>[
|
|
|
|
|
if (isShowHomeIcon)
|
|
|
|
|
IconButton(
|
|
|
|
|
|