random deadline
This commit is contained in:
parent
bcac3a5e03
commit
ffcabca487
@ -1,3 +1,5 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'weekManager.dart';
|
||||
|
||||
@ -36,8 +38,9 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
final random = Random();
|
||||
_weekManagers = List.generate(5, (index) {
|
||||
DateTime deadline = DateTime.now().add(Duration(days: (index + 1) * 7));
|
||||
DateTime deadline = DateTime.now().add(Duration(days: random.nextInt(365)));
|
||||
return WeekManager(deadline);
|
||||
});
|
||||
_updateDeadlines();
|
||||
|
Loading…
Reference in New Issue
Block a user