2022-08-29 20:38:28 -06:00
|
|
|
import 'package:wonders/common_libs.dart';
|
|
|
|
import 'package:wonders/logic/data/timeline_data.dart';
|
|
|
|
|
|
|
|
class TimelineLogic {
|
2022-09-01 14:45:55 -06:00
|
|
|
List<TimelineEvent> events = [];
|
2022-08-29 20:38:28 -06:00
|
|
|
|
2022-09-01 14:45:55 -06:00
|
|
|
void init() {
|
2022-09-08 12:14:28 -06:00
|
|
|
// Create an event for each wonder, and merge it with the list of GlobalEvents
|
2022-09-01 14:45:55 -06:00
|
|
|
events = [
|
|
|
|
...GlobalEventsData().globalEvents,
|
|
|
|
...wondersLogic.all.map(
|
|
|
|
(w) => TimelineEvent(
|
2022-08-29 20:38:28 -06:00
|
|
|
w.startYr,
|
2022-11-29 22:05:14 -07:00
|
|
|
$strings.timelineLabelConstruction(w.title),
|
2022-08-29 20:38:28 -06:00
|
|
|
),
|
2022-09-01 14:45:55 -06:00
|
|
|
)
|
|
|
|
];
|
2022-08-29 20:38:28 -06:00
|
|
|
}
|
|
|
|
}
|