PAP-872 & PAP-593 fixed, Water addition was not visible.

merge-requests/317/head
Sikander Saleem 3 years ago
parent 81ce399e85
commit db84090694

@ -58,8 +58,7 @@ class AppScaffold extends StatelessWidget {
final List<Widget> appBarIcons;
final List<ImagesInfo> imagesInfo;
final bool isHelp;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
AppBarWidget appBar;
AppScaffold(
@ -96,8 +95,7 @@ class AppScaffold extends StatelessWidget {
Widget build(BuildContext context) {
AppGlobal.context = context;
return Scaffold(
backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar
? appBar = AppBarWidget(
appBarTitle: appBarTitle,
@ -114,22 +112,21 @@ class AppScaffold extends StatelessWidget {
body: SafeArea(
top: true,
bottom: true,
child:
(!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage)
? NotAutPage(
title: title ?? appBarTitle,
description: description,
infoList: infoList,
imagesInfo: imagesInfo,
child: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && isShowDecPage)
? NotAutPage(
title: title ?? appBarTitle,
description: description,
infoList: infoList,
imagesInfo: imagesInfo,
)
: baseViewModel != null
? NetworkBaseView(
child: buildBodyWidget(context),
baseViewModel: baseViewModel,
)
: baseViewModel != null
? NetworkBaseView(
child: buildBodyWidget(context),
baseViewModel: baseViewModel,
)
: buildBodyWidget(context),
: buildBodyWidget(context),
),
floatingActionButton: floatingActionButton,
);
}
@ -138,14 +135,12 @@ class AppScaffold extends StatelessWidget {
}
buildBodyWidget(context) {
return Stack(
children: <Widget>[body, isHelp == true ? RobotIcon() : Container()]);
return Stack(children: <Widget>[body, isHelp == true ? RobotIcon() : Container()]);
}
}
class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
final AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
final AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
final String appBarTitle;
final bool showHomeAppBarIcon;
@ -193,22 +188,12 @@ class AppBarWidgetState extends State<AppBarWidget> {
ProjectViewModel projectViewModel = Provider.of(context);
return AppBar(
elevation: 0,
backgroundColor: widget.isPharmacy
? Colors.green
: Theme.of(context).appBarTheme.color,
backgroundColor: widget.isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color,
textTheme: TextTheme(
headline6: TextStyle(
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
),
title: Text(
widget.authenticatedUserObject.isLogin || !widget.isShowDecPage
? widget.appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
title: Text(widget.authenticatedUserObject.isLogin || !widget.isShowDecPage ? widget.appBarTitle.toUpperCase() : TranslationBase.of(context).serviceInformationTitle,
style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
@ -218,9 +203,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
actions: <Widget>[
(widget.isPharmacy && widget.showPharmacyCart)
? IconButton(
icon: Badge(
badgeContent: Text(badgeText),
child: Icon(Icons.shopping_cart)),
icon: Badge(badgeContent: Text(badgeText), child: Icon(Icons.shopping_cart)),
color: Colors.white,
onPressed: () {
Navigator.of(context).popUntil(ModalRoute.withName('/'));
@ -232,10 +215,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
position: BadgePosition.topStart(top: -15, start: -10),
badgeContent: Text(
badgeText,
style: TextStyle(
fontSize: 9,
color: Colors.white,
fontWeight: FontWeight.normal),
style: TextStyle(fontSize: 9, color: Colors.white, fontWeight: FontWeight.normal),
),
child: Icon(Icons.shopping_cart)),
color: Colors.white,
@ -249,10 +229,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
icon: Icon(FontAwesomeIcons.home),
color: Colors.white,
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> r) => false);
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
// Cart Click Event
if (_onCartClick != null) _onCartClick();
@ -316,18 +293,11 @@ class _RobotIcon extends State<RobotIcon> {
],
),
child: TyperAnimatedTextKit(
text: Provider.of<ProjectViewModel>(context,
listen: false)
.isArabic ==
true
text: Provider.of<ProjectViewModel>(context, listen: false).isArabic == true
? "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
: "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.",
textLength: Provider.of<ProjectViewModel>(context,
listen: false)
.isArabic ==
true
? "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
.length
textLength: Provider.of<ProjectViewModel>(context, listen: false).isArabic == true
? "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.".length
: "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file."
.length))
: Container(),

Loading…
Cancel
Save