Index: © Frank Zammetti 2019 F. Zammetti, Practical Flutter
Index: © Frank Zammetti 2019 F. Zammetti, Practical Flutter
A main() method, 28
MaterialApp widget, 28
addListener() method, 370
MyApp class, 28
addRoomInvite() method, 288
MyHomePage class, 28
AlertDialog widget, 128, 129
runApp() method, 28
Align widgets, 89
Scaffold, 29
AlwaysStoppedAnimation widget, 362
structure, 31, 32
Android Studio, 19–20
hot reload icon, 30 android directory, 33
.idea directory, 34 .gitignore, 34
virtual machine dropdown, 24 ∗.iml, 34
AnimatedContainer widget, 141–142 ios directory, 33
AnimatedCrossFade widget, 142–143 lib directory, 33
Animation object, 368, 369 .metadata, 34
animationCallback property, 351 .packages, 34
AnimationController, 368–370 pubspec.lock and pubspec.yaml, 34
Animations and transitions, 140 readme file, 35
AnimatedContainer widget, 141, 142 res directory, 33
AnimatedCrossFade widget, 142, 143 test directory, 33
AnimatedDefaultTextStyle, 144, 145 Appointments entity, 230
AnimatedOpacity widget, 145 Appointments.dart, 231
AnimatedPositioned widget, 145 database worker, 231
Animated∗ widget, 145 list screen
Stack widget, 145 build() method, 234, 235
∗Transition widget, 145 Calendar Carousel, 232, 233, 236
APIs, 167, 168 with date indicators, 234
Application DateTime constructor, 233
build() method, 28 decoration, 233
Center widget, 29 _deleteAppointment() method, 239
Column widget, 29 Divider widget, 237
FAB, 25 _editAppointment method, 239
387
© Frank Zammetti 2019
F. Zammetti, Practical Flutter, https://doi.org/10.1007/978-1-4842-4972-7
INDEX
388
INDEX
389
INDEX
E Google, 15
mobile, 14
Enumerations, 50
reactive programming and state
Exception handling, 74–76
management, 16
Expanded widgets, 89, 236
widget tree, 15
FlutterBook
F app code structure, 185
fakeMethod(), 49 appointments and contacts
firstTimeInitialization() entity list, 180
function, 360, 366, 372 async function, 187
FittedBox, 91 configuration and plugins (see Plugins
FloatingActionButton widget, 164 and configuration, FlutterBook)
backgroundColor property, 166 DefaultTabController, 189
onPressed property, 166 FlutterBook class, 188
Scaffold widget, 164 getApplicationDocumentsDirectory()
shape property, 166 function, 187
Floating Action Button getTemporaryDirectory()
(FAB), 25, 235, 245, 314 function, 187
Flow control (and logic!) constructs main.dart file, 186
if statements, 53 main() function, 187
looping, 51, 52 notes and tasks entity list, 181
switch statements, 52 FlutterChat, 259
Flutter administrative privileges, 260
benefits Drawer widget, 260
cross-platform, 14 server code (see Server code)
Dart, 15 users, 260
hot reload, 14 FlutterChat, Clientside app
platform-specific widgets, 17 main.dart
tooling, 16 build() method, 300
widgets, 15 login dialog, 298, 299
defining, 3 named routes, 300
design APIs, 4 startMeUp() function, 298
design widgets, 4 FlutterPad, 38
goal, 4 Flutter SDK, 17
pitfalls commands, 18
app size, 17 flutter doctor, 18
code comingling, 14 forEach() method, 49, 69
390
INDEX
391
INDEX
H is keywords, 51
isNotEmpty() method, 49
Hash, 48
hashCode(), 49
hidePleaseWait() function, 291 L
Hot reload, 29
Layout widgets
in Android Studio, 30
basics, 84, 86
benefits, 31
Card, 92–94
working, 29
Divider, 92
Drawer, 94, 96, 97
I, J, K MyApp class, 86
Libraries, 73, 74
Icon widget, 158
Libraries, Flutter framework
Flutter Playground app, 159
animation, 168
font_awesome_flutter plugin, 160
foundation, 169
Icons class, 158
gestures, 169
If statements, 53
painting, 170
Image widget, 161–162
services, 170, 171
InputController class, 364, 370
widgets, 171
DragStartDetails object, 383
LinearProgressIndicator, 158
DragUpdateDetails, 384
loadAll() method, 367
firstTimeInitialization() method, 382
LoginDialog.dart
GestureDetector’s event, 382
AppDrawer, 309–312
onPanEnd event, 384
build() method, 303
onPanStart(), 383
GlobalKey, 302
onPanUpdate() function, 383
Home.dart file, 308, 309
virtual joystick, 382
Lobby.dart file, 313–316
Input widgets
user login, 306, 307
Checkbox, 114–117
Looping, 51, 52
date and time pickers, 120–123
dismissible, 123
Form widget (see Form widget) M
Radio, 119, 120
main.dart source file
Slider, 118
build() method, 361, 364
Switch, 118
explosions, 363
Internet Engineering Task
GameScreenState class, 360
Force (IETF), 266
GestureDetector widget, 364
isEmpty() method, 49
LinearProgressIndicator, 362, 363
392
INDEX
393
INDEX
394
INDEX
395
INDEX
U clearPreferences
message, 267
UI structure, 185
Comet technique, 266
UltimateHero class, 62
emit() method, 267
UserList.dart, 323–325
hanging-GET, 266
Utilities
with JavaScript API, 267
BaseModel, 191
on() method, 267
path_provider, 192
polling approach, 265
setChosenDate() function, 191
protocol, 266
showDatePicker() function, 191
subscribe() method, 268
split() function, 191
upgrade, 266, 267
utils.dart file, 189
Widgets, 9, 15
build() method, 10
V Flutter UIs, 13
valueColor property, 157, 362 hierarchy, 10
Variables, 41 StatefulWidget, 11, 12
const and final keywords, 43 StatelessWidget, 11
declaration and initialization, 42 user interface, 10
visible property, 351 WidgetsApp widget, 86
void keyword, 54, 55 Widgets, styling, 135
DecoratedBox, 138, 139
opacity, 138
W, X, Y, Z Theme and
WebSockets and socket.io, 265 ThemeData, 136–138
AJAX, 265 transform, 139, 140
396