Initial (redacted) commit.
This commit is contained in:
commit
655f8a036a
368 changed files with 20949 additions and 0 deletions
50
app/lib/sembast/timer.dart
Normal file
50
app/lib/sembast/timer.dart
Normal file
|
@ -0,0 +1,50 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
part 'timer.freezed.dart';
|
||||
part 'timer.g.dart';
|
||||
|
||||
@freezed
|
||||
class TimerItem with _$TimerItem {
|
||||
const factory TimerItem({
|
||||
required String widgetType,
|
||||
required String name,
|
||||
required int current,
|
||||
required int goal,
|
||||
required bool isExpanded,
|
||||
required bool isVisible,
|
||||
required String createdOn,
|
||||
required String completedOn,
|
||||
required String state,
|
||||
@Default(-1) int id,
|
||||
}) = _TimerItem;
|
||||
|
||||
factory TimerItem.fromJson(Map<String, Object?> json) =>
|
||||
_$TimerItemFromJson(json);
|
||||
}
|
||||
|
||||
extension JsonWithoutId on TimerItem {
|
||||
Map<String, dynamic> toJsonWithoutId() {
|
||||
final map = toJson()..remove('id');
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@freezed
|
||||
class Student with _$Student {
|
||||
const factory Student({
|
||||
required String name,
|
||||
int? id,
|
||||
}) = _Student;
|
||||
|
||||
factory Student.fromJson(Map<String, Object?> json) =>
|
||||
_$StudentFromJson(json);
|
||||
}
|
||||
|
||||
extension JsonWithoutId on Student {
|
||||
Map<String, dynamic> toJsonWithoutId() {
|
||||
final map = toJson()..remove('id');
|
||||
return map;
|
||||
}
|
||||
}
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue