Compare commits
58
Commits
ea1cb1da76
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3983366408 | ||
|
|
3ba7458056 | ||
|
|
a3d7e651f4 | ||
|
|
8678e935df | ||
|
|
9aed2b3ac1 | ||
|
|
6908623ba2 | ||
|
|
a9486727b2 | ||
|
|
e4ba71ad4b | ||
|
|
202ec599d6 | ||
|
|
fbffc0cf4a | ||
|
|
19f9dd9b3b | ||
|
|
b6a73c398e | ||
|
|
c5a209d41e | ||
|
|
852d28afcf | ||
|
|
dac65c8390 | ||
|
|
98991a3d02 | ||
|
|
36b8ce37ad | ||
|
|
7642c6faf2 | ||
|
|
b617724f0a | ||
|
|
4a83465d82 | ||
|
|
a383ebfe34 | ||
|
|
e0302e63e2 | ||
|
|
af3fd69688 | ||
|
|
738a48438e | ||
|
|
2849cec682 | ||
|
|
2544a3de9f | ||
|
|
4aa6926f5c | ||
|
|
cbb2e2c4b0 | ||
|
|
4097a79205 | ||
|
|
0eaac20e7e | ||
|
|
ea745c1cec | ||
|
|
fb278e4487 | ||
|
|
de926bce0e | ||
|
|
6810b84310 | ||
|
|
83da62b5d9 | ||
|
|
b085d3bfb6 | ||
|
|
2a1eb9d07f | ||
|
|
8fb58a4db1 | ||
|
|
e6ba3f1a1c | ||
|
|
305ecd20eb | ||
|
|
da59790796 | ||
|
|
11eff63314 | ||
|
|
3978359dc4 | ||
|
|
e593639217 | ||
|
|
74b25e4e8f | ||
|
|
69f7e0c87b | ||
|
|
4e2ca56a69 | ||
|
|
0a7675797b | ||
|
|
8bda4d593d | ||
|
|
f11ade393a | ||
|
|
59c9c539d2 | ||
|
|
1445c19933 | ||
|
|
e834499644 | ||
|
|
0f7d938ad7 | ||
|
|
b1c7fc8882 | ||
|
|
7c71f5fa3e | ||
|
|
ff9f3263ae | ||
|
|
b58b877bb0 |
Vendored
+25
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "fmassive",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fmassive (profile mode)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "profile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fmassive (release mode)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+2
-25
@@ -1,30 +1,7 @@
|
|||||||
# This file configures the analyzer, which statically analyzes Dart code to
|
|
||||||
# check for errors, warnings, and lints.
|
|
||||||
#
|
|
||||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
|
||||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
|
||||||
# invoked from the command line by running `flutter analyze`.
|
|
||||||
|
|
||||||
# The following line activates a set of recommended lints for Flutter apps,
|
|
||||||
# packages, and plugins designed to encourage good coding practices.
|
|
||||||
include: package:flutter_lints/flutter.yaml
|
include: package:flutter_lints/flutter.yaml
|
||||||
|
|
||||||
linter:
|
linter:
|
||||||
# The lint rules applied to this project can be customized in the
|
|
||||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
|
||||||
# included above or to enable additional rules. A list of all available lints
|
|
||||||
# and their documentation is published at
|
|
||||||
# https://dart-lang.github.io/linter/lints/index.html.
|
|
||||||
#
|
|
||||||
# Instead of disabling a lint rule for the entire project in the
|
|
||||||
# section below, it can also be suppressed for a single line of code
|
|
||||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
|
||||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
|
||||||
# producing the lint.
|
|
||||||
rules:
|
rules:
|
||||||
curly_braces_in_flow_control_structures: false
|
curly_braces_in_flow_control_structures: false
|
||||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
avoid_print: false
|
||||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
require_trailing_commas: true
|
||||||
|
|
||||||
# Additional information about this file can be found at
|
|
||||||
# https://dart.dev/guides/language/analysis-options
|
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ subprojects {
|
|||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(':app')
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
const List<String> weekdayNames = [
|
||||||
|
'Monday',
|
||||||
|
'Tuesday',
|
||||||
|
'Wednesday',
|
||||||
|
'Thursday',
|
||||||
|
'Friday',
|
||||||
|
'Saturday',
|
||||||
|
'Sunday',
|
||||||
|
];
|
||||||
+6
-7
@@ -1,7 +1,8 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:fmassive/gym_set.dart';
|
import 'package:fmassive/gym_sets.dart';
|
||||||
import 'package:fmassive/main.dart';
|
import 'package:fmassive/main.dart';
|
||||||
|
import 'package:fmassive/plans.dart';
|
||||||
import 'package:moor/ffi.dart';
|
import 'package:moor/ffi.dart';
|
||||||
import 'package:moor/moor.dart';
|
import 'package:moor/moor.dart';
|
||||||
import 'package:path/path.dart';
|
import 'package:path/path.dart';
|
||||||
@@ -11,7 +12,7 @@ import 'settings.dart';
|
|||||||
|
|
||||||
part 'database.g.dart';
|
part 'database.g.dart';
|
||||||
|
|
||||||
@UseMoor(tables: [Settings, GymSets])
|
@UseMoor(tables: [Settings, GymSets, Plans])
|
||||||
class MyDatabase extends _$MyDatabase {
|
class MyDatabase extends _$MyDatabase {
|
||||||
MyDatabase() : super(_openConnection());
|
MyDatabase() : super(_openConnection());
|
||||||
|
|
||||||
@@ -21,13 +22,12 @@ class MyDatabase extends _$MyDatabase {
|
|||||||
@override
|
@override
|
||||||
MigrationStrategy get migration => MigrationStrategy(
|
MigrationStrategy get migration => MigrationStrategy(
|
||||||
onCreate: (Migrator m) async {
|
onCreate: (Migrator m) async {
|
||||||
|
print('Creating...');
|
||||||
await m.createAll();
|
await m.createAll();
|
||||||
var data = await db.select(db.settings).get();
|
var data = await (db.select(db.settings)..limit(1)).get();
|
||||||
if (data.isEmpty) await db.into(db.settings).insert(defaultSettings);
|
if (data.isEmpty) await db.into(db.settings).insert(defaultSettings);
|
||||||
},
|
},
|
||||||
onUpgrade: (Migrator m, int from, int to) async {
|
onUpgrade: (Migrator m, int from, int to) async {},
|
||||||
// no migrations yet
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,7 +35,6 @@ LazyDatabase _openConnection() {
|
|||||||
return LazyDatabase(() async {
|
return LazyDatabase(() async {
|
||||||
final dbFolder = await getDatabasesPath();
|
final dbFolder = await getDatabasesPath();
|
||||||
final file = File(join(dbFolder, 'massive.db'));
|
final file = File(join(dbFolder, 'massive.db'));
|
||||||
print('file.path=${file.path}');
|
|
||||||
return VmDatabase(file, logStatements: true);
|
return VmDatabase(file, logStatements: true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+713
-499
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,51 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:fmassive/main.dart';
|
||||||
|
import 'package:moor/moor.dart';
|
||||||
|
|
||||||
|
class DeleteAllSets extends StatelessWidget {
|
||||||
|
const DeleteAllSets({
|
||||||
|
super.key,
|
||||||
|
required this.mounted,
|
||||||
|
});
|
||||||
|
|
||||||
|
final bool mounted;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Center(
|
||||||
|
child: ElevatedButton(
|
||||||
|
child: const Text("Delete all sets"),
|
||||||
|
onPressed: () async {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: const Text("Delete all sets"),
|
||||||
|
content: const Text(
|
||||||
|
"This will irreversibly destroy all your gym set data. Are you sure?",),
|
||||||
|
actions: <Widget>[
|
||||||
|
ElevatedButton(
|
||||||
|
child: const Text('Cancel'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
child: const Text('Delete'),
|
||||||
|
onPressed: () async {
|
||||||
|
await db.gymSets.delete().go();
|
||||||
|
if (!mounted) return;
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text('Deleted all sets')),);
|
||||||
|
final navigator = Navigator.of(context);
|
||||||
|
navigator.pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,8 +7,8 @@ class DynamicColorScheme extends StatefulWidget {
|
|||||||
const DynamicColorScheme({
|
const DynamicColorScheme({
|
||||||
required this.data,
|
required this.data,
|
||||||
required this.builder,
|
required this.builder,
|
||||||
Key? key,
|
super.key,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _DynamicColorSchemeState();
|
createState() => _DynamicColorSchemeState();
|
||||||
@@ -46,7 +46,7 @@ class _DynamicColorSchemeState extends State<DynamicColorScheme> {
|
|||||||
context,
|
context,
|
||||||
colorScheme.copyWith(
|
colorScheme.copyWith(
|
||||||
primary: color,
|
primary: color,
|
||||||
));
|
),);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,192 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/material.dart' as material;
|
||||||
|
import 'package:fmassive/constants.dart';
|
||||||
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/main.dart';
|
||||||
|
import 'package:moor_flutter/moor_flutter.dart';
|
||||||
|
|
||||||
|
class EditPlanPage extends StatefulWidget {
|
||||||
|
final PlansCompanion plan;
|
||||||
|
|
||||||
|
const EditPlanPage({required this.plan, super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
createState() => _EditPlanPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EditPlanPageState extends State<EditPlanPage> {
|
||||||
|
List<String?> names = [];
|
||||||
|
List<bool>? daySelections;
|
||||||
|
List<bool>? exerciseSelections;
|
||||||
|
|
||||||
|
Future<List<String?>> getDistinctNames() async {
|
||||||
|
final names = await (db.gymSets.selectOnly(distinct: true)
|
||||||
|
..addColumns([db.gymSets.name]))
|
||||||
|
.get();
|
||||||
|
return names.map((name) => name.read(db.gymSets.name)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
final dayList = widget.plan.days.value.split(',');
|
||||||
|
daySelections = weekdayNames.map((day) => dayList.contains(day)).toList();
|
||||||
|
|
||||||
|
getDistinctNames().then((value) {
|
||||||
|
setState(() {
|
||||||
|
names = value;
|
||||||
|
final exercises = widget.plan.exercises.value.split(',');
|
||||||
|
exerciseSelections =
|
||||||
|
names.map((name) => exercises.contains(name)).toList();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
dispose() {
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<bool?> _showConfirmationDialog(BuildContext context) {
|
||||||
|
return showDialog<bool>(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: false,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: const Text('Confirm Delete'),
|
||||||
|
content: const Text('Are you sure you want to delete this plan?'),
|
||||||
|
actions: <Widget>[
|
||||||
|
ElevatedButton(
|
||||||
|
child: const Text('Yes'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context, true); // showDialog() returns true
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
child: const Text('No'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context, false); // showDialog() returns false
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
List<Widget> actions = [];
|
||||||
|
if (widget.plan.id.present)
|
||||||
|
actions.add(
|
||||||
|
IconButton(
|
||||||
|
onPressed: () async {
|
||||||
|
bool? confirm = await _showConfirmationDialog(context);
|
||||||
|
if (!confirm!) return;
|
||||||
|
await db.plans.deleteOne(widget.plan);
|
||||||
|
if (!mounted) return;
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.delete),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
return SafeArea(
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: AppBar(title: const Text('Edit Plan'), actions: actions),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: material.Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: getChildren,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
onPressed: () async {
|
||||||
|
final days = [];
|
||||||
|
for (int i = 0; i < daySelections!.length; i++) {
|
||||||
|
if (daySelections![i]) days.add(weekdayNames[i]);
|
||||||
|
}
|
||||||
|
if (days.isEmpty) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text('Select days first')),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final exercises = [];
|
||||||
|
for (int i = 0; i < exerciseSelections!.length; i++) {
|
||||||
|
if (exerciseSelections![i]) exercises.add(names[i]);
|
||||||
|
}
|
||||||
|
if (exercises.isEmpty) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text('Select exercises first')),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newPlan = widget.plan.copyWith(
|
||||||
|
days: Value(days.join(',')),
|
||||||
|
exercises: Value(exercises.join(',')),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (widget.plan.id.present)
|
||||||
|
await db.update(db.plans).replace(newPlan);
|
||||||
|
else {
|
||||||
|
final id = await db.into(db.plans).insert(newPlan);
|
||||||
|
newPlan = newPlan.copyWith(id: Value(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mounted) return;
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: const Icon(Icons.check),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Widget> get getChildren {
|
||||||
|
final List<Widget> children = [
|
||||||
|
Text('Days', style: Theme.of(context).textTheme.headlineSmall),
|
||||||
|
];
|
||||||
|
|
||||||
|
final days = List.generate(7, (index) {
|
||||||
|
return SwitchListTile(
|
||||||
|
title: Text(weekdayNames[index]),
|
||||||
|
value: daySelections![index],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
daySelections![index] = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
final exercises = List.generate(names.length, (index) {
|
||||||
|
return SwitchListTile(
|
||||||
|
title: Text(names[index] ?? ''),
|
||||||
|
value: exerciseSelections![index],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
exerciseSelections![index] = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
children.addAll(days);
|
||||||
|
children.add(
|
||||||
|
Text('Exercises', style: Theme.of(context).textTheme.headlineSmall),
|
||||||
|
);
|
||||||
|
children.addAll(exercises);
|
||||||
|
|
||||||
|
return [
|
||||||
|
Expanded(
|
||||||
|
child: ListView(
|
||||||
|
children: children,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
+26
-12
@@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:fmassive/database.dart';
|
import 'package:fmassive/database.dart';
|
||||||
import 'package:fmassive/main.dart';
|
import 'package:fmassive/main.dart';
|
||||||
import 'package:moor_flutter/moor_flutter.dart';
|
import 'package:moor_flutter/moor_flutter.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
class EditGymSetPage extends StatefulWidget {
|
class EditGymSetPage extends StatefulWidget {
|
||||||
final GymSetsCompanion gymSet;
|
final GymSetsCompanion gymSet;
|
||||||
@@ -26,12 +27,15 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
gymSet = widget.gymSet;
|
gymSet = widget.gymSet;
|
||||||
|
print(gymSet);
|
||||||
_nameController.text = gymSet.name.value;
|
_nameController.text = gymSet.name.value;
|
||||||
_repsController.text = gymSet.reps.value.toString();
|
_repsController.text = gymSet.reps.value.toString();
|
||||||
_weightController.text = gymSet.weight.value.toString();
|
_weightController.text = gymSet.weight.value.toString();
|
||||||
if (gymSet.id.present)
|
if (gymSet.id.present) {
|
||||||
repsNode.requestFocus();
|
repsNode.requestFocus();
|
||||||
else
|
_repsController.selection = TextSelection(
|
||||||
|
baseOffset: 0, extentOffset: _repsController.text.length,);
|
||||||
|
} else
|
||||||
nameNode.requestFocus();
|
nameNode.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,9 +56,10 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.delete)));
|
icon: const Icon(Icons.delete),),);
|
||||||
|
|
||||||
return Scaffold(
|
return SafeArea(
|
||||||
|
child: Scaffold(
|
||||||
appBar: AppBar(title: const Text('Edit Gym Set'), actions: actions),
|
appBar: AppBar(title: const Text('Edit Gym Set'), actions: actions),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
@@ -67,7 +72,7 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||||||
decoration: const InputDecoration(labelText: 'Name'),
|
decoration: const InputDecoration(labelText: 'Name'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_nameController.selection = TextSelection(
|
_nameController.selection = TextSelection(
|
||||||
baseOffset: 0, extentOffset: _nameController.text.length);
|
baseOffset: 0, extentOffset: _nameController.text.length,);
|
||||||
},
|
},
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -80,7 +85,7 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||||||
focusNode: repsNode,
|
focusNode: repsNode,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_repsController.selection = TextSelection(
|
_repsController.selection = TextSelection(
|
||||||
baseOffset: 0, extentOffset: _repsController.text.length);
|
baseOffset: 0, extentOffset: _repsController.text.length,);
|
||||||
},
|
},
|
||||||
decoration: const InputDecoration(labelText: 'Reps'),
|
decoration: const InputDecoration(labelText: 'Reps'),
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
@@ -97,12 +102,12 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_weightController.selection = TextSelection(
|
_weightController.selection = TextSelection(
|
||||||
baseOffset: 0, extentOffset: _weightController.text.length);
|
baseOffset: 0, extentOffset: _weightController.text.length,);
|
||||||
},
|
},
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
gymSet =
|
gymSet = gymSet.copyWith(
|
||||||
gymSet.copyWith(weight: Value(int.tryParse(value) ?? 0));
|
weight: Value(double.tryParse(value) ?? 0),);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -111,10 +116,19 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
if (_nameController.text.isEmpty) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text('Please enter a name')),);
|
||||||
|
nameNode.requestFocus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (gymSet.id.present)
|
if (gymSet.id.present)
|
||||||
await db.update(db.gymSets).write(gymSet);
|
await db.update(db.gymSets).replace(gymSet);
|
||||||
else {
|
else {
|
||||||
await db.into(db.gymSets).insert(gymSet);
|
await Permission.notification.request();
|
||||||
|
final newSet = gymSet.copyWith(
|
||||||
|
created: Value(DateTime.now().toIso8601String()),);
|
||||||
|
await db.into(db.gymSets).insert(newSet);
|
||||||
const platform = MethodChannel('com.massive/android');
|
const platform = MethodChannel('com.massive/android');
|
||||||
platform.invokeMethod('timer', [3000]);
|
platform.invokeMethod('timer', [3000]);
|
||||||
}
|
}
|
||||||
@@ -123,6 +137,6 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||||||
},
|
},
|
||||||
child: const Icon(Icons.check),
|
child: const Icon(Icons.check),
|
||||||
),
|
),
|
||||||
);
|
),);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ class GymSets extends Table {
|
|||||||
IntColumn get id => integer().autoIncrement()();
|
IntColumn get id => integer().autoIncrement()();
|
||||||
TextColumn get name => text()();
|
TextColumn get name => text()();
|
||||||
IntColumn get reps => integer()();
|
IntColumn get reps => integer()();
|
||||||
IntColumn get weight => integer()();
|
RealColumn get weight => real()();
|
||||||
IntColumn get sets => integer().withDefault(const Constant(3))();
|
IntColumn get sets => integer().withDefault(const Constant(3))();
|
||||||
IntColumn get minutes => integer().withDefault(const Constant(3))();
|
IntColumn get minutes => integer().withDefault(const Constant(3))();
|
||||||
IntColumn get seconds => integer().withDefault(const Constant(30))();
|
IntColumn get seconds => integer().withDefault(const Constant(30))();
|
||||||
BoolColumn get hidden => boolean().withDefault(const Constant(false))();
|
BoolColumn get hidden =>
|
||||||
|
boolean().nullable().withDefault(const Constant(false))();
|
||||||
TextColumn get created => text()();
|
TextColumn get created => text()();
|
||||||
TextColumn get unit => text().withDefault(const Constant('kg'))();
|
TextColumn get unit => text().withDefault(const Constant('kg'))();
|
||||||
TextColumn get image => text()();
|
TextColumn get image => text().nullable()();
|
||||||
TextColumn get steps => text().nullable()();
|
TextColumn get steps => text().nullable()();
|
||||||
}
|
}
|
||||||
+10
-96
@@ -1,22 +1,19 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fmassive/best_page.dart';
|
import 'package:fmassive/best_page.dart';
|
||||||
import 'package:fmassive/database.dart';
|
|
||||||
import 'package:fmassive/edit_set.dart';
|
|
||||||
import 'package:fmassive/main.dart';
|
|
||||||
import 'package:fmassive/plans_page.dart';
|
import 'package:fmassive/plans_page.dart';
|
||||||
|
import 'package:fmassive/set_list.dart';
|
||||||
import 'package:fmassive/settings_page.dart';
|
import 'package:fmassive/settings_page.dart';
|
||||||
import 'package:fmassive/timer_page.dart';
|
import 'package:fmassive/timer_page.dart';
|
||||||
import 'package:fmassive/workouts_page.dart';
|
import 'package:fmassive/workouts_page.dart';
|
||||||
import 'package:moor_flutter/moor_flutter.dart';
|
|
||||||
|
|
||||||
class HomePage extends StatefulWidget {
|
class HomePage extends StatefulWidget {
|
||||||
const HomePage({super.key});
|
const HomePage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => RootPage();
|
createState() => _HomePage();
|
||||||
}
|
}
|
||||||
|
|
||||||
class RootPage extends State<HomePage> {
|
class _HomePage extends State<HomePage> {
|
||||||
bool showSearch = false;
|
bool showSearch = false;
|
||||||
int selected = 0;
|
int selected = 0;
|
||||||
String search = '';
|
String search = '';
|
||||||
@@ -42,7 +39,7 @@ class RootPage extends State<HomePage> {
|
|||||||
Widget getBody() {
|
Widget getBody() {
|
||||||
switch (routes[selected]['title']) {
|
switch (routes[selected]['title']) {
|
||||||
case 'Settings':
|
case 'Settings':
|
||||||
return const SettingsPage();
|
return SettingsPage(search: search);
|
||||||
case 'Timer':
|
case 'Timer':
|
||||||
return const TimerPage();
|
return const TimerPage();
|
||||||
case 'Workouts':
|
case 'Workouts':
|
||||||
@@ -50,15 +47,17 @@ class RootPage extends State<HomePage> {
|
|||||||
case 'Best':
|
case 'Best':
|
||||||
return const BestPage();
|
return const BestPage();
|
||||||
case 'Plans':
|
case 'Plans':
|
||||||
return const PlansPage();
|
return PlansPage(search: search);
|
||||||
default:
|
default:
|
||||||
return _HomePageWidget(search: search);
|
return SetList(search: search);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return SafeArea(
|
||||||
|
child: Scaffold(
|
||||||
|
drawerEdgeDragWidth: 200.0,
|
||||||
drawer: Drawer(
|
drawer: Drawer(
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: routes.length,
|
itemCount: routes.length,
|
||||||
@@ -102,91 +101,6 @@ class RootPage extends State<HomePage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: getBody(),
|
body: getBody(),
|
||||||
);
|
),);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _HomePageWidget extends StatefulWidget {
|
|
||||||
final String search;
|
|
||||||
|
|
||||||
const _HomePageWidget({Key? key, required this.search}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
createState() => _HomePage();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _HomePage extends State<_HomePageWidget> {
|
|
||||||
bool showSearch = false;
|
|
||||||
late Stream<List<GymSet>> stream;
|
|
||||||
|
|
||||||
@override
|
|
||||||
initState() {
|
|
||||||
super.initState();
|
|
||||||
setStream();
|
|
||||||
}
|
|
||||||
|
|
||||||
void setStream() {
|
|
||||||
stream = (db.select(db.gymSets)
|
|
||||||
..where((gymSet) => gymSet.name.contains(widget.search))
|
|
||||||
..limit(10, offset: 0))
|
|
||||||
.watch();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
didUpdateWidget(covariant _HomePageWidget oldWidget) {
|
|
||||||
super.didUpdateWidget(oldWidget);
|
|
||||||
setStream();
|
|
||||||
}
|
|
||||||
|
|
||||||
void toggleSearch() {
|
|
||||||
setState(() {
|
|
||||||
showSearch = !showSearch;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
body: StreamBuilder<List<GymSet>>(
|
|
||||||
stream: stream,
|
|
||||||
builder: (context, snapshot) {
|
|
||||||
final gymSets = snapshot.data;
|
|
||||||
|
|
||||||
if (gymSets == null)
|
|
||||||
return const Center(child: CircularProgressIndicator());
|
|
||||||
|
|
||||||
return ListView.builder(
|
|
||||||
itemCount: gymSets.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
return ListTile(
|
|
||||||
title: Text(gymSets[index].name),
|
|
||||||
onTap: () async {
|
|
||||||
await Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => EditGymSetPage(
|
|
||||||
gymSet: gymSets[index].toCompanion(false)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
floatingActionButton: FloatingActionButton(
|
|
||||||
onPressed: () async {
|
|
||||||
await Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => EditGymSetPage(
|
|
||||||
gymSet: GymSetsCompanion(
|
|
||||||
name: const Value(''),
|
|
||||||
reps: const Value(0),
|
|
||||||
weight: const Value(0),
|
|
||||||
image: const Value(''),
|
|
||||||
created: Value(DateTime.now().toString()))),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: const Icon(Icons.add)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-12
@@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fmassive/database.dart';
|
import 'package:fmassive/database.dart';
|
||||||
import 'package:fmassive/edit_set.dart';
|
|
||||||
import 'package:fmassive/home_page.dart';
|
import 'package:fmassive/home_page.dart';
|
||||||
|
|
||||||
MyDatabase db = MyDatabase();
|
MyDatabase db = MyDatabase();
|
||||||
@@ -10,26 +9,18 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
MyApp({Key? key}) : super(key: key);
|
MyApp({super.key});
|
||||||
|
|
||||||
final navigatorKey = GlobalKey<NavigatorState>();
|
final navigatorKey = GlobalKey<NavigatorState>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const edit = EditGymSetPage(gymSet: GymSetsCompanion());
|
|
||||||
|
|
||||||
final Map<String, WidgetBuilder> routes = {
|
|
||||||
'/home': (context) => const HomePage(),
|
|
||||||
'/edit-set': (context) => edit,
|
|
||||||
};
|
|
||||||
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Gym App',
|
title: 'Massive',
|
||||||
themeMode: ThemeMode.system,
|
themeMode: ThemeMode.system,
|
||||||
|
home: const HomePage(),
|
||||||
darkTheme: ThemeData.dark(),
|
darkTheme: ThemeData.dark(),
|
||||||
theme: ThemeData.light(),
|
theme: ThemeData.light(),
|
||||||
initialRoute: '/home',
|
|
||||||
routes: routes,
|
|
||||||
navigatorKey: navigatorKey,
|
navigatorKey: navigatorKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:fmassive/constants.dart';
|
||||||
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/plan_tile.dart';
|
||||||
|
|
||||||
|
class PlanList extends StatelessWidget {
|
||||||
|
const PlanList({
|
||||||
|
super.key,
|
||||||
|
required this.plans,
|
||||||
|
});
|
||||||
|
|
||||||
|
final List<Plan> plans;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final weekday = weekdayNames[DateTime.now().weekday - 1];
|
||||||
|
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: plans.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return PlanTile(plan: plans[index], weekday: weekday);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/edit_plan.dart';
|
||||||
|
import 'package:fmassive/main.dart';
|
||||||
|
import 'package:fmassive/start_plan.dart';
|
||||||
|
import 'package:moor_flutter/moor_flutter.dart';
|
||||||
|
|
||||||
|
class PlanTile extends StatelessWidget {
|
||||||
|
PlanTile({
|
||||||
|
super.key,
|
||||||
|
required this.plan,
|
||||||
|
required this.weekday,
|
||||||
|
});
|
||||||
|
|
||||||
|
final Plan plan;
|
||||||
|
final String weekday;
|
||||||
|
final tapPosition = GlobalKey();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MenuAnchor(
|
||||||
|
menuChildren: [
|
||||||
|
MenuItemButton(
|
||||||
|
child: const Text("Edit"),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) =>
|
||||||
|
EditPlanPage(plan: plan.toCompanion(false)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
MenuItemButton(
|
||||||
|
onPressed: () async {
|
||||||
|
await db.plans.deleteOne(plan);
|
||||||
|
},
|
||||||
|
child: const Text("Delete"),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
builder: (context, controller, child) {
|
||||||
|
return ListTile(
|
||||||
|
title: Text(
|
||||||
|
plan.days.replaceAll(',', ', '),
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: plan.days.contains(weekday) ? FontWeight.bold : null,
|
||||||
|
decoration:
|
||||||
|
plan.days.contains(weekday) ? TextDecoration.underline : null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
subtitle: Text(plan.exercises),
|
||||||
|
onLongPress: () {
|
||||||
|
controller.open();
|
||||||
|
},
|
||||||
|
onTap: () async {
|
||||||
|
await Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => StartPlan(plan: plan.toCompanion(false)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import 'package:moor/moor.dart';
|
||||||
|
|
||||||
|
class Plans extends Table {
|
||||||
|
IntColumn get id => integer().autoIncrement()();
|
||||||
|
TextColumn get days => text()();
|
||||||
|
TextColumn get exercises => text()();
|
||||||
|
}
|
||||||
+56
-123
@@ -1,163 +1,96 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/material.dart' as material;
|
|
||||||
import 'package:fmassive/database.dart';
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/edit_plan.dart';
|
||||||
import 'package:fmassive/main.dart';
|
import 'package:fmassive/main.dart';
|
||||||
import 'package:fmassive/settings.dart';
|
import 'package:fmassive/plan_list.dart';
|
||||||
import 'package:moor/moor.dart';
|
import 'package:moor/moor.dart';
|
||||||
|
|
||||||
class PlansPage extends StatelessWidget {
|
class PlansPage extends StatelessWidget {
|
||||||
const PlansPage({super.key});
|
const PlansPage({super.key, required this.search});
|
||||||
|
|
||||||
|
final String search;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return const Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: _PlansPage(),
|
child: _PlansPage(search: search),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PlansPage extends StatefulWidget {
|
class _PlansPage extends StatefulWidget {
|
||||||
const _PlansPage({Key? key}) : super(key: key);
|
const _PlansPage({required this.search});
|
||||||
|
|
||||||
|
final String search;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _PlansPageState();
|
createState() => _PlansPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PlansPageState extends State<_PlansPage> {
|
class _PlansPageState extends State<_PlansPage> {
|
||||||
late Stream<Setting> stream;
|
bool showSearch = false;
|
||||||
|
late Stream<List<Plan>> stream;
|
||||||
|
|
||||||
final TextEditingController searchController = TextEditingController();
|
@override
|
||||||
|
initState() {
|
||||||
|
super.initState();
|
||||||
|
setStream();
|
||||||
|
}
|
||||||
|
|
||||||
void reset() async {
|
void setStream() {
|
||||||
var data = await db.select(db.settings).get();
|
stream = (db.select(db.plans)
|
||||||
if (data.isEmpty) await db.into(db.settings).insert(defaultSettings);
|
..where((gymSet) => gymSet.days.contains(widget.search))
|
||||||
setState(() {
|
..limit(10, offset: 0))
|
||||||
if (data.isEmpty) return;
|
.watch();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
didUpdateWidget(covariant _PlansPage oldWidget) {
|
||||||
super.initState();
|
super.didUpdateWidget(oldWidget);
|
||||||
stream = db.select(db.settings).watchSingle();
|
setStream();
|
||||||
|
}
|
||||||
|
|
||||||
|
void toggleSearch() {
|
||||||
|
setState(() {
|
||||||
|
showSearch = !showSearch;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: StreamBuilder<Setting>(
|
body: StreamBuilder<List<Plan>>(
|
||||||
stream: stream,
|
stream: stream,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
final settings = snapshot.data;
|
final plans = snapshot.data;
|
||||||
|
|
||||||
if (settings == null)
|
if (snapshot.hasError)
|
||||||
return const Center(child: CircularProgressIndicator());
|
return Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Text(
|
||||||
|
'Error: ${snapshot.error}',
|
||||||
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
|
),),
|
||||||
|
);
|
||||||
|
|
||||||
return SingleChildScrollView(
|
if (plans == null) return Container();
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: material.Column(
|
return PlanList(plans: plans);
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
},),
|
||||||
children: [
|
floatingActionButton: FloatingActionButton(
|
||||||
SwitchListTile(
|
onPressed: () async {
|
||||||
title: const Text('Alarm'),
|
await Navigator.push(
|
||||||
value: settings.alarm,
|
context,
|
||||||
onChanged: (value) {
|
MaterialPageRoute(
|
||||||
db
|
builder: (context) => const EditPlanPage(
|
||||||
.update(db.settings)
|
plan: PlansCompanion(
|
||||||
.write(SettingsCompanion(alarm: Value(value)));
|
days: Value(''), exercises: Value(''),),),
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Vibrate'),
|
|
||||||
value: settings.vibrate,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(vibrate: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Notify'),
|
|
||||||
value: settings.notify,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(notify: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Images'),
|
|
||||||
value: settings.images,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(images: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Show Unit'),
|
|
||||||
value: settings.showUnit,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(showUnit: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Steps'),
|
|
||||||
value: settings.steps,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(steps: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextField(
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'Sound',
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(sound: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextField(
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'Light Color',
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(lightColor: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextField(
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'Dark Color',
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(darkColor: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextField(
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'Date',
|
|
||||||
),
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(date: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
},
|
||||||
);
|
child: const Icon(Icons.add),),);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/edit_set.dart';
|
||||||
|
import 'package:fmassive/main.dart';
|
||||||
|
import 'package:fmassive/set_tile.dart';
|
||||||
|
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||||
|
import 'package:moor_flutter/moor_flutter.dart';
|
||||||
|
|
||||||
|
class SetList extends StatefulWidget {
|
||||||
|
final String search;
|
||||||
|
|
||||||
|
const SetList({super.key, required this.search});
|
||||||
|
|
||||||
|
@override
|
||||||
|
createState() => _SetList();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SetList extends State<SetList> {
|
||||||
|
bool showSearch = false;
|
||||||
|
final PagingController<int, GymSet> pagingController =
|
||||||
|
PagingController(firstPageKey: 0);
|
||||||
|
|
||||||
|
@override
|
||||||
|
initState() {
|
||||||
|
super.initState();
|
||||||
|
pagingController.addPageRequestListener((pageKey) {
|
||||||
|
fetch(pageKey);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
didUpdateWidget(covariant SetList oldWidget) {
|
||||||
|
super.didUpdateWidget(oldWidget);
|
||||||
|
pagingController.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> fetch(int pageKey) async {
|
||||||
|
final gymSets = await (db.select(db.gymSets)
|
||||||
|
..where((gymSet) => gymSet.name.contains(widget.search))
|
||||||
|
..orderBy([
|
||||||
|
(u) => OrderingTerm(expression: u.created, mode: OrderingMode.desc),
|
||||||
|
])
|
||||||
|
..limit(10, offset: pageKey * 10))
|
||||||
|
.get();
|
||||||
|
|
||||||
|
final isLastPage = gymSets.length < 10;
|
||||||
|
|
||||||
|
if (isLastPage) {
|
||||||
|
pagingController.appendLastPage(gymSets);
|
||||||
|
} else {
|
||||||
|
final nextPageKey = pageKey + 1;
|
||||||
|
pagingController.appendPage(gymSets, nextPageKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void toggleSearch() {
|
||||||
|
setState(() {
|
||||||
|
showSearch = !showSearch;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: PagedListView<int, GymSet>(
|
||||||
|
pagingController: pagingController,
|
||||||
|
builderDelegate: PagedChildBuilderDelegate<GymSet>(
|
||||||
|
itemBuilder: (context, gymSet, index) => SetTile(
|
||||||
|
pagingController: pagingController,
|
||||||
|
gymSet: gymSet,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
onPressed: () async {
|
||||||
|
await Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => const EditGymSetPage(
|
||||||
|
gymSet: GymSetsCompanion(
|
||||||
|
name: Value(''),
|
||||||
|
reps: Value(0),
|
||||||
|
weight: Value(0),
|
||||||
|
image: Value(''),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
pagingController.refresh();
|
||||||
|
},
|
||||||
|
child: const Icon(Icons.add),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/edit_set.dart';
|
||||||
|
import 'package:fmassive/main.dart';
|
||||||
|
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:moor/moor.dart';
|
||||||
|
|
||||||
|
class SetTile extends StatelessWidget {
|
||||||
|
const SetTile({
|
||||||
|
super.key,
|
||||||
|
required this.pagingController,
|
||||||
|
required this.gymSet,
|
||||||
|
});
|
||||||
|
|
||||||
|
final PagingController<int, GymSet> pagingController;
|
||||||
|
final GymSet gymSet;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ListTile(
|
||||||
|
title: Text(gymSet.name),
|
||||||
|
subtitle: Text(DateFormat("yyyy-MM-dd HH:mm")
|
||||||
|
.format(DateTime.parse(gymSet.created)),),
|
||||||
|
trailing: Text("${gymSet.reps} x ${gymSet.weight}kg"),
|
||||||
|
onTap: () async {
|
||||||
|
await Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => EditGymSetPage(
|
||||||
|
gymSet: gymSet.toCompanion(false),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
pagingController.refresh();
|
||||||
|
},
|
||||||
|
onLongPress: () => showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: const Text('Delete set'),
|
||||||
|
content: Text(
|
||||||
|
'Are you sure you want to delete ${gymSet.name} ${gymSet.reps}x${gymSet.weight}${gymSet.unit}?',),
|
||||||
|
actions: <Widget>[
|
||||||
|
ElevatedButton(
|
||||||
|
child: const Text('Cancel'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
child: const Text('Delete'),
|
||||||
|
onPressed: () async {
|
||||||
|
final navigator = Navigator.of(context);
|
||||||
|
await db.gymSets.deleteOne(gymSet);
|
||||||
|
pagingController.refresh();
|
||||||
|
navigator.pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
-13
@@ -21,18 +21,18 @@ Setting defaultSettings = Setting(
|
|||||||
|
|
||||||
class Settings extends Table {
|
class Settings extends Table {
|
||||||
BoolColumn get alarm => boolean()();
|
BoolColumn get alarm => boolean()();
|
||||||
BoolColumn get vibrate => boolean()();
|
BoolColumn get backup => boolean().nullable()();
|
||||||
TextColumn get sound => text().nullable()();
|
|
||||||
BoolColumn get notify => boolean()();
|
|
||||||
BoolColumn get images => boolean()();
|
|
||||||
BoolColumn get showUnit => boolean()();
|
|
||||||
TextColumn get lightColor => text().nullable()();
|
|
||||||
TextColumn get darkColor => text().nullable()();
|
TextColumn get darkColor => text().nullable()();
|
||||||
BoolColumn get steps => boolean()();
|
TextColumn get date => text().nullable()();
|
||||||
TextColumn get date => text()();
|
BoolColumn get images => boolean().nullable()();
|
||||||
BoolColumn get showDate => boolean()();
|
TextColumn get lightColor => text().nullable()();
|
||||||
TextColumn get theme => text()();
|
BoolColumn get noSound => boolean().nullable()();
|
||||||
BoolColumn get showSets => boolean()();
|
BoolColumn get notify => boolean().nullable()();
|
||||||
BoolColumn get noSound => boolean()();
|
BoolColumn get showDate => boolean().nullable()();
|
||||||
BoolColumn get backup => boolean()();
|
BoolColumn get showSets => boolean().nullable()();
|
||||||
|
BoolColumn get showUnit => boolean().nullable()();
|
||||||
|
TextColumn get sound => text().nullable()();
|
||||||
|
BoolColumn get steps => boolean().nullable()();
|
||||||
|
TextColumn get theme => text().nullable()();
|
||||||
|
BoolColumn get vibrate => boolean()();
|
||||||
}
|
}
|
||||||
|
|||||||
+129
-69
@@ -1,25 +1,35 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:csv/csv.dart';
|
||||||
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/material.dart' as material;
|
import 'package:flutter/material.dart' as material;
|
||||||
import 'package:fmassive/database.dart';
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/delete_all_sets.dart';
|
||||||
import 'package:fmassive/main.dart';
|
import 'package:fmassive/main.dart';
|
||||||
import 'package:fmassive/sound_picker.dart';
|
import 'package:fmassive/sound_picker.dart';
|
||||||
import 'package:moor/moor.dart';
|
import 'package:moor/moor.dart';
|
||||||
|
|
||||||
class SettingsPage extends StatelessWidget {
|
class SettingsPage extends StatelessWidget {
|
||||||
const SettingsPage({super.key});
|
const SettingsPage({super.key, required this.search});
|
||||||
|
|
||||||
|
final String search;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return const Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: _SettingsPage(),
|
child: _SettingsPage(search: search),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SettingsPage extends StatefulWidget {
|
class _SettingsPage extends StatefulWidget {
|
||||||
const _SettingsPage({Key? key}) : super(key: key);
|
const _SettingsPage({required this.search});
|
||||||
|
|
||||||
|
final String search;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SettingsPageState();
|
createState() => _SettingsPageState();
|
||||||
@@ -28,12 +38,10 @@ class _SettingsPage extends StatefulWidget {
|
|||||||
class _SettingsPageState extends State<_SettingsPage> {
|
class _SettingsPageState extends State<_SettingsPage> {
|
||||||
late Stream<Setting> stream;
|
late Stream<Setting> stream;
|
||||||
|
|
||||||
final TextEditingController searchController = TextEditingController();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
stream = db.select(db.settings).watchSingle();
|
stream = (db.select(db.settings)..limit(1)).watchSingle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -43,80 +51,132 @@ class _SettingsPageState extends State<_SettingsPage> {
|
|||||||
stream: stream,
|
stream: stream,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
final settings = snapshot.data;
|
final settings = snapshot.data;
|
||||||
|
print('build: $settings');
|
||||||
|
|
||||||
if (settings == null)
|
if (settings == null) return Container();
|
||||||
return const Center(child: CircularProgressIndicator());
|
|
||||||
|
|
||||||
return SingleChildScrollView(
|
final filteredItems = [
|
||||||
child: material.Column(
|
{'title': 'Alarm', 'value': settings.alarm},
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
{'title': 'Vibrate', 'value': settings.vibrate},
|
||||||
|
{'title': 'Notify', 'value': settings.notify},
|
||||||
|
{'title': 'Images', 'value': settings.images},
|
||||||
|
{'title': 'Show Unit', 'value': settings.showUnit},
|
||||||
|
{'title': 'Steps', 'value': settings.steps},
|
||||||
|
{'title': 'Sound', 'value': settings.sound},
|
||||||
|
{'title': 'Import sets', 'value': null},
|
||||||
|
{'title': 'Delete all sets', 'value': null},
|
||||||
|
]
|
||||||
|
.where((item) => (item['title'] as String)
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(widget.search.toLowerCase()),)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
return material.Column(
|
||||||
children: [
|
children: [
|
||||||
SwitchListTile(
|
Expanded(
|
||||||
title: const Text('Alarm'),
|
child: ListView.builder(
|
||||||
value: settings.alarm,
|
itemCount: filteredItems.length,
|
||||||
onChanged: (value) {
|
itemBuilder: (context, index) {
|
||||||
db
|
final item = filteredItems[index];
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(alarm: Value(value)));
|
if (item['title'] == 'Delete all sets')
|
||||||
|
return DeleteAllSets(mounted: mounted);
|
||||||
|
|
||||||
|
if (item['title'] == 'Import sets')
|
||||||
|
return Center(
|
||||||
|
child: ElevatedButton(
|
||||||
|
child: const Text("Import sets"),
|
||||||
|
onPressed: () async {
|
||||||
|
final result = await FilePicker.platform.pickFiles(
|
||||||
|
type: FileType.custom,
|
||||||
|
allowedExtensions: ['csv'],);
|
||||||
|
if (result == null) return;
|
||||||
|
|
||||||
|
final file = File(result.files.single.path!);
|
||||||
|
final input = file.openRead();
|
||||||
|
final fields = await input
|
||||||
|
.transform(utf8.decoder)
|
||||||
|
.transform(const CsvToListConverter(eol: "\n"))
|
||||||
|
.skip(1)
|
||||||
|
.toList();
|
||||||
|
final gymSets = fields.map((row) => GymSetsCompanion(
|
||||||
|
id: Value(int.tryParse(row[0]) ?? 0),
|
||||||
|
name: Value(row[1]),
|
||||||
|
reps: Value(int.tryParse(row[2]) ?? 0),
|
||||||
|
weight: Value(double.tryParse(row[3]) ?? 0),
|
||||||
|
created: Value(row[4]),
|
||||||
|
unit: Value(row[5]),
|
||||||
|
hidden: Value(row[6] == 'true'),
|
||||||
|
image: Value(row[7]),
|
||||||
|
sets: Value(int.tryParse(row[8]) ?? 0),
|
||||||
|
minutes: Value(int.tryParse(row[9]) ?? 0),
|
||||||
|
seconds: Value(int.tryParse(row[10]) ?? 0),
|
||||||
|
steps: Value(row[11]),
|
||||||
|
),);
|
||||||
|
await db.batch(
|
||||||
|
(batch) => batch.insertAll(db.gymSets, gymSets),);
|
||||||
|
if (!mounted) return;
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text('Imported sets')),);
|
||||||
},
|
},
|
||||||
),
|
),);
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Vibrate'),
|
if (item['title'] == 'Sound') {
|
||||||
value: settings.vibrate,
|
return Center(
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(vibrate: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Notify'),
|
|
||||||
value: settings.notify,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(notify: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Images'),
|
|
||||||
value: settings.images,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(images: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Show Unit'),
|
|
||||||
value: settings.showUnit,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(showUnit: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Steps'),
|
|
||||||
value: settings.steps,
|
|
||||||
onChanged: (value) {
|
|
||||||
db
|
|
||||||
.update(db.settings)
|
|
||||||
.write(SettingsCompanion(steps: Value(value)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Center(
|
|
||||||
child: SoundPicker(
|
child: SoundPicker(
|
||||||
path: settings.sound,
|
path: settings.sound,
|
||||||
onSelect: (path) {
|
onSelect: (path) {
|
||||||
db
|
db
|
||||||
.update(db.settings)
|
.update(db.settings)
|
||||||
.write(SettingsCompanion(sound: Value(path)));
|
.write(SettingsCompanion(sound: Value(path)));
|
||||||
})),
|
},
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}
|
||||||
|
|
||||||
|
return SwitchListTile(
|
||||||
|
title: Text(item['title'].toString()),
|
||||||
|
value: (item['value'] ?? false) as bool,
|
||||||
|
onChanged: (value) {
|
||||||
|
switch (item['title']) {
|
||||||
|
case 'Alarm':
|
||||||
|
db
|
||||||
|
.update(db.settings)
|
||||||
|
.write(SettingsCompanion(alarm: Value(value)));
|
||||||
|
break;
|
||||||
|
case 'Vibrate':
|
||||||
|
db.update(db.settings).write(
|
||||||
|
SettingsCompanion(vibrate: Value(value)),);
|
||||||
|
break;
|
||||||
|
case 'Notify':
|
||||||
|
db
|
||||||
|
.update(db.settings)
|
||||||
|
.write(SettingsCompanion(notify: Value(value)));
|
||||||
|
break;
|
||||||
|
case 'Images':
|
||||||
|
db
|
||||||
|
.update(db.settings)
|
||||||
|
.write(SettingsCompanion(images: Value(value)));
|
||||||
|
break;
|
||||||
|
case 'Show Unit':
|
||||||
|
db.update(db.settings).write(
|
||||||
|
SettingsCompanion(showUnit: Value(value)),);
|
||||||
|
break;
|
||||||
|
case 'Steps':
|
||||||
|
db
|
||||||
|
.update(db.settings)
|
||||||
|
.write(SettingsCompanion(steps: Value(value)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class _SoundPickerState extends State<SoundPicker> {
|
|||||||
},
|
},
|
||||||
child: Text(widget.path != null
|
child: Text(widget.path != null
|
||||||
? "Sound: ${basename(widget.path!)}"
|
? "Sound: ${basename(widget.path!)}"
|
||||||
: 'Alarm sound'),
|
: 'Alarm sound',),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,222 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/material.dart' as material;
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:fmassive/database.dart';
|
||||||
|
import 'package:fmassive/main.dart';
|
||||||
|
import 'package:moor_flutter/moor_flutter.dart';
|
||||||
|
|
||||||
|
class StartPlan extends StatefulWidget {
|
||||||
|
final PlansCompanion plan;
|
||||||
|
|
||||||
|
const StartPlan({required this.plan, super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
createState() => _StartPlanState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _StartPlanState extends State<StartPlan> {
|
||||||
|
late List<String> exercises;
|
||||||
|
List<int> counts = [];
|
||||||
|
List<int> totals = [];
|
||||||
|
int selectedExercise = 0;
|
||||||
|
final repsController = TextEditingController();
|
||||||
|
final repsNode = FocusNode();
|
||||||
|
final weightController = TextEditingController();
|
||||||
|
final weightNode = FocusNode();
|
||||||
|
int current = 0;
|
||||||
|
int minutes = 3;
|
||||||
|
int seconds = 30;
|
||||||
|
Timer? timer;
|
||||||
|
|
||||||
|
void startTimer() {
|
||||||
|
setState(() {
|
||||||
|
current = minutes * 60 * 1000 + seconds * 1000;
|
||||||
|
});
|
||||||
|
timer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||||
|
print("StartPlan: current=$current");
|
||||||
|
if (current == 0)
|
||||||
|
setState(() {
|
||||||
|
timer.cancel();
|
||||||
|
});
|
||||||
|
else
|
||||||
|
setState(() {
|
||||||
|
current -= 1000;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getTotals() async {
|
||||||
|
final query = await (db.selectOnly(db.gymSets)
|
||||||
|
..addColumns([db.gymSets.name, db.gymSets.sets])
|
||||||
|
..where(db.gymSets.name.isIn(exercises))
|
||||||
|
..groupBy([db.gymSets.name, db.gymSets.sets]))
|
||||||
|
.map(
|
||||||
|
(row) =>
|
||||||
|
MapEntry(row.read(db.gymSets.name), row.read(db.gymSets.sets)),
|
||||||
|
)
|
||||||
|
.get();
|
||||||
|
final map = Map.fromIterables(
|
||||||
|
query.map((entry) => entry.key),
|
||||||
|
query.map((entry) => entry.value),
|
||||||
|
);
|
||||||
|
setState(() {
|
||||||
|
totals = [];
|
||||||
|
for (var exercise in exercises) {
|
||||||
|
totals.add(map[exercise] ?? 0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
print("totals=$totals");
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getCounts() async {
|
||||||
|
var countExp = db.gymSets.name.count();
|
||||||
|
final today = DateTime.now().toIso8601String().split('T')[0];
|
||||||
|
final query = await (db.selectOnly(db.gymSets)
|
||||||
|
..addColumns([countExp, db.gymSets.name])
|
||||||
|
..where(db.gymSets.created.contains(today))
|
||||||
|
..groupBy([db.gymSets.name]))
|
||||||
|
.map((row) => MapEntry(row.read(db.gymSets.name), row.read(countExp)))
|
||||||
|
.get();
|
||||||
|
final map = Map.fromIterables(
|
||||||
|
query.map((entry) => entry.key),
|
||||||
|
query.map((entry) => entry.value),
|
||||||
|
);
|
||||||
|
setState(() {
|
||||||
|
counts = [];
|
||||||
|
for (var exercise in exercises) {
|
||||||
|
counts.add(map[exercise] ?? 0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
print("counts=$counts");
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> focus(int index) async {
|
||||||
|
final name = exercises[index];
|
||||||
|
final sets = await (db.gymSets.select()
|
||||||
|
..where((gymSet) => gymSet.name.contains(name))
|
||||||
|
..orderBy([
|
||||||
|
(u) => OrderingTerm(expression: u.created, mode: OrderingMode.desc),
|
||||||
|
])
|
||||||
|
..limit(1))
|
||||||
|
.get();
|
||||||
|
final firstSet = sets.first;
|
||||||
|
setState(() {
|
||||||
|
repsController.text = firstSet.reps.toString();
|
||||||
|
repsController.selection = TextSelection(
|
||||||
|
baseOffset: 0,
|
||||||
|
extentOffset: firstSet.reps.toString().length,
|
||||||
|
);
|
||||||
|
weightController.text = firstSet.weight.toString();
|
||||||
|
minutes = firstSet.minutes;
|
||||||
|
seconds = firstSet.seconds;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
exercises = widget.plan.exercises.value.split(',');
|
||||||
|
repsNode.requestFocus();
|
||||||
|
getCounts();
|
||||||
|
getTotals();
|
||||||
|
focus(selectedExercise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
dispose() {
|
||||||
|
super.dispose();
|
||||||
|
timer?.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (totals.isEmpty || counts.isEmpty) return Container();
|
||||||
|
|
||||||
|
return SafeArea(
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: AppBar(title: const Text('Start plan')),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: material.Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView.builder(
|
||||||
|
itemBuilder: ((context, index) {
|
||||||
|
return ListTile(
|
||||||
|
title: Text(exercises[index]),
|
||||||
|
subtitle: Text("${counts[index]}/${totals[index]}"),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
selectedExercise = index;
|
||||||
|
focus(index);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
leading: Radio<int>(
|
||||||
|
value: index,
|
||||||
|
groupValue: selectedExercise,
|
||||||
|
onChanged: (value) {
|
||||||
|
print("onChanged $value");
|
||||||
|
if (value == null) return;
|
||||||
|
setState(() {
|
||||||
|
selectedExercise = value;
|
||||||
|
focus(index);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
itemCount: exercises.length,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
decoration: const InputDecoration(labelText: 'Reps'),
|
||||||
|
controller: repsController,
|
||||||
|
focusNode: repsNode,
|
||||||
|
onTap: () {
|
||||||
|
repsController.selection = TextSelection(
|
||||||
|
baseOffset: 0,
|
||||||
|
extentOffset: repsController.text.length,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
decoration: const InputDecoration(labelText: 'Weight'),
|
||||||
|
controller: weightController,
|
||||||
|
focusNode: weightNode,
|
||||||
|
onTap: () {
|
||||||
|
weightController.selection = TextSelection(
|
||||||
|
baseOffset: 0,
|
||||||
|
extentOffset: weightController.text.length,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
LinearProgressIndicator(
|
||||||
|
value: current / (minutes * 60 * 1000 + seconds * 1000),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
onPressed: () async {
|
||||||
|
final gymSet = GymSetsCompanion(
|
||||||
|
created: Value(DateTime.now().toIso8601String()),
|
||||||
|
name: Value(exercises[selectedExercise]),
|
||||||
|
reps: Value(int.tryParse(repsController.text) ?? 0),
|
||||||
|
weight: Value(double.tryParse(weightController.text) ?? 0),
|
||||||
|
);
|
||||||
|
await db.into(db.gymSets).insert(gymSet);
|
||||||
|
const platform = MethodChannel('com.massive/android');
|
||||||
|
platform
|
||||||
|
.invokeMethod('timer', [minutes * 60 * 1000 + seconds * 1000]);
|
||||||
|
startTimer();
|
||||||
|
await getCounts();
|
||||||
|
},
|
||||||
|
child: const Icon(Icons.check),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
+210
-130
@@ -29,74 +29,74 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
|
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.0"
|
version: "2.4.2"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
|
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.10.0"
|
version: "2.11.0"
|
||||||
audioplayers:
|
audioplayers:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: audioplayers
|
name: audioplayers
|
||||||
sha256: "6063c05f987596ba7a3dad9bb9a5d8adfa5e7c07b9bae5301b27c11d0b3a239f"
|
sha256: d9f6ca8e9b3e5af5e73d4c814404566f72698ee7ba35487bdf2baa6749e7503f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.1"
|
version: "5.2.0"
|
||||||
audioplayers_android:
|
audioplayers_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audioplayers_android
|
name: audioplayers_android
|
||||||
sha256: fb6bca878ad175d8f6ddc0e0a2d4226d81fa7c10747c12db420e96c7a096b2cc
|
sha256: fb01b9481f431fe04ac60f1f97ce8158383f2dc754558820592f795d81ca9d53
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "4.0.2"
|
||||||
audioplayers_darwin:
|
audioplayers_darwin:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audioplayers_darwin
|
name: audioplayers_darwin
|
||||||
sha256: c4a56c49347b2e85ac4e1efea218948ca0fba87f04d2a3d3de07ce2410037038
|
sha256: "3034e99a6df8d101da0f5082dcca0a2a99db62ab1d4ddb3277bed3f6f81afe08"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.1"
|
version: "5.0.2"
|
||||||
audioplayers_linux:
|
audioplayers_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audioplayers_linux
|
name: audioplayers_linux
|
||||||
sha256: "897e24f190232a3fbb88134b062aa83a9240f55789b5e8d17c114283284ef56b"
|
sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "3.1.0"
|
||||||
audioplayers_platform_interface:
|
audioplayers_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audioplayers_platform_interface
|
name: audioplayers_platform_interface
|
||||||
sha256: "3a90a46198d375fc7d47bc1d3070c8fd8863b6469b7d87ca80f953efb090f976"
|
sha256: "365c547f1bb9e77d94dd1687903a668d8f7ac3409e48e6e6a3668a1ac2982adb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.0"
|
version: "6.1.0"
|
||||||
audioplayers_web:
|
audioplayers_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audioplayers_web
|
name: audioplayers_web
|
||||||
sha256: "4f5dcbfec0bf98ea09e243d5f5b64ea43a4e6710a2f292724bed16cdba3c691e"
|
sha256: "22cd0173e54d92bd9b2c80b1204eb1eb159ece87475ab58c9788a70ec43c2a62"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "4.1.0"
|
||||||
audioplayers_windows:
|
audioplayers_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audioplayers_windows
|
name: audioplayers_windows
|
||||||
sha256: "010f575653c01ccbe9756050b18df83d89426740e04b684f6438aa26c775a965"
|
sha256: "9536812c9103563644ada2ef45ae523806b0745f7a78e89d1b5fb1951de90e1a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "3.1.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -109,10 +109,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build
|
name: build
|
||||||
sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777"
|
sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.1"
|
version: "2.4.1"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -125,10 +125,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_daemon
|
name: build_daemon
|
||||||
sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169"
|
sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "4.0.1"
|
||||||
build_resolvers:
|
build_resolvers:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -141,18 +141,18 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727
|
sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.3"
|
version: "2.4.6"
|
||||||
build_runner_core:
|
build_runner_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_runner_core
|
name: build_runner_core
|
||||||
sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292"
|
sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.2.7"
|
version: "7.2.10"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -165,18 +165,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_value
|
name: built_value
|
||||||
sha256: "31b7c748fd4b9adf8d25d72a4c4a59ef119f12876cf414f94f8af5131d5fa2b0"
|
sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.4.4"
|
version: "8.7.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
|
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.3.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -189,10 +189,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: checked_yaml
|
name: checked_yaml
|
||||||
sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311"
|
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.3"
|
||||||
cli_util:
|
cli_util:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -213,18 +213,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: code_builder
|
name: code_builder
|
||||||
sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe"
|
sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.4.0"
|
version: "4.7.0"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
|
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.0"
|
version: "1.17.2"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -237,18 +237,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: crypto
|
name: crypto
|
||||||
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
|
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.2"
|
version: "3.0.3"
|
||||||
|
csv:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: csv
|
||||||
|
sha256: "63ed2871dd6471193dffc52c0e6c76fb86269c00244d244297abbb355c84a86e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.1.1"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.6"
|
||||||
dart_style:
|
dart_style:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -285,10 +293,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: ffi
|
name: ffi
|
||||||
sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
|
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.1.0"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -301,10 +309,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: file_picker
|
name: file_picker
|
||||||
sha256: dcde5ad1a0cebcf3715ea3f24d0db1888bf77027a26c77d7779e8ef63b8ade62
|
sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.2.9"
|
version: "6.1.1"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -322,18 +330,26 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
|
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "3.0.1"
|
||||||
flutter_plugin_android_lifecycle:
|
flutter_plugin_android_lifecycle:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_plugin_android_lifecycle
|
name: flutter_plugin_android_lifecycle
|
||||||
sha256: c224ac897bed083dabf11f238dd11a239809b446740be0c2044608c50029ffdf
|
sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.9"
|
version: "2.0.17"
|
||||||
|
flutter_staggered_grid_view:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_staggered_grid_view
|
||||||
|
sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -356,26 +372,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: glob
|
name: glob
|
||||||
sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c"
|
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
graphs:
|
graphs:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: graphs
|
name: graphs
|
||||||
sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2
|
sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.0"
|
version: "2.3.1"
|
||||||
http:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: http
|
name: http
|
||||||
sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
|
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.5"
|
version: "0.13.6"
|
||||||
http_multi_server:
|
http_multi_server:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -392,6 +408,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.2"
|
version: "4.0.2"
|
||||||
|
infinite_scroll_pagination:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: infinite_scroll_pagination
|
||||||
|
sha256: b68bce20752fcf36c7739e60de4175494f74e99e9a69b4dd2fe3a1dd07a7f16a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
|
intl:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: intl
|
||||||
|
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.18.1"
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -404,58 +436,58 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: js
|
name: js
|
||||||
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
|
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.5"
|
version: "0.6.7"
|
||||||
json_annotation:
|
json_annotation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: json_annotation
|
name: json_annotation
|
||||||
sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
|
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.8.0"
|
version: "4.8.1"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
|
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "3.0.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: logging
|
name: logging
|
||||||
sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d"
|
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.2.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
|
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.13"
|
version: "0.12.16"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.5.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
|
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.9.1"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -500,74 +532,114 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
|
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.8.3"
|
||||||
path_provider:
|
path_provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path_provider
|
name: path_provider
|
||||||
sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4
|
sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.14"
|
version: "2.1.1"
|
||||||
path_provider_android:
|
path_provider_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7"
|
sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.24"
|
version: "2.2.1"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_foundation
|
name: path_provider_foundation
|
||||||
sha256: "818b2dc38b0f178e0ea3f7cf3b28146faab11375985d815942a68eee11c2d0f7"
|
sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.1"
|
version: "2.3.1"
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_linux
|
name: path_provider_linux
|
||||||
sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1"
|
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.10"
|
version: "2.2.1"
|
||||||
path_provider_platform_interface:
|
path_provider_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_platform_interface
|
name: path_provider_platform_interface
|
||||||
sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
|
sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.6"
|
version: "2.1.1"
|
||||||
path_provider_windows:
|
path_provider_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_windows
|
name: path_provider_windows
|
||||||
sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130
|
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.5"
|
version: "2.2.1"
|
||||||
|
permission_handler:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: permission_handler
|
||||||
|
sha256: "284a66179cabdf942f838543e10413246f06424d960c92ba95c84439154fcac8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "11.0.1"
|
||||||
|
permission_handler_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_android
|
||||||
|
sha256: f9fddd3b46109bd69ff3f9efa5006d2d309b7aec0f3c1c5637a60a2d5659e76e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "11.1.0"
|
||||||
|
permission_handler_apple:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_apple
|
||||||
|
sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "9.1.4"
|
||||||
|
permission_handler_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_platform_interface
|
||||||
|
sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.12.0"
|
||||||
|
permission_handler_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_windows
|
||||||
|
sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.3"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: platform
|
name: platform
|
||||||
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
|
sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.0"
|
version: "3.1.3"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: plugin_platform_interface
|
name: plugin_platform_interface
|
||||||
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
|
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.6"
|
||||||
pool:
|
pool:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -576,30 +648,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.1"
|
version: "1.5.1"
|
||||||
process:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: process
|
|
||||||
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.2.4"
|
|
||||||
pub_semver:
|
pub_semver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17"
|
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.3"
|
version: "2.1.4"
|
||||||
pubspec_parse:
|
pubspec_parse:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pubspec_parse
|
name: pubspec_parse
|
||||||
sha256: ec85d7d55339d85f44ec2b682a82fea340071e8978257e5a43e69f79e98ef50c
|
sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.2"
|
version: "1.2.3"
|
||||||
recase:
|
recase:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -612,23 +676,31 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shelf
|
name: shelf
|
||||||
sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c
|
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.1"
|
||||||
shelf_web_socket:
|
shelf_web_socket:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shelf_web_socket
|
name: shelf_web_socket
|
||||||
sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8
|
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.4"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.99"
|
version: "0.0.99"
|
||||||
|
sliver_tools:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sliver_tools
|
||||||
|
sha256: eae28220badfb9d0559207badcbbc9ad5331aac829a88cb0964d330d2a4636a6
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.12"
|
||||||
source_gen:
|
source_gen:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -641,42 +713,42 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.10.0"
|
||||||
sqflite:
|
sqflite:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: sqflite
|
name: sqflite
|
||||||
sha256: "500d6fec583d2c021f2d25a056d96654f910662c64f836cd2063167b8f1fa758"
|
sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.6"
|
version: "2.3.0"
|
||||||
sqflite_common:
|
sqflite_common:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: sqflite_common
|
name: sqflite_common
|
||||||
sha256: "963dad8c4aa2f814ce7d2d5b1da2f36f31bd1a439d8f27e3dc189bb9d26bc684"
|
sha256: "8ed044102f3135add97be8653662052838859f5400075ef227f8ad72ae320803"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.3"
|
version: "2.5.0+1"
|
||||||
sqlite3:
|
sqlite3:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: sqlite3
|
name: sqlite3
|
||||||
sha256: "822d321a008e194d7929357e5b58d2e4a04ab670d137182f9759152aa33180ff"
|
sha256: "281b672749af2edf259fc801f0fcba092257425bcd32a0ce1c8237130bc934c7"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.1"
|
version: "1.11.2"
|
||||||
sqlite3_flutter_libs:
|
sqlite3_flutter_libs:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: sqlite3_flutter_libs
|
name: sqlite3_flutter_libs
|
||||||
sha256: "02f80aea54a19a36b347dedf6d4181ecd9107f5831ea6139cfd0376a3de197ba"
|
sha256: "3e3583b77cf888a68eae2e49ee4f025f66b86623ef0d83c297c8d903daa14871"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.13"
|
version: "0.5.18"
|
||||||
sqlparser:
|
sqlparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -721,10 +793,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: synchronized
|
name: synchronized
|
||||||
sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b"
|
sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -737,10 +809,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
|
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.16"
|
version: "0.6.0"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -753,10 +825,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
|
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.2"
|
||||||
uuid:
|
uuid:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -777,42 +849,50 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: watcher
|
name: watcher
|
||||||
sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0"
|
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.1.0"
|
||||||
|
web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web
|
||||||
|
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.4-beta"
|
||||||
web_socket_channel:
|
web_socket_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web_socket_channel
|
name: web_socket_channel
|
||||||
sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b
|
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.0"
|
version: "2.4.0"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: win32
|
name: win32
|
||||||
sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4
|
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.4"
|
version: "5.0.9"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: xdg_directories
|
name: xdg_directories
|
||||||
sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
|
sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.3"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: yaml
|
name: yaml
|
||||||
sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
|
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "3.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.19.5 <3.0.0"
|
dart: ">=3.1.0-185.0.dev <4.0.0"
|
||||||
flutter: ">=3.3.0"
|
flutter: ">=3.10.0"
|
||||||
|
|||||||
+7
-3
@@ -42,8 +42,12 @@ dependencies:
|
|||||||
path_provider: ^2.0.14
|
path_provider: ^2.0.14
|
||||||
sqlite3_flutter_libs: ^0.5.13
|
sqlite3_flutter_libs: ^0.5.13
|
||||||
moor: ^4.6.1+1
|
moor: ^4.6.1+1
|
||||||
file_picker: ^5.2.9
|
file_picker: ^6.1.1
|
||||||
audioplayers: ^4.0.1
|
audioplayers: ^5.2.0
|
||||||
|
intl: ^0.18.0
|
||||||
|
permission_handler: ^11.0.1
|
||||||
|
infinite_scroll_pagination: ^4.0.0
|
||||||
|
csv: ^5.1.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@@ -54,7 +58,7 @@ dev_dependencies:
|
|||||||
# activated in the `analysis_options.yaml` file located at the root of your
|
# activated in the `analysis_options.yaml` file located at the root of your
|
||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^3.0.1
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|||||||
@@ -7,11 +7,14 @@
|
|||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <audioplayers_windows/audioplayers_windows_plugin.h>
|
#include <audioplayers_windows/audioplayers_windows_plugin.h>
|
||||||
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
AudioplayersWindowsPluginRegisterWithRegistrar(
|
AudioplayersWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
|
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
|
||||||
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||||
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
|
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
|
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
audioplayers_windows
|
audioplayers_windows
|
||||||
|
permission_handler_windows
|
||||||
sqlite3_flutter_libs
|
sqlite3_flutter_libs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ bool FlutterWindow::OnCreate() {
|
|||||||
this->Show();
|
this->Show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Flutter can complete the first frame before the "show window" callback is
|
||||||
|
// registered. The following call ensures a frame is pending to ensure the
|
||||||
|
// window is shown. It is a no-op if the first frame hasn't completed yet.
|
||||||
|
flutter_controller_->ForceRedraw();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user