Preface |
|
xiii | |
Author |
|
xv | |
|
Chapter 1 Dart Fundamentals: A Quick Reference to Dart 2 |
|
|
1 | (14) |
|
|
1 | (1) |
|
|
2 | (1) |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
Intersection of Two Set(s) |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
Iterating Key/Value Pairs |
|
|
7 | (1) |
|
|
8 | (2) |
|
|
10 | (2) |
|
|
12 | (1) |
|
|
12 | (3) |
|
Chapter 2 Introduction to Flutter |
|
|
15 | (8) |
|
|
15 | (3) |
|
|
18 | (2) |
|
|
20 | (1) |
|
|
20 | (3) |
|
Chapter 3 Setting Up Environment |
|
|
23 | (12) |
|
System Requirements for macOS |
|
|
23 | (1) |
|
|
23 | (2) |
|
Setting Up for the Android Platform |
|
|
25 | (2) |
|
Setting Up for the iOS Platform |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (1) |
|
|
32 | (3) |
|
Chapter 4 Flutter Project Structure |
|
|
35 | (12) |
|
|
35 | (1) |
|
|
36 | (3) |
|
Cross-Platform Flutter Project Structure |
|
|
39 | (1) |
|
Running Default App: Android, iOS, Web, and Desktop |
|
|
40 | (1) |
|
|
41 | (4) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
46 | (1) |
|
Chapter 5 Flutter App Structure |
|
|
47 | (16) |
|
|
48 | (1) |
|
Display `Hello Books' Text |
|
|
49 | (2) |
|
Add Cushion Around the Text |
|
|
51 | (2) |
|
|
53 | (1) |
|
|
53 | (1) |
|
|
53 | (8) |
|
|
61 | (1) |
|
|
61 | (2) |
|
Chapter 6 Flutter Widgets |
|
|
63 | (24) |
|
|
63 | (2) |
|
|
65 | (3) |
|
|
68 | (3) |
|
FutureBuilder Async Widget |
|
|
71 | (3) |
|
|
74 | (2) |
|
StreamBuilder Async Widget |
|
|
76 | (2) |
|
|
78 | (5) |
|
|
83 | (1) |
|
|
84 | (3) |
|
Chapter 7 Building Layouts |
|
|
87 | (40) |
|
Revisiting HelloBooksApp Layout |
|
|
87 | (2) |
|
|
89 | (1) |
|
|
90 | (7) |
|
|
97 | (2) |
|
|
99 | (2) |
|
|
101 | (2) |
|
|
103 | (2) |
|
|
105 | (5) |
|
|
110 | (2) |
|
|
112 | (3) |
|
|
115 | (2) |
|
|
117 | (1) |
|
|
117 | (2) |
|
|
119 | (2) |
|
|
121 | (2) |
|
|
123 | (1) |
|
|
124 | (3) |
|
Chapter 8 Responsive Interfaces |
|
|
127 | (16) |
|
|
127 | (1) |
|
|
128 | (4) |
|
|
132 | (2) |
|
FractionallySizedBox Widget |
|
|
134 | (3) |
|
|
137 | (1) |
|
|
137 | (2) |
|
|
139 | (2) |
|
|
141 | (2) |
|
Chapter 9 Building User Interface for BooksApp |
|
|
143 | (10) |
|
|
143 | (1) |
|
|
143 | (1) |
|
Implementing User Interface |
|
|
144 | (4) |
|
Custom Widget: BooksListing |
|
|
148 | (3) |
|
|
151 | (1) |
|
|
151 | (2) |
|
Chapter 10 Flutter Themes |
|
|
153 | (16) |
|
|
153 | (4) |
|
|
157 | (2) |
|
|
159 | (1) |
|
|
160 | (3) |
|
|
163 | (4) |
|
|
167 | (1) |
|
|
168 | (1) |
|
Chapter 11 Persisting Data |
|
|
169 | (20) |
|
|
169 | (1) |
|
Key/Value Data Store (Shared Preferences Plugin) |
|
|
169 | (4) |
|
Local Database (Moor Library) |
|
|
173 | (7) |
|
Light Theme on Multiple Platforms |
|
|
180 | (2) |
|
Dark Theme on Multiple Platforms |
|
|
182 | (4) |
|
|
186 | (1) |
|
|
187 | (2) |
|
Chapter 12 Integrating REST API |
|
|
189 | (14) |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
190 | (2) |
|
|
192 | (1) |
|
Building Simple Interface |
|
|
193 | (3) |
|
|
196 | (2) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
201 | (2) |
|
|
203 | (26) |
|
|
203 | (4) |
|
List-View Widget: Listing Entries |
|
|
207 | (2) |
|
|
209 | (8) |
|
|
217 | (3) |
|
Converting API Response to BookModel List |
|
|
220 | (1) |
|
|
221 | (6) |
|
|
227 | (1) |
|
|
228 | (1) |
|
Chapter 14 Navigation and Routing |
|
|
229 | (12) |
|
Simple BookDetailsPage Screen |
|
|
229 | (3) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
236 | (1) |
|
|
236 | (1) |
|
|
237 | (1) |
|
The generateRoute () Function |
|
|
237 | (1) |
|
|
238 | (1) |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
239 | (2) |
|
Chapter 15 The Second Page - BookDetailsPage Widget |
|
|
241 | (10) |
|
Anatomy of BookDetailsPage Widget |
|
|
241 | (1) |
|
BookDetailsPage Screen's Layout |
|
|
242 | (1) |
|
Implementing BookDetailsPage Widget |
|
|
243 | (6) |
|
|
249 | (1) |
|
|
249 | (2) |
|
Chapter 16 Introduction to State Management |
|
|
251 | (6) |
|
Revisiting Default CounterApp |
|
|
251 | (1) |
|
|
252 | (3) |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
257 | (8) |
|
Using ValueNotifier Approach |
|
|
257 | (5) |
|
|
262 | (1) |
|
|
262 | (3) |
|
Chapter 18 Provider and ChangeNotifier |
|
|
265 | (6) |
|
|
265 | (1) |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
267 | (1) |
|
Custom Widget: CountWidget |
|
|
267 | (1) |
|
|
268 | (2) |
|
|
270 | (1) |
|
|
270 | (1) |
|
Chapter 19 BLoC Design Pattern |
|
|
271 | (16) |
|
|
271 | (1) |
|
|
271 | (2) |
|
Basic BLoC Pattern Implementation |
|
|
273 | (3) |
|
|
276 | (1) |
|
|
276 | (1) |
|
Event Stream/CounterBloc Constructor |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
277 | (1) |
|
|
277 | (2) |
|
Improvised BLoC Pattern Implementation |
|
|
279 | (1) |
|
|
280 | (1) |
|
|
280 | (1) |
|
|
281 | (1) |
|
Implementing BLoC Pattern Using Library |
|
|
282 | (3) |
|
|
285 | (1) |
|
|
285 | (2) |
|
|
287 | (10) |
|
|
287 | (1) |
|
|
287 | (5) |
|
|
292 | (2) |
|
|
294 | (1) |
|
|
295 | (1) |
|
|
295 | (2) |
|
Chapter 21 Widget Testing |
|
|
297 | (10) |
|
|
297 | (1) |
|
|
298 | (7) |
|
|
305 | (1) |
|
|
305 | (1) |
|
|
305 | (2) |
|
Chapter 22 Integration Testing |
|
|
307 | (8) |
|
|
307 | (1) |
|
|
307 | (3) |
|
|
310 | (1) |
|
Writing Integration Tests |
|
|
310 | (3) |
|
Running Integration Tests |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
314 | (1) |
|
Chapter 23 Rolling into the World |
|
|
315 | (16) |
|
|
315 | (1) |
|
|
316 | (6) |
|
|
322 | (5) |
|
|
327 | (3) |
|
Releasing Desktop (macOS) Apps |
|
|
330 | (1) |
Conclusion |
|
331 | (1) |
References |
|
331 | (2) |
Index |
|
333 | |