Created
June 14, 2022 09:17
-
-
Save FlutterWiz/2594186781acb85b3400231486fba382 to your computer and use it in GitHub Desktop.
domain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:freezed_annotation/freezed_annotation.dart'; | |
part 'todo_model.freezed.dart'; | |
@freezed | |
class TodoModel with _$TodoModel { | |
const factory TodoModel({ | |
required String id, | |
required String title, | |
required bool isTodoCompleted, | |
}) = _TodoModel; | |
const TodoModel._(); | |
factory TodoModel.empty() => const TodoModel( | |
id: "", | |
title: "", | |
isTodoCompleted: false, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment