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);
|
||||
else {
|
||||
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');
|
||||
platform.invokeMethod('timer', [3000]);
|
||||
}
|
||||
|
|
|
@ -80,13 +80,12 @@ class _SetList extends State<SetList> {
|
|||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => EditGymSetPage(
|
||||
builder: (context) => const EditGymSetPage(
|
||||
gymSet: GymSetsCompanion(
|
||||
name: const Value(''),
|
||||
reps: const Value(0),
|
||||
weight: const Value(0),
|
||||
image: const Value(''),
|
||||
created: Value(DateTime.now().toString()),
|
||||
name: Value(''),
|
||||
reps: Value(0),
|
||||
weight: Value(0),
|
||||
image: Value(''),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user