v1.26 ios v2
This commit is contained in:
@@ -73,7 +73,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
]),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white38,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
onPressed: () => {
|
||||
if (Cache().userLoggedIn != null)
|
||||
@@ -94,7 +94,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
]),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white38,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
onPressed: () => {
|
||||
if (Cache().userLoggedIn != null)
|
||||
@@ -116,7 +116,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
]),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white38,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
onPressed: () => {
|
||||
if (Cache().userLoggedIn != null)
|
||||
@@ -134,7 +134,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
title: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white38,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
||||
Text(t(bodyType), style: TextStyle(color: Colors.blue)),
|
||||
@@ -165,7 +165,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
title: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white38,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
||||
Text(t("Available Devices"), style: TextStyle(color: Colors.blue)),
|
||||
@@ -189,7 +189,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
title: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white38,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
||||
Text(t("Trigger message"), style: TextStyle(color: Colors.purple)),
|
||||
@@ -218,7 +218,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
title: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white38,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
||||
Text(t(text), style: TextStyle(color: buttonColor)),
|
||||
@@ -253,7 +253,7 @@ class AccountPage extends StatelessWidget with Trans {
|
||||
leading: Icon(Icons.people),
|
||||
title: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Colors.white70,
|
||||
backgroundColor: Colors.white70,
|
||||
),
|
||||
onPressed: () => accountBloc.add(AccountGetTrainees()),
|
||||
child: Text("See my trainees"),
|
||||
|
||||
@@ -13,8 +13,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
|
||||
|
||||
import '../bloc/customer_change/customer_change_bloc.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class CustomerFitnessPage extends StatefulWidget {
|
||||
late _CustomerFitnessPageState _state;
|
||||
|
||||
@@ -11,8 +11,6 @@ import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
import 'package:syncfusion_flutter_gauges/gauges.dart';
|
||||
|
||||
import '../bloc/customer_change/customer_change_bloc.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class CustomerHeightPage extends StatefulWidget {
|
||||
late _CustomerHeightPageState _state;
|
||||
|
||||
@@ -11,8 +11,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
|
||||
|
||||
import '../bloc/customer_change/customer_change_bloc.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class CustomerSexPage extends StatefulWidget {
|
||||
late _CustomerSexPageState _state;
|
||||
|
||||
@@ -11,8 +11,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
|
||||
|
||||
import '../bloc/customer_change/customer_change_bloc.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class CustomerWeightPage extends StatefulWidget {
|
||||
late _CustomerWeightPageState _state;
|
||||
|
||||
@@ -59,10 +59,10 @@ class _CustomerWelcomePageState extends State<CustomerWelcomePage> with Trans {
|
||||
duration: Duration(seconds: 6),
|
||||
),
|
||||
SizedBox(
|
||||
height: 110,
|
||||
height: 40,
|
||||
),
|
||||
CircularPercentIndicator(
|
||||
radius: 250.0,
|
||||
radius: 200.0,
|
||||
animation: true,
|
||||
animationDuration: 4800,
|
||||
lineWidth: 20.0,
|
||||
|
||||
@@ -327,8 +327,8 @@ class _ExerciseControlPage extends State<ExerciseControlPage> with Trans {
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
padding: EdgeInsets.all(0),
|
||||
primary: Colors.white,
|
||||
onSurface: Colors.blueAccent,
|
||||
foregroundColor: Colors.white,
|
||||
disabledForegroundColor: Colors.blueAccent,
|
||||
),
|
||||
onPressed: () {
|
||||
exerciseBloc.add(ExerciseControlSubmit(step: step));
|
||||
|
||||
@@ -47,7 +47,7 @@ class _MyDevelopmentMuscleState extends State<MyDevelopmentMusclePage> with Comm
|
||||
}
|
||||
|
||||
/// We require the initializers to run after the loading screen is rendered
|
||||
SchedulerBinding.instance!.addPostFrameCallback((_) {
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||
BlocProvider.of<DevelopmentByMuscleBloc>(context).add(DevelopmentByMuscleLoad());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -66,7 +66,10 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
|
||||
text: t("My Training Logs"),
|
||||
style: GoogleFonts.robotoMono(
|
||||
textStyle: TextStyle(
|
||||
fontSize: 14, color: Colors.white, fontWeight: FontWeight.bold, backgroundColor: Colors.black54.withOpacity(0.4))),
|
||||
fontSize: 14,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
backgroundColor: Colors.black54.withOpacity(0.4))),
|
||||
image: "asset/image/edzesnaplom400400.jpg",
|
||||
left: 5,
|
||||
onTap: () => Navigator.of(context).pushNamed('mydevelopmentLog', arguments: args),
|
||||
@@ -186,7 +189,8 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
|
||||
onTap: () => {Navigator.of(context).pushNamed('mydevelopmentMusclePage', arguments: args)},
|
||||
isLocked: true,
|
||||
))),
|
||||
developmentWidget(imageWidth, t("Development of My Sizes"), "asset/image/sizes_q.jpg", TrackingEvent.my_size_development, args),
|
||||
developmentWidget(
|
||||
imageWidth, t("Development of My Sizes"), "asset/image/sizes_q.jpg", TrackingEvent.my_size_development, args),
|
||||
hiddenWidget(customerRepository, exerciseRepository),
|
||||
]),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
@@ -207,7 +211,8 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
|
||||
textAlignment: Alignment.topLeft,
|
||||
text: t(title),
|
||||
style: GoogleFonts.robotoMono(
|
||||
textStyle: TextStyle(fontSize: 14, color: Colors.white, fontWeight: FontWeight.bold, backgroundColor: Colors.black54.withOpacity(0.4))),
|
||||
textStyle:
|
||||
TextStyle(fontSize: 14, color: Colors.white, fontWeight: FontWeight.bold, backgroundColor: Colors.black54.withOpacity(0.4))),
|
||||
image: imageUrl,
|
||||
onTap: () => {
|
||||
if (Cache().userLoggedIn != null)
|
||||
@@ -240,8 +245,8 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
|
||||
return TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
padding: EdgeInsets.all(20),
|
||||
primary: Colors.white,
|
||||
onSurface: Colors.blueAccent,
|
||||
backgroundColor: Colors.white,
|
||||
disabledForegroundColor: Colors.blueAccent,
|
||||
),
|
||||
onPressed: () => {
|
||||
if (Cache().getTrainee() != null)
|
||||
|
||||
@@ -43,8 +43,8 @@ class SettingsPage extends StatelessWidget with Trans {
|
||||
child: Form(
|
||||
child: BlocConsumer<SettingsBloc, SettingsState>(listener: (context, state) {
|
||||
if (state is SettingsError) {
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(SnackBar(backgroundColor: Colors.orange, content: Text(state.message, style: TextStyle(color: Colors.white))));
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(backgroundColor: Colors.orange, content: Text(state.message, style: TextStyle(color: Colors.white))));
|
||||
} else if (state is SettingsReady) {
|
||||
menuBloc.add(MenuRecreateTree());
|
||||
Navigator.of(context).pushNamed("home");
|
||||
@@ -193,7 +193,7 @@ class SettingsPage extends StatelessWidget with Trans {
|
||||
]),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white70,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
onPressed: () => {
|
||||
Track().track(TrackingEvent.terms_of_use),
|
||||
@@ -220,7 +220,7 @@ class SettingsPage extends StatelessWidget with Trans {
|
||||
]),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white70,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
onPressed: () => {
|
||||
Track().track(TrackingEvent.data_privacy),
|
||||
@@ -247,7 +247,7 @@ class SettingsPage extends StatelessWidget with Trans {
|
||||
]),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white70,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
onPressed: () => {
|
||||
Navigator.of(context).pushNamed("faqPage"),
|
||||
@@ -290,7 +290,7 @@ class SettingsPage extends StatelessWidget with Trans {
|
||||
]),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.white70,
|
||||
onSurface: Colors.grey,
|
||||
disabledForegroundColor: Colors.grey,
|
||||
),
|
||||
onPressed: () => {
|
||||
launchMailto(),
|
||||
@@ -311,6 +311,7 @@ class SettingsPage extends StatelessWidget with Trans {
|
||||
// Use either Dart's string interpolation
|
||||
// or the toString() method.
|
||||
print("Mailto: $mailtoLink");
|
||||
await launch('$mailtoLink');
|
||||
final Uri _url = Uri.parse("$mailtoLink");
|
||||
await launchUrl(_url);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,8 +165,8 @@ class TestSetControl extends StatelessWidget with Trans {
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
padding: EdgeInsets.all(0),
|
||||
primary: Colors.white,
|
||||
onSurface: Colors.blueAccent,
|
||||
foregroundColor: Colors.white,
|
||||
disabledForegroundColor: Colors.blueAccent,
|
||||
),
|
||||
onPressed: () => {
|
||||
bloc.add(TestSetControlSubmit()),
|
||||
|
||||
@@ -316,8 +316,8 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
|
||||
getPlanDetails(plan, bloc, dayName),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
onPrimary: Colors.white,
|
||||
primary: restricted ? Colors.grey[600] : Colors.orange,
|
||||
foregroundColor: Colors.white,
|
||||
backgroundColor: restricted ? Colors.grey[600] : Colors.orange,
|
||||
),
|
||||
child: Text(t("Start")),
|
||||
onPressed: () {
|
||||
@@ -476,7 +476,8 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
|
||||
return DialogCommon(
|
||||
title: t("Dropset"),
|
||||
descriptions: t("A drop set is an advanced resistance training technique "),
|
||||
description2: t(" in which you focus on completing a set until failure - or the inability to do another repetition."),
|
||||
description2:
|
||||
t(" in which you focus on completing a set until failure - or the inability to do another repetition."),
|
||||
text: "OK",
|
||||
onTap: () => {
|
||||
Navigator.of(context).pop(),
|
||||
@@ -490,7 +491,7 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
|
||||
headerGridLinesVisibility: GridLinesVisibility.both,
|
||||
gridLinesVisibility: GridLinesVisibility.both,
|
||||
columns: [
|
||||
GridTextColumn(
|
||||
GridColumn(
|
||||
columnWidthMode: ColumnWidthMode.lastColumnFill,
|
||||
maximumWidth: 130,
|
||||
columnName: 'exerciseImage',
|
||||
@@ -507,7 +508,7 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
|
||||
textAlign: TextAlign.start,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
))),
|
||||
GridTextColumn(
|
||||
GridColumn(
|
||||
maximumWidth: 0,
|
||||
visible: false,
|
||||
columnName: 'exerciseName',
|
||||
@@ -520,7 +521,7 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
|
||||
textAlign: TextAlign.start,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
))),
|
||||
GridTextColumn(
|
||||
GridColumn(
|
||||
maximumWidth: 60,
|
||||
columnName: 'Set',
|
||||
label: Container(
|
||||
@@ -532,7 +533,7 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
|
||||
style: GoogleFonts.inter(color: Colors.white, fontWeight: FontWeight.bold),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
))),
|
||||
GridTextColumn(
|
||||
GridColumn(
|
||||
maximumWidth: 100,
|
||||
columnWidthMode: ColumnWidthMode.fill,
|
||||
columnName: 'Repeats',
|
||||
@@ -545,7 +546,7 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
|
||||
style: GoogleFonts.inter(color: Colors.white, fontWeight: FontWeight.bold),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
))),
|
||||
GridTextColumn(
|
||||
GridColumn(
|
||||
maximumWidth: 60,
|
||||
columnName: 'Weight',
|
||||
label: Container(
|
||||
|
||||
@@ -297,7 +297,7 @@ class _ExerciseListState extends State<ExerciseList> with Trans {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
animate();
|
||||
});
|
||||
super.initState();
|
||||
@@ -306,7 +306,7 @@ class _ExerciseListState extends State<ExerciseList> with Trans {
|
||||
@override
|
||||
void didUpdateWidget(ExerciseList page) {
|
||||
super.didUpdateWidget(page);
|
||||
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
animate();
|
||||
});
|
||||
}
|
||||
@@ -333,8 +333,8 @@ class _ExerciseListState extends State<ExerciseList> with Trans {
|
||||
String description2 = "";
|
||||
if (next.exerciseTypeId != detail.exerciseTypeId) {
|
||||
title = AppLocalizations.of(context)!.translate("Stop!");
|
||||
description =
|
||||
AppLocalizations.of(context)!.translate("Please continue with the next exercise in the queue:") + next.exerciseType!.nameTranslation;
|
||||
description = AppLocalizations.of(context)!.translate("Please continue with the next exercise in the queue:") +
|
||||
next.exerciseType!.nameTranslation;
|
||||
} else {
|
||||
final HashMap args = HashMap();
|
||||
args['exerciseType'] = next.exerciseType;
|
||||
@@ -388,7 +388,8 @@ class _ExerciseListState extends State<ExerciseList> with Trans {
|
||||
bloc.getMyPlan()!.days[widget.dayName]!.forEach((element) {
|
||||
if (prev == null || (prev != null && prev!.exerciseTypeId != element.exerciseTypeId)) {
|
||||
tiles.add(GestureDetector(
|
||||
onTap: () => bloc.getNext() != null ? executeExercise(bloc, bloc.getNext()!, context) : Navigator.of(context).pushNamed('home'),
|
||||
onTap: () =>
|
||||
bloc.getNext() != null ? executeExercise(bloc, bloc.getNext()!, context) : Navigator.of(context).pushNamed('home'),
|
||||
child: ExerciseTile(
|
||||
bloc: bloc,
|
||||
detail: element,
|
||||
@@ -543,7 +544,8 @@ class ExerciseTile extends StatelessWidget with Trans {
|
||||
|
||||
List<Widget> getExerciseTiles(CustomerTrainingPlanDetails detail) {
|
||||
final List<Widget> list = [];
|
||||
if (bloc.alternatives[detail.customerTrainingPlanDetailsId] != null && bloc.alternatives[detail.customerTrainingPlanDetailsId].length > 0) {
|
||||
if (bloc.alternatives[detail.customerTrainingPlanDetailsId] != null &&
|
||||
bloc.alternatives[detail.customerTrainingPlanDetailsId].length > 0) {
|
||||
int index = 0;
|
||||
for (CustomerTrainingPlanDetails alternative in bloc.alternatives[detail.customerTrainingPlanDetailsId]) {
|
||||
final Widget widget = getTile(alternative, index);
|
||||
@@ -563,7 +565,8 @@ class ExerciseTile extends StatelessWidget with Trans {
|
||||
final int step = bloc.getStep(detail);
|
||||
final int highlightStep = bloc.getHighlightStep(detail);
|
||||
final bool hasLeftAlternative = detail.alternatives.length > 0 && index > 0;
|
||||
final bool hasRightAlternative = detail.alternatives.length > 0 && index + 1 < bloc.alternatives[detail.customerTrainingPlanDetailsId].length;
|
||||
final bool hasRightAlternative =
|
||||
detail.alternatives.length > 0 && index + 1 < bloc.alternatives[detail.customerTrainingPlanDetailsId].length;
|
||||
|
||||
return Container(
|
||||
child: Stack(alignment: Alignment.centerRight, children: [
|
||||
@@ -598,7 +601,8 @@ class ExerciseTile extends StatelessWidget with Trans {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return DialogHTML(
|
||||
title: detail.exerciseType!.nameTranslation, htmlData: '<p>' + detail.exerciseType!.descriptionTranslation + '</p>');
|
||||
title: detail.exerciseType!.nameTranslation,
|
||||
htmlData: '<p>' + detail.exerciseType!.descriptionTranslation + '</p>');
|
||||
}),
|
||||
icon: Icon(
|
||||
Icons.info_outline,
|
||||
|
||||
Reference in New Issue
Block a user