updated pub
This commit is contained in:
@ -1,17 +1,43 @@
|
||||
class ActivityAction {
|
||||
ActivityAction(
|
||||
{required this.id,
|
||||
required this.title,
|
||||
required this.description,
|
||||
this.repetitions,
|
||||
this.time,
|
||||
this.weight});
|
||||
int id;
|
||||
String title;
|
||||
String description;
|
||||
Set activityActionSet;
|
||||
|
||||
final int id;
|
||||
final String title;
|
||||
final String description;
|
||||
final int? repetitions;
|
||||
final int? weight;
|
||||
// in milliseconds
|
||||
final int? time;
|
||||
ActivityAction({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.activityActionSet,
|
||||
});
|
||||
}
|
||||
|
||||
class Set {
|
||||
String type;
|
||||
int total;
|
||||
int rest;
|
||||
Reps reps;
|
||||
|
||||
Set({
|
||||
required this.type,
|
||||
required this.total,
|
||||
required this.rest,
|
||||
required this.reps,
|
||||
});
|
||||
}
|
||||
|
||||
class Reps {
|
||||
String type;
|
||||
List<int> tempo;
|
||||
List<int> amounts;
|
||||
List<int> weights;
|
||||
int rest;
|
||||
|
||||
Reps({
|
||||
required this.type,
|
||||
required this.tempo,
|
||||
required this.amounts,
|
||||
required this.weights,
|
||||
required this.rest,
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Media {
|
||||
Media(
|
||||
|
@ -21,12 +21,12 @@ class _ActivitiesHeaderState extends State<ActivitiesHeader> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
return const Padding(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const <Widget>[
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||
child: Text(
|
||||
|
@ -14,11 +14,22 @@ class ActivityCard extends StatelessWidget {
|
||||
actions: List.generate(
|
||||
10,
|
||||
(i) => ActivityAction(
|
||||
id: 1,
|
||||
title: 'exercise',
|
||||
description: 'description',
|
||||
repetitions: 5,
|
||||
time: 5200)));
|
||||
id: 1,
|
||||
title: 'test action',
|
||||
description:'test description',
|
||||
activityActionSet: Set(
|
||||
type: 'drop_set',
|
||||
total: 3,
|
||||
rest: 3000,
|
||||
reps: Reps(
|
||||
type: 'count',
|
||||
tempo: [2,3,5],
|
||||
amounts: [5,3,2],
|
||||
weights: [50,70,80],
|
||||
rest: 200
|
||||
)
|
||||
)
|
||||
),));
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -9,7 +9,7 @@ class MediaCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
YoutubePlayerController _controller = YoutubePlayerController(
|
||||
YoutubePlayerController controller = YoutubePlayerController(
|
||||
initialVideoId: media.reference,
|
||||
flags: const YoutubePlayerFlags(
|
||||
autoPlay: false, mute: true, showLiveFullscreenButton: false));
|
||||
@ -31,7 +31,7 @@ class MediaCard extends StatelessWidget {
|
||||
return Image(image: NetworkImage(media.reference));
|
||||
} else if (media.type == "youtube") {
|
||||
return YoutubePlayer(
|
||||
controller: _controller,
|
||||
controller: controller,
|
||||
aspectRatio: 16 / 9,
|
||||
);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class SessionCard extends StatelessWidget {
|
||||
|
||||
Color color = (state == 0)
|
||||
? const Color(0xff3A5FB6)
|
||||
: ThemeData.dark(useMaterial3: true).colorScheme.background;
|
||||
: ThemeData.dark(useMaterial3: true).colorScheme.surface;
|
||||
|
||||
// place holder until we can retrieve real data
|
||||
final data = SessionModel(
|
||||
@ -38,32 +38,22 @@ class SessionCard extends StatelessWidget {
|
||||
"Campus board session, focussing on explosiveness and contact strength.",
|
||||
actions: [
|
||||
ActivityAction(
|
||||
id: 1,
|
||||
title: '1, 3, 5 - left hand start',
|
||||
description:
|
||||
'move from rungs 1, 3, and 5, alternating arms on each movement',
|
||||
repetitions: 1),
|
||||
ActivityAction(
|
||||
id: 2,
|
||||
title: 'Rest',
|
||||
description: 'rest for alotted time',
|
||||
time: 15000),
|
||||
ActivityAction(
|
||||
id: 3,
|
||||
title: '1, 3, 5 - right hand start',
|
||||
description:
|
||||
'move from rungs 1, 3, and 5, alternating arms on each movement',
|
||||
repetitions: 1),
|
||||
ActivityAction(
|
||||
id: 4,
|
||||
title: 'Rest',
|
||||
description: 'rest for alotted time',
|
||||
time: 300000),
|
||||
ActivityAction(
|
||||
id: 5,
|
||||
title: 'Repeat',
|
||||
description: 'repeat cycle',
|
||||
repetitions: 5)
|
||||
id: 1,
|
||||
title: 'test action',
|
||||
description:'test description',
|
||||
activityActionSet: Set(
|
||||
type: 'drop_set',
|
||||
total: 3,
|
||||
rest: 3000,
|
||||
reps: Reps(
|
||||
type: 'count',
|
||||
tempo: [2,3,5],
|
||||
amounts: [5,3,2],
|
||||
weights: [50,70,80],
|
||||
rest: 200
|
||||
)
|
||||
)
|
||||
),
|
||||
],
|
||||
resources: ['https://www.youtube.com/watch?v=bLz0xp1PEm4']),
|
||||
ActivityModel(
|
||||
@ -75,20 +65,22 @@ class SessionCard extends StatelessWidget {
|
||||
"Session focussed on attempting a climb at or beyond your perceived limit.",
|
||||
actions: [
|
||||
ActivityAction(
|
||||
id: 1,
|
||||
title: 'attempt boulder',
|
||||
description: 'attempt boulder project',
|
||||
repetitions: 1),
|
||||
ActivityAction(
|
||||
id: 2,
|
||||
title: 'Rest',
|
||||
description: 'rest for alotted time',
|
||||
time: 300000),
|
||||
ActivityAction(
|
||||
id: 5,
|
||||
title: 'Repeat',
|
||||
description: 'repeat cycle',
|
||||
repetitions: 5)
|
||||
id: 1,
|
||||
title: 'test action',
|
||||
description:'test description',
|
||||
activityActionSet: Set(
|
||||
type: 'drop_set',
|
||||
total: 3,
|
||||
rest: 3000,
|
||||
reps: Reps(
|
||||
type: 'count',
|
||||
tempo: [2,3,5],
|
||||
amounts: [5,3,2],
|
||||
weights: [50,70,80],
|
||||
rest: 200
|
||||
)
|
||||
)
|
||||
),
|
||||
],
|
||||
resources: ['https://www.youtube.com/watch?v=dyAvbUvY_PU']),
|
||||
ActivityModel(
|
||||
@ -100,21 +92,22 @@ class SessionCard extends StatelessWidget {
|
||||
"Weight pullups to increase strength and maximal pulling force.",
|
||||
actions: [
|
||||
ActivityAction(
|
||||
id: 1,
|
||||
title: 'pull ups',
|
||||
description: 'pull ups',
|
||||
repetitions: 5,
|
||||
weight: 100),
|
||||
ActivityAction(
|
||||
id: 2,
|
||||
title: 'Rest',
|
||||
description: 'rest for alotted time',
|
||||
time: 300000),
|
||||
ActivityAction(
|
||||
id: 5,
|
||||
title: 'Repeat',
|
||||
description: 'repeat cycle',
|
||||
repetitions: 5)
|
||||
id: 1,
|
||||
title: 'test action',
|
||||
description:'test description',
|
||||
activityActionSet: Set(
|
||||
type: 'drop_set',
|
||||
total: 3,
|
||||
rest: 3000,
|
||||
reps: Reps(
|
||||
type: 'count',
|
||||
tempo: [2,3,5],
|
||||
amounts: [5,3,2],
|
||||
weights: [50,70,80],
|
||||
rest: 200
|
||||
)
|
||||
)
|
||||
),
|
||||
],
|
||||
resources: ['https://www.youtube.com/watch?v=dyAvbUvY_PU']),
|
||||
],
|
||||
|
Reference in New Issue
Block a user