voice command

merge-requests/251/head
Sultan Khan 4 years ago
parent 3ac69692be
commit eeb073fb17

@ -13,8 +13,6 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart';
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';
@ -67,7 +65,8 @@ class AppScaffold extends StatelessWidget {
this.backgroundColor,
this.preferredSize = 0.0,
this.appBarIcons,
this.infoList, this.imagesInfo});
this.infoList,
this.imagesInfo});
@override
Widget build(BuildContext context) {
@ -75,12 +74,14 @@ class AppScaffold extends StatelessWidget {
return Scaffold(
backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar? AppBarWidget(
appBarTitle:appBarTitle,
appBarIcons:appBarIcons,
appBar: isShowAppBar
? AppBarWidget(
appBarTitle: appBarTitle,
appBarIcons: appBarIcons,
isPharmacy: isPharmacy,
isShowDecPage: isShowDecPage,
):null,
)
: null,
bottomSheet: bottomSheet,
body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage)
@ -102,7 +103,6 @@ class AppScaffold extends StatelessWidget {
buildAppLoaderWidget(bool isLoading) {
return isLoading ? AppLoaderWidget() : Container();
}
}
class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
@ -114,8 +114,11 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
final bool isPharmacy;
final bool isShowDecPage;
AppBarWidget({this.appBarTitle, this.appBarIcons,
this.isPharmacy = true, this.isShowDecPage = true});
AppBarWidget(
{this.appBarTitle,
this.appBarIcons,
this.isPharmacy = true,
this.isShowDecPage = true});
@override
Widget build(BuildContext context) {
@ -129,8 +132,7 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
backgroundColor:
isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color,
textTheme: TextTheme(
headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Text(
authenticatedUserObject.isLogin || !isShowDecPage
@ -139,8 +141,7 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontFamily:
projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
@ -153,8 +154,7 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
icon: Icon(Icons.shopping_cart),
color: Colors.white,
onPressed: () {
Navigator.of(context)
.popUntil(ModalRoute.withName('/'));
Navigator.of(context).popUntil(ModalRoute.withName('/'));
})
: Container(),
IconButton(
@ -163,14 +163,12 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => LandingPage()),
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> r) => false);
},
),
if (appBarIcons != null) ...appBarIcons
],
);
}

Loading…
Cancel
Save