|
|
|
@ -7,8 +7,6 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-page.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/routes.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
@ -68,8 +66,8 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
AppBarWidget appBar;
|
|
|
|
AppBarWidget appBar;
|
|
|
|
final Widget customAppBar;
|
|
|
|
final Widget customAppBar;
|
|
|
|
|
|
|
|
|
|
|
|
AppScaffold({
|
|
|
|
AppScaffold(
|
|
|
|
@required this.body,
|
|
|
|
{@required this.body,
|
|
|
|
this.appBarTitle = '',
|
|
|
|
this.appBarTitle = '',
|
|
|
|
this.isLoading = false,
|
|
|
|
this.isLoading = false,
|
|
|
|
this.isShowAppBar = false,
|
|
|
|
this.isShowAppBar = false,
|
|
|
|
@ -104,8 +102,7 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
appBar,
|
|
|
|
appBar,
|
|
|
|
this.customAppBar,
|
|
|
|
this.customAppBar,
|
|
|
|
this.isLocalLoader = false,
|
|
|
|
this.isLocalLoader = false,
|
|
|
|
this.backButtonTab
|
|
|
|
this.backButtonTab});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
|
|
|
|
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
|
|
|
|
_onCartClick = onClick;
|
|
|
|
_onCartClick = onClick;
|
|
|
|
@ -133,12 +130,9 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
onTap: onTap,
|
|
|
|
onTap: onTap,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: (isShowAppBar
|
|
|
|
: (isShowAppBar
|
|
|
|
?
|
|
|
|
? customAppBar != null
|
|
|
|
customAppBar != null
|
|
|
|
|
|
|
|
? customAppBar
|
|
|
|
? customAppBar
|
|
|
|
:
|
|
|
|
: appBar = AppBarWidget(
|
|
|
|
|
|
|
|
|
|
|
|
appBar = AppBarWidget(
|
|
|
|
|
|
|
|
appBarTitle: appBarTitle,
|
|
|
|
appBarTitle: appBarTitle,
|
|
|
|
appBarIcons: appBarIcons,
|
|
|
|
appBarIcons: appBarIcons,
|
|
|
|
showHomeAppBarIcon: showHomeAppBarIcon,
|
|
|
|
showHomeAppBarIcon: showHomeAppBarIcon,
|
|
|
|
@ -179,18 +173,7 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildBodyWidget(context) {
|
|
|
|
buildBodyWidget(context) {
|
|
|
|
return Stack(children: <Widget>[
|
|
|
|
return Stack(children: <Widget>[body, isHelp == true ? RobotIcon() : Container()]);
|
|
|
|
Center(
|
|
|
|
|
|
|
|
child: isLoading
|
|
|
|
|
|
|
|
? CircularProgressIndicator(
|
|
|
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
|
|
|
valueColor: AlwaysStoppedAnimation<Color>(
|
|
|
|
|
|
|
|
Colors.grey[500],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: body),
|
|
|
|
|
|
|
|
isHelp == true ? RobotIcon() : Container()
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -361,10 +344,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
|
|
|
|
position: BadgePosition.topStart(top: -15, start: -10),
|
|
|
|
position: BadgePosition.topStart(top: -15, start: -10),
|
|
|
|
badgeContent: Text(
|
|
|
|
badgeContent: Text(
|
|
|
|
orderPreviewViewModel.cartResponse.quantityCount.toString() /*_badgeText*/,
|
|
|
|
orderPreviewViewModel.cartResponse.quantityCount.toString() /*_badgeText*/,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(fontSize: 9, color: Colors.white, fontWeight: FontWeight.normal),
|
|
|
|
fontSize: 9,
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Icon(Icons.shopping_cart)),
|
|
|
|
child: Icon(Icons.shopping_cart)),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
|