|
|
|
@ -55,10 +55,12 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
final int dropdownIndexValue;
|
|
|
|
final int dropdownIndexValue;
|
|
|
|
List<String> dropDownList;
|
|
|
|
List<String> dropDownList;
|
|
|
|
final Function(int) dropDownIndexChange;
|
|
|
|
final Function(int) dropDownIndexChange;
|
|
|
|
|
|
|
|
Function onTap;
|
|
|
|
|
|
|
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
|
|
AppBarWidget appBar;
|
|
|
|
AppBarWidget appBar;
|
|
|
|
|
|
|
|
|
|
|
|
AppScaffold({
|
|
|
|
AppScaffold({
|
|
|
|
@required this.body,
|
|
|
|
@required this.body,
|
|
|
|
this.appBarTitle = '',
|
|
|
|
this.appBarTitle = '',
|
|
|
|
@ -90,6 +92,7 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
this.dropDownList,
|
|
|
|
this.dropDownList,
|
|
|
|
this.dropdownIndexValue,
|
|
|
|
this.dropdownIndexValue,
|
|
|
|
this.dropDownIndexChange,
|
|
|
|
this.dropDownIndexChange,
|
|
|
|
|
|
|
|
this.onTap,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
|
|
|
|
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
|
|
|
|
@ -114,7 +117,9 @@ class AppScaffold extends StatelessWidget {
|
|
|
|
dropdownIndexValue: dropdownIndexValue,
|
|
|
|
dropdownIndexValue: dropdownIndexValue,
|
|
|
|
dropDownList: dropDownList ?? [],
|
|
|
|
dropDownList: dropDownList ?? [],
|
|
|
|
dropDownIndexChange: dropDownIndexChange,
|
|
|
|
dropDownIndexChange: dropDownIndexChange,
|
|
|
|
appBarIcons: appBarIcons)
|
|
|
|
appBarIcons: appBarIcons,
|
|
|
|
|
|
|
|
onTap: onTap,
|
|
|
|
|
|
|
|
)
|
|
|
|
: (isShowAppBar
|
|
|
|
: (isShowAppBar
|
|
|
|
? appBar = AppBarWidget(
|
|
|
|
? appBar = AppBarWidget(
|
|
|
|
appBarTitle: appBarTitle,
|
|
|
|
appBarTitle: appBarTitle,
|
|
|
|
@ -167,7 +172,10 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
|
|
|
|
List<String> dropDownList;
|
|
|
|
List<String> dropDownList;
|
|
|
|
final Function(int) dropDownIndexChange;
|
|
|
|
final Function(int) dropDownIndexChange;
|
|
|
|
final List<Widget> appBarIcons;
|
|
|
|
final List<Widget> appBarIcons;
|
|
|
|
NewAppBarWidget({Key key, this.showTitle = false, this.showDropDown = false, this.title = "", this.dropDownList, this.appBarIcons, this.dropdownIndexValue, this.dropDownIndexChange})
|
|
|
|
Function onTap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NewAppBarWidget(
|
|
|
|
|
|
|
|
{Key key, this.showTitle = false, this.showDropDown = false, this.title = "", this.dropDownList, this.appBarIcons, this.dropdownIndexValue, this.dropDownIndexChange, this.onTap})
|
|
|
|
: super(key: key);
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
@ -180,7 +188,9 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
ArrowBack(),
|
|
|
|
ArrowBack(
|
|
|
|
|
|
|
|
onTap: onTap,
|
|
|
|
|
|
|
|
),
|
|
|
|
if (showTitle)
|
|
|
|
if (showTitle)
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
@ -274,6 +284,7 @@ String _badgeText = "0";
|
|
|
|
|
|
|
|
|
|
|
|
class AppBarWidgetState extends State<AppBarWidget> {
|
|
|
|
class AppBarWidgetState extends State<AppBarWidget> {
|
|
|
|
String badgeText = "0";
|
|
|
|
String badgeText = "0";
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
widget.badgeUpdater = badgeUpdateBlock;
|
|
|
|
widget.badgeUpdater = badgeUpdateBlock;
|
|
|
|
@ -435,10 +446,10 @@ class _RobotIcon extends State<RobotIcon> {
|
|
|
|
bottom: -15);
|
|
|
|
bottom: -15);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// setAnimation() async {
|
|
|
|
// setAnimation() async {
|
|
|
|
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
|
|
|
|
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
|
|
|
|
// // var animation =
|
|
|
|
// // var animation =
|
|
|
|
// // IS_TEXT_COMPLETED == ? true : false;
|
|
|
|
// // IS_TEXT_COMPLETED == ? true : false;
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|