|
|
|
|
@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
@ -41,44 +42,44 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
|
AppGlobal.context = context;
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
appBar: isShowAppBar
|
|
|
|
|
? AppBar(
|
|
|
|
|
elevation: 0,
|
|
|
|
|
backgroundColor: Theme.of(context).appBarTheme.color,
|
|
|
|
|
textTheme: TextTheme(
|
|
|
|
|
headline6: TextStyle(
|
|
|
|
|
color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
title: Text(appBarTitle.toUpperCase()),
|
|
|
|
|
leading: Builder(
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return ArrowBack();
|
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
appBar: isShowAppBar
|
|
|
|
|
? AppBar(
|
|
|
|
|
elevation: 0,
|
|
|
|
|
backgroundColor: Theme.of(context).appBarTheme.color,
|
|
|
|
|
textTheme: TextTheme(
|
|
|
|
|
headline6:
|
|
|
|
|
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
title: Text(appBarTitle.toUpperCase()),
|
|
|
|
|
leading: Builder(
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return ArrowBack();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
actions: <Widget>[
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: Icon(FontAwesomeIcons.home),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).popUntil(ModalRoute.withName('/'));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
actions: <Widget>[
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: Icon(FontAwesomeIcons.home),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).popUntil(ModalRoute.withName('/'));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
body: baseViewModel != null
|
|
|
|
|
? NetworkBaseView(
|
|
|
|
|
child: buildBodyWidget(),
|
|
|
|
|
baseViewModel: baseViewModel,
|
|
|
|
|
)
|
|
|
|
|
: buildBodyWidget(),
|
|
|
|
|
bottomSheet: bottomSheet,
|
|
|
|
|
bottomNavigationBar:
|
|
|
|
|
this.isBottomBar == true ? BottomBarSearch() : SizedBox()
|
|
|
|
|
//floatingActionButton: FloatingSearchButton(),
|
|
|
|
|
);
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
body: baseViewModel != null
|
|
|
|
|
? NetworkBaseView(
|
|
|
|
|
child: buildBodyWidget(),
|
|
|
|
|
baseViewModel: baseViewModel,
|
|
|
|
|
)
|
|
|
|
|
: buildBodyWidget(),
|
|
|
|
|
bottomSheet: bottomSheet,
|
|
|
|
|
// bottomNavigationBar:
|
|
|
|
|
// this.isBottomBar == true ? BottomBarSearch() : SizedBox()
|
|
|
|
|
// floatingActionButton: FloatingSearchButton(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildAppLoaderWidget(bool isLoading) {
|
|
|
|
|
@ -86,6 +87,7 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildBodyWidget() {
|
|
|
|
|
return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
|
|
|
|
|
// return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
|
|
|
|
|
return Stack(children: <Widget>[body, FloatingSearchButton()]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|