WT1.1.8+3 custom plan and training plan fixes
This commit is contained in:
@@ -103,7 +103,7 @@ class _AppBarNav extends State<AppBarNav> with SingleTickerProviderStateMixin, C
|
||||
}
|
||||
else if (widget.depth != null)
|
||||
{
|
||||
if (widget.depth == 0) {Navigator.of(context).pushNamed('home')} else {Navigator.of(context).pop()}
|
||||
if (widget.depth == 0) {Navigator.of(context).popAndPushNamed('home')} else {Navigator.of(context).pop()}
|
||||
}
|
||||
},
|
||||
));
|
||||
|
||||
@@ -77,32 +77,27 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
|
||||
widget.bottomNavIndex = index;
|
||||
switch (index) {
|
||||
case 0:
|
||||
Navigator.of(context).pop();
|
||||
Track().track(TrackingEvent.home);
|
||||
Navigator.of(context).pushNamed('home');
|
||||
Navigator.of(context).popAndPushNamed('home');
|
||||
|
||||
break;
|
||||
case 1:
|
||||
Navigator.of(context).pop();
|
||||
Track().track(TrackingEvent.my_development);
|
||||
Navigator.of(context).pushNamed('myDevelopment');
|
||||
Navigator.of(context).popAndPushNamed('myDevelopment');
|
||||
break;
|
||||
case 2:
|
||||
Navigator.of(context).pop();
|
||||
Track().track(TrackingEvent.my_exerciseplan);
|
||||
Navigator.of(context).pushNamed('myTrainingPlans');
|
||||
Navigator.of(context).popAndPushNamed('myTrainingPlans');
|
||||
|
||||
break;
|
||||
case 3:
|
||||
Navigator.of(context).pop();
|
||||
Track().track(TrackingEvent.account);
|
||||
Navigator.of(context).pushNamed('account');
|
||||
Navigator.of(context).popAndPushNamed('account');
|
||||
|
||||
break;
|
||||
case 4:
|
||||
Navigator.of(context).pop();
|
||||
Track().track(TrackingEvent.settings);
|
||||
Navigator.of(context).pushNamed('settings');
|
||||
Navigator.of(context).popAndPushNamed('settings');
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class ImageButton extends StatelessWidget {
|
||||
child: Text(text,
|
||||
maxLines: 2,
|
||||
style: GoogleFonts.archivoBlack(
|
||||
fontSize: 16,
|
||||
fontSize: 15,
|
||||
color: textColor,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
|
||||
@@ -309,7 +309,7 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
} else {
|
||||
Track().track(TrackingEvent.search, eventValue: value.exerciseType!.name);
|
||||
menuBloc.ability = ExerciseAbility.oneRepMax;
|
||||
Navigator.of(context).pushNamed('exerciseNewPage', arguments: value.exerciseType);
|
||||
Navigator.of(context).popAndPushNamed('exerciseNewPage', arguments: value.exerciseType);
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -328,7 +328,7 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
if (Cache().myTrainingPlan != null) {
|
||||
final TrainingPlanBloc bloc = BlocProvider.of<TrainingPlanBloc>(context);
|
||||
bloc.setMyPlan(Cache().myTrainingPlan);
|
||||
Navigator.of(context).pushNamed("myTrainingPlanExecute");
|
||||
Navigator.of(context).popAndPushNamed("myTrainingPlanExecute");
|
||||
}
|
||||
},
|
||||
onCancel: () => {
|
||||
@@ -348,11 +348,11 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
);
|
||||
}))
|
||||
: Offstage(),
|
||||
activeExercisePlan
|
||||
/* activeExercisePlan
|
||||
? SizedBox(
|
||||
width: 10,
|
||||
)
|
||||
: Offstage(),
|
||||
: Offstage(), */
|
||||
Cache().activeExercisePlan != null
|
||||
? GestureDetector(
|
||||
onTap: () => showDialog(
|
||||
@@ -367,7 +367,7 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
Navigator.of(context).pop(),
|
||||
if (Cache().activeExercisePlan != null)
|
||||
{
|
||||
Navigator.of(context).pushNamed("testSetExecute"),
|
||||
Navigator.of(context).popAndPushNamed("testSetExecute"),
|
||||
}
|
||||
},
|
||||
onCancel: () => {
|
||||
@@ -399,7 +399,6 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
void menuClick(WorkoutMenuTree workoutTree, MenuBloc menuBloc) {
|
||||
if (tutorialBloc.isActive) {
|
||||
final String checkText = workoutTree.nameEnglish;
|
||||
print("Click: tutorial is active $checkText");
|
||||
if (!tutorialBloc.checkAction(checkText)) {
|
||||
return;
|
||||
}
|
||||
@@ -412,7 +411,6 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
Navigator.of(context).pushNamed('testSetEdit', arguments: args);
|
||||
} else if (menuBloc.ability != null && ExerciseAbility.training.equalsTo(menuBloc.ability!) && workoutTree.parent != 0) {
|
||||
HashMap<String, dynamic> args = HashMap();
|
||||
print("menu ${workoutTree.internalName}");
|
||||
args['parentName'] = workoutTree.internalName;
|
||||
Navigator.of(context).pushNamed("myTrainingPlanActivate", arguments: args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user