wt1.1.2 new treeview, bar chart for muscle development
This commit is contained in:
@@ -151,7 +151,7 @@ class _AppBarNav extends State<AppBarNav> with SingleTickerProviderStateMixin {
|
||||
lineHeight: 14.0,
|
||||
percent: percent,
|
||||
center: Text(
|
||||
(percent * 100).toStringAsFixed(0) + "% finished",
|
||||
(percent * 100).toStringAsFixed(0) + "% " + AppLocalizations.of(context).translate("finished"),
|
||||
style: new TextStyle(fontSize: 12.0),
|
||||
),
|
||||
trailing: Icon(percent > 0.6 ? Icons.mood : Icons.mood_bad, color: colorAnim.value,),
|
||||
|
||||
@@ -75,7 +75,7 @@ class _AppBarCommonNav extends State<AppBarCommonNav> with SingleTickerProvider
|
||||
icon: Icon(Icons.arrow_back, color: Colors.white),
|
||||
onPressed: () =>
|
||||
{
|
||||
Navigator.of(context).pop()
|
||||
Navigator.of(context).pushNamed('home')
|
||||
},
|
||||
)
|
||||
);
|
||||
@@ -119,7 +119,7 @@ class _AppBarCommonNav extends State<AppBarCommonNav> with SingleTickerProvider
|
||||
lineHeight: 14.0,
|
||||
percent: percent,
|
||||
center: Text(
|
||||
(percent * 100).toStringAsFixed(0) + "% finished",
|
||||
(percent * 100).toStringAsFixed(0) + "% " + AppLocalizations.of(context).translate("finished"),
|
||||
style: new TextStyle(fontSize: 12.0),
|
||||
),
|
||||
trailing: Icon(percent > 0.6 ? Icons.mood : Icons.mood_bad, color: colorAnim.value,),
|
||||
|
||||
@@ -91,12 +91,12 @@ class _NawDrawerWidget extends State<BottomNavigator> {
|
||||
|
||||
break;
|
||||
case 1:
|
||||
//Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pushNamed('myDevelopment');
|
||||
break;
|
||||
case 2:
|
||||
|
||||
//Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pushNamed('myExercisePlan');
|
||||
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ExerciseTypeWidget extends StatelessWidget {
|
||||
final String exerciseTypeName;
|
||||
//final DateTime lastModified;
|
||||
|
||||
ExerciseTypeWidget({@required this.exerciseTypeName});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget exerciseTypeNameWidget = Text(
|
||||
this.exerciseTypeName,
|
||||
style: TextStyle(fontWeight: FontWeight.w800, color: Colors.blueAccent, backgroundColor: Colors.transparent),
|
||||
);
|
||||
|
||||
Icon icon = Icon(Icons.person);
|
||||
|
||||
return Card(
|
||||
color: Colors.white38,
|
||||
shadowColor: Colors.black54,
|
||||
elevation: 0.0,
|
||||
child: ListTile(
|
||||
leading: icon,
|
||||
title: exerciseTypeNameWidget,
|
||||
//subtitle: lastModifiedWidget,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -45,9 +45,6 @@ class _HomePageState extends State<AitrainerHome> {
|
||||
SettingsBloc settingsBloc = BlocProvider.of<SettingsBloc>(context);
|
||||
settingsBloc.context = context;
|
||||
sessionBloc.add(SessionStart(settingsBloc: settingsBloc));
|
||||
//String lang = AppLanguage().appLocal.languageCode;
|
||||
//print (" -- Loading delayed lang $lang");
|
||||
//settingsBloc.add(SettingsChangeLanguage(language: lang));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:ui';
|
||||
import 'package:aitrainer_app/bloc/menu/menu_bloc.dart';
|
||||
import 'package:aitrainer_app/localization/app_localization.dart';
|
||||
import 'package:aitrainer_app/model/cache.dart';
|
||||
import 'package:aitrainer_app/model/workout_tree.dart';
|
||||
import 'package:aitrainer_app/model/workout_menu_tree.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/painting.dart';
|
||||
@@ -31,7 +31,7 @@ class MenuPageWidget extends StatelessWidget {
|
||||
menuBloc.menuTreeRepository
|
||||
.getBranch(menuBloc.parent)
|
||||
.forEach((treeName, value) {
|
||||
WorkoutTree workoutTree = value as WorkoutTree;
|
||||
WorkoutMenuTree workoutTree = value as WorkoutMenuTree;
|
||||
_columnChildren.add(Container(
|
||||
padding: EdgeInsets.only(top: 16.0),
|
||||
child: Center(
|
||||
@@ -83,7 +83,7 @@ class MenuPageWidget extends StatelessWidget {
|
||||
}
|
||||
|
||||
void menuClick(
|
||||
WorkoutTree workoutTree, MenuBloc menuBloc, BuildContext context) {
|
||||
WorkoutMenuTree workoutTree, MenuBloc menuBloc, BuildContext context) {
|
||||
print("Hi!, Menu clicked " + workoutTree.id.toString());
|
||||
if (workoutTree.child == false) {
|
||||
menuBloc.add(MenuTreeDown(parent: workoutTree.id));
|
||||
@@ -107,7 +107,7 @@ class MenuPageWidget extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
dynamic getShape(WorkoutTree workoutTree) {
|
||||
dynamic getShape(WorkoutMenuTree workoutTree) {
|
||||
bool base = workoutTree.base;
|
||||
dynamic returnCode = (base == true)
|
||||
? RoundedRectangleBorder(
|
||||
@@ -117,7 +117,7 @@ class MenuPageWidget extends StatelessWidget {
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
dynamic _getButtonImage(WorkoutTree workoutTree) {
|
||||
dynamic _getButtonImage(WorkoutMenuTree workoutTree) {
|
||||
dynamic image;
|
||||
try {
|
||||
image = Image.asset(
|
||||
|
||||
Reference in New Issue
Block a user