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