Set created date at last possible moment
This commit is contained in:
parent
7642c6faf2
commit
36b8ce37ad
|
@ -126,7 +126,9 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
||||||
await db.update(db.gymSets).replace(gymSet);
|
await db.update(db.gymSets).replace(gymSet);
|
||||||
else {
|
else {
|
||||||
await Permission.notification.request();
|
await Permission.notification.request();
|
||||||
await db.into(db.gymSets).insert(gymSet);
|
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]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,13 +80,12 @@ class _SetList extends State<SetList> {
|
||||||
await Navigator.push(
|
await Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => EditGymSetPage(
|
builder: (context) => const EditGymSetPage(
|
||||||
gymSet: GymSetsCompanion(
|
gymSet: GymSetsCompanion(
|
||||||
name: const Value(''),
|
name: Value(''),
|
||||||
reps: const Value(0),
|
reps: Value(0),
|
||||||
weight: const Value(0),
|
weight: Value(0),
|
||||||
image: const Value(''),
|
image: Value(''),
|
||||||
created: Value(DateTime.now().toString()),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user