mirror of
https://github.com/gskinnerTeam/flutter-wonderous-app.git
synced 2025-05-30 21:17:45 +08:00
Initial public commit
This commit is contained in:
20
lib/logic/timeline_logic.dart
Normal file
20
lib/logic/timeline_logic.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:wonders/common_libs.dart';
|
||||
import 'package:wonders/logic/common/string_utils.dart';
|
||||
import 'package:wonders/logic/data/timeline_data.dart';
|
||||
|
||||
class TimelineLogic {
|
||||
final List<TimelineEvent> events = [];
|
||||
|
||||
Future<void> init() async {
|
||||
events.addAll(GlobalEventsData().globalEvents);
|
||||
|
||||
for (var w in wondersLogic.all) {
|
||||
events.add(
|
||||
TimelineEvent(
|
||||
w.startYr,
|
||||
StringUtils.supplant($strings.timelineLabelConstruction, {'{title}': w.title}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user