Compare commits
2 Commits
5f71330a4b
...
0b3355b4bc
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b3355b4bc | |||
| 3b130fb59d |
@@ -0,0 +1,7 @@
|
||||
class LatLng {
|
||||
final double lat;
|
||||
final double lng;
|
||||
|
||||
LatLng(this.lat, this.lng);
|
||||
LatLng.empty() : lat = 0, lng = 0;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import 'latlng.dart';
|
||||
|
||||
class Location {
|
||||
final String? _address;
|
||||
final LatLng? _coordinates;
|
||||
|
||||
Location({this._address, this._coordinates});
|
||||
|
||||
Location.fromAddress({required this._address}) : _coordinates = null;
|
||||
Location.fromCoordinates({required this._coordinates}) : _address = null;
|
||||
|
||||
String get address => _address ?? '';
|
||||
LatLng get coordinates => _coordinates ?? LatLng.empty();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import 'location.dart';
|
||||
|
||||
class Task {
|
||||
final String id;
|
||||
final String title;
|
||||
final String description;
|
||||
final DateTime? start;
|
||||
final DateTime? due;
|
||||
final bool isCompleted;
|
||||
final String category;
|
||||
final List<Task> subtasks;
|
||||
final List<DateTime> alarms;
|
||||
final Location? location;
|
||||
final String url;
|
||||
|
||||
Task({
|
||||
required this.id,
|
||||
required this.title,
|
||||
this.description = '',
|
||||
this.start,
|
||||
this.due,
|
||||
this.isCompleted = false,
|
||||
this.category = '',
|
||||
this.subtasks = const [],
|
||||
this.alarms = const [],
|
||||
this.location,
|
||||
this.url = '',
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user