fix issues

merge-requests/474/head
Elham Rababh 5 years ago
parent 5a389de93f
commit db96749849

@ -26,8 +26,10 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/pharmacy/bottom_nav_pharmacy_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
@ -83,7 +85,6 @@ class AppScaffold extends StatefulWidget {
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
AppBarWidget appBar;
final ValueChanged<int> changeCurrentTab;
final Widget customAppBar;
final int currentTab;
@ -128,7 +129,7 @@ class AppScaffold extends StatefulWidget {
this.dropdownIndexValue,
this.dropDownIndexChange,
this.onTap,
appBar,
this.appBar,
this.customAppBar,
this.isLocalLoader = false,
this.backButtonTab,
@ -220,39 +221,39 @@ class _AppScaffoldState extends State<AppScaffold> {
PharmacyPagesViewModel pagesViewModel = Provider.of(context);
AppGlobal.context = context;
bool isUserNotLogin = (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && isShowDecPage);
bool isUserNotLogin = (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && widget.isShowDecPage);
return Scaffold(
backgroundColor: backgroundColor ?? CustomColors.appBackgroudGrey2Color,
backgroundColor: widget.backgroundColor ?? CustomColors.appBackgroudGrey2Color,
extendBody: widget.extendBody,
appBar: isUserNotLogin
? null
: (showNewAppBar
: (widget.showNewAppBar
? NewAppBarWidget(
title: appBarTitle,
showTitle: showNewAppBarTitle,
showDropDown: showDropDown,
dropdownIndexValue: dropdownIndexValue,
dropDownList: dropDownList ?? [],
dropDownIndexChange: dropDownIndexChange,
appBarIcons: appBarIcons,
onTap: onTap,
title: widget.appBarTitle,
showTitle: widget.showNewAppBarTitle,
showDropDown: widget.showDropDown,
dropdownIndexValue: widget.dropdownIndexValue,
dropDownList: widget.dropDownList ?? [],
dropDownIndexChange: widget.dropDownIndexChange,
appBarIcons: widget.appBarIcons,
onTap: widget.onTap,
)
: widget.isShowPharmacyAppbar
? pharmacyAppbar()
:(isShowAppBar
? customAppBar != null
? customAppBar
: appBar = AppBarWidget(
appBarTitle: appBarTitle,
appBarIcons: appBarIcons,
showHomeAppBarIcon: showHomeAppBarIcon,
isPharmacy: isPharmacy,
showPharmacyCart: showPharmacyCart,
isOfferPackages: isOfferPackages,
showOfferPackagesCart: showOfferPackagesCart,
isShowDecPage: isShowDecPage,
backButtonTab: backButtonTab,
:(widget.isShowAppBar
? widget.customAppBar != null
? widget.customAppBar
: widget.appBar = AppBarWidget(
appBarTitle: widget.appBarTitle,
appBarIcons: widget.appBarIcons,
showHomeAppBarIcon: widget.showHomeAppBarIcon,
isPharmacy:widget.isPharmacy,
showPharmacyCart: widget.showPharmacyCart,
isOfferPackages:widget.isOfferPackages,
showOfferPackagesCart: widget.showOfferPackagesCart,
isShowDecPage: widget.isShowDecPage,
backButtonTab: widget.backButtonTab,
)
: null)),
bottomSheet: widget.bottomSheet,
@ -273,7 +274,7 @@ class _AppScaffoldState extends State<AppScaffold> {
floatingActionButton: widget.floatingActionButton,
bottomNavigationBar: widget.isBottomBar
? BottomNavPharmacyBar(
changeIndex: changeCurrentTab,
changeIndex: widget.changeCurrentTab,
index: widget.currentTab,
)
: null,
@ -309,7 +310,7 @@ class _AppScaffoldState extends State<AppScaffold> {
}
buildBodyWidget(context) {
return Stack(children: <Widget>[body, isHelp == true ? RobotIcon() : Container()]);
return Stack(children: <Widget>[widget.body, widget.isHelp == true ? RobotIcon() : Container()]);
}
}

Loading…
Cancel
Save