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';
3
3
4
4
/// An in-memory implementation of the [TodosDataSource] interface.
5
5
class InMemoryTodosDataSource implements TodosDataSource {
6
- /// Map of ID -> Todo
6
+ /// Map of ID -> ` Todo`
7
7
final _cache = < String , Todo > {};
8
8
9
9
@override
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import 'package:meta/meta.dart';
4
4
5
5
part 'todo.g.dart' ;
6
6
7
- /// {@template todo}
8
- /// A single todo item.
7
+ /// {@template ` todo` }
8
+ /// A single ` todo` item.
9
9
///
10
10
/// Contains a [title] , [description] and [id] , in addition to a [isCompleted]
11
11
/// flag.
@@ -20,37 +20,37 @@ part 'todo.g.dart';
20
20
@immutable
21
21
@JsonSerializable ()
22
22
class Todo extends Equatable {
23
- /// {@macro todo}
23
+ /// {@macro ` todo` }
24
24
Todo ({
25
25
this .id,
26
26
required this .title,
27
27
this .description = '' ,
28
28
this .isCompleted = false ,
29
29
}) : assert (id == null || id.isNotEmpty, 'id cannot be empty' );
30
30
31
- /// The unique identifier of the todo.
31
+ /// The unique identifier of the ` todo` .
32
32
///
33
33
/// Cannot be empty.
34
34
final String ? id;
35
35
36
- /// The title of the todo.
36
+ /// The title of the ` todo` .
37
37
///
38
38
/// Note that the title may be empty.
39
39
final String title;
40
40
41
- /// The description of the todo.
41
+ /// The description of the ` todo` .
42
42
///
43
43
/// Defaults to an empty string.
44
44
final String description;
45
45
46
- /// Whether the todo is completed.
46
+ /// Whether the ` todo` is completed.
47
47
///
48
48
/// Defaults to `false` .
49
49
final bool isCompleted;
50
50
51
- /// Returns a copy of this todo with the given values updated.
51
+ /// Returns a copy of this ` todo` with the given values updated.
52
52
///
53
- /// {@macro todo}
53
+ /// {@macro ` todo` }
54
54
Todo copyWith ({
55
55
String ? id,
56
56
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';
7
7
/// * U - Update
8
8
/// * D - Delete
9
9
abstract class TodosDataSource {
10
- /// Create and return the newly created todo.
10
+ /// Create and return the newly created ` todo` .
11
11
Future <Todo > create (Todo todo);
12
12
13
13
/// Return all todos.
14
14
Future <List <Todo >> readAll ();
15
15
16
- /// Return a todo with the provided [id] if one exists.
16
+ /// Return a ` todo` with the provided [id] if one exists.
17
17
Future <Todo ?> read (String id);
18
18
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` .
21
21
Future <Todo > update (String id, Todo todo);
22
22
23
- /// Delete the todo with the provided [id] if one exists.
23
+ /// Delete the ` todo` with the provided [id] if one exists.
24
24
Future <void > delete (String id);
25
25
}
You can’t perform that action at this time.
0 commit comments