Skip to content

Instantly share code, notes, and snippets.

@FlutterWiz
Created June 14, 2022 09:17
Show Gist options
  • Save FlutterWiz/2594186781acb85b3400231486fba382 to your computer and use it in GitHub Desktop.
Save FlutterWiz/2594186781acb85b3400231486fba382 to your computer and use it in GitHub Desktop.
domain
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