teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

修正依頼があったので変更

2021/06/12 02:23

投稿

kimidoro
kimidoro

スコア11

title CHANGED
File without changes
body CHANGED
@@ -23,7 +23,7 @@
23
23
  elevation: 3,
24
24
  child: InkWell(
25
25
  onTap: ()async{
26
- await deleteBook(context , model , todo);
26
+ await ViewBook(context , model , todo);
27
27
  Navigator.push(
28
28
  context,
29
29
  MaterialPageRoute(builder: (context) => ViewPage()));
@@ -94,6 +94,10 @@
94
94
  ).toList(),
95
95
  );
96
96
  }),
97
+ Future ViewBook(BuildContext context , TeaProvider model , Todo todo) async {
98
+
99
+ await model.getTapmodel(todo);
100
+ }
97
101
  ```
98
102
 
99
103
  ```dart
@@ -159,7 +163,24 @@
159
163
  );
160
164
  }
161
165
  }
162
-
163
166
  ```
167
+ ```dart
168
+ class Todo {
169
+ Todo(DocumentSnapshot doc){
170
+ this.documentID = doc.id;
171
+ this.title = doc['title'];
172
+ this.recipe = doc['recipe'];
173
+ this.material = doc['material'];
174
+ this.time = doc['time'];
175
+ this.name = doc['name'];
176
+ }
177
+ String documentID;
178
+ String time;
179
+ String material;
180
+ String recipe;
181
+ String title;
182
+ String name;
183
+ }
184
+ ```
164
185
  ![イメージ説明](d17f6ad7e6de21e6cdfff97adb313894.png)
165
186
  ![イメージ説明](4d2ed52fdebe6c1ad79ea6ff6640c994.jpeg)