File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed
in_memory_todos_data_source/lib/src
todos_data_source/lib/src Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import 'package:uuid/uuid.dart';
33
44/// An in-memory implementation of the [TodosDataSource] interface.
55class InMemoryTodosDataSource implements TodosDataSource {
6- /// Map of ID -> Todo
6+ /// Map of ID -> ` Todo`
77 final _cache = < String , Todo > {};
88
99 @override
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import 'package:meta/meta.dart';
44
55part 'todo.g.dart' ;
66
7- /// {@template todo}
8- /// A single todo item.
7+ /// {@template ` todo` }
8+ /// A single ` todo` item.
99///
1010/// Contains a [title] , [description] and [id] , in addition to a [isCompleted]
1111/// flag.
@@ -20,37 +20,37 @@ part 'todo.g.dart';
2020@immutable
2121@JsonSerializable ()
2222class Todo extends Equatable {
23- /// {@macro todo}
23+ /// {@macro ` todo` }
2424 Todo ({
2525 this .id,
2626 required this .title,
2727 this .description = '' ,
2828 this .isCompleted = false ,
2929 }) : assert (id == null || id.isNotEmpty, 'id cannot be empty' );
3030
31- /// The unique identifier of the todo.
31+ /// The unique identifier of the ` todo` .
3232 ///
3333 /// Cannot be empty.
3434 final String ? id;
3535
36- /// The title of the todo.
36+ /// The title of the ` todo` .
3737 ///
3838 /// Note that the title may be empty.
3939 final String title;
4040
41- /// The description of the todo.
41+ /// The description of the ` todo` .
4242 ///
4343 /// Defaults to an empty string.
4444 final String description;
4545
46- /// Whether the todo is completed.
46+ /// Whether the ` todo` is completed.
4747 ///
4848 /// Defaults to `false` .
4949 final bool isCompleted;
5050
51- /// Returns a copy of this todo with the given values updated.
51+ /// Returns a copy of this ` todo` with the given values updated.
5252 ///
53- /// {@macro todo}
53+ /// {@macro ` todo` }
5454 Todo copyWith ({
5555 String ? id,
5656 String ? title,
Original file line number Diff line number Diff line change @@ -7,19 +7,19 @@ import 'package:todos_data_source/todos_data_source.dart';
77/// * U - Update
88/// * D - Delete
99abstract class TodosDataSource {
10- /// Create and return the newly created todo.
10+ /// Create and return the newly created ` todo` .
1111 Future <Todo > create (Todo todo);
1212
1313 /// Return all todos.
1414 Future <List <Todo >> readAll ();
1515
16- /// Return a todo with the provided [id] if one exists.
16+ /// Return a ` todo` with the provided [id] if one exists.
1717 Future <Todo ?> read (String id);
1818
19- /// Update the todo with the provided [id] to match [todo] and
20- /// return the updated todo.
19+ /// Update the ` todo` with the provided [id] to match [todo] and
20+ /// return the updated ` todo` .
2121 Future <Todo > update (String id, Todo todo);
2222
23- /// Delete the todo with the provided [id] if one exists.
23+ /// Delete the ` todo` with the provided [id] if one exists.
2424 Future <void > delete (String id);
2525}
You can’t perform that action at this time.
0 commit comments