0% found this document useful (0 votes)
48 views

Index: © Frank Zammetti 2019 F. Zammetti, Practical Flutter

The document provides an index for key concepts in Flutter. It includes sections on Flutter fundamentals, Dart language features, common widgets, state management, and examples like building a notes app. The index contains over 350 entries and is intended to be a reference for looking up Flutter topics.

Uploaded by

Abd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Index: © Frank Zammetti 2019 F. Zammetti, Practical Flutter

The document provides an index for key concepts in Flutter. It includes sections on Flutter fundamentals, Dart language features, common widgets, state management, and examples like building a notes app. The index contains over 350 entries and is intended to be a reference for looking up Flutter topics.

Uploaded by

Abd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Index

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

Appointments entity (cont.) connector.create(), 319, 320


entry screen, 240, 241, 243 entity, 317
imports, 232 UserList.dart, 323–325
_showAppointments() method, 236 widget class, 318
showModalBottomSheet() LoginDialog.dart file (see LoginDialog.
function, 236 dart)
Slidable widget, 238 Model.dart file (see Model.dart)
Theme.of() function, 237 Room.dart file (see Room.dart)
TimeOfDay constructor, 238 collection library, 173, 176
model, 230, 231 collision() function, 374, 377
as keyword, 51 Column widget, 84, 86
Assertions, 71 Comet technique, 266
Asychronous programming, 71, 72 Comments, 39
Asynchronous JavaScript and XML connector.create() method, 320
(AJAX), 265, 266 Connector.dart
AudioCache class, 366, 367 CircularProgressIndicator, 290
audio_cache.dart module, 365 Client-bound message
handlers, 294–297
connectToServer(), 291, 292
B hidePleaseWait(), 291
Boolean values, 46 Server-bound message
BottomSheet widget, 132, 133 functions, 292–294
BoxConstraints class, 91 showDialog(), 290
break keyword, 52 socket.io, 289
connector.post() method, 335
connectToServer() function, 291
C ConstrainedBox widget, 91
Calendar Carousel, 232, 233, 236 Constructs, 51
Center widget, 88, 89 Contacts
Chip, 162–164 Contacts.dart, 245
CircularProgressIndicator, 157, 158 database worker, 244
clearCurrentRoomMessages() method, 288 entry screen, 250
Client-bound message handlers, 294–297 avatarFile, 253
Client side app build() method, 251
Connector.dart file (see Connector.dart) GestureDetector widgets, 255
CreateRoom.dart ImagePicker class, 255
building form, 320–322 keyboardType property, 254
build() method, 318 onPressed handler, 252

388
INDEX

renameSync() function, 257 convert, 173


_save() methods, 256 core, 172
TextFormField widgets, 251 io, 174
list screen math functions, 174, 175
CircleAvatar widget, 247 ui, 172
delete() method, 246 Dart, object-orientation
deleteSync() function, 250 abstract class, 65, 66
itemBuilder() function, 248 constructors, 60
join() method, 246 getters and setters, 63
onPressed event handler, 246 instance variables, 58
onTap handler, 247, 248 interfaces, 64
path property, 246 methods, 59, 60
ScopedModel, 245 operators, 67
substring() method, 247 subclasses, 62
model, 243, 244 this keyword, 61
Container widget, 89 visibility, 66
contains() method, 47, 49 Dart operators, 55–57
containsAll() method, 47, 49 DartPad, 38, 69
convert library, 176 Data types
Corona SDK, 3 Boolean values, 46
crypto library, 175 lists and maps, 46, 47, 49, 50
CupertinoApp widget, 87 numeric values, 45
CupertinoPageScaffold, 87 string values, 44
currentFrame property, 351 Data views
Custom operators, 57 DataTable widget, 150–152
GridView widget, 153, 154
ListTile widget, 156
D ListView widget, 155, 156
Dart, 5, 15 PageView widget, 157
benefits, 6 Table widget, 147–149
features, 7, 8 DecoratedBox widget, 138, 139
and Python, 7 Dictionary, 48
snapshots, 8 do and while loops, 52
specification, 8 Documentation comments, 40
Dart libraries, 171 Documented program
async, 172 element, 40
collection, 173 Drag-and-drop interaction, 146, 147

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

Form widget randomlyPositionObject(), 378


and cohorts, 109–111 reset game, 371–373
currentWidget, 113 transfer energy
decoration property, 114 else if branch, 379
GlobalKey class, 112 explosion, 380
key property, 112 GameObject class, 380
LoginData class, 112 LinearProgressIndicator, 379
_MyApp State class, 112 variables, 365, 366
TextFormField, 113 Game loop function
validator property, 113 animation, 373
Foundation library, 4 AudioCache, 375
frameCount property, 351, 352 collision() function, 374
frameSkip property, 351, 352 collisions, 375
Functions else branch, 375
forEach() method, 69 Enemy class, 374
greet() function, 68 explosions, 374, 376
main() function, 68 GameObject class, 374
nestedFunction(), 70 GameObject class
parameters, 68 animation, 352
API, 350
baseFilename, 350
G constructor, 351
Game Container, 353
animation frames, 346 draw() method, 352
assets directory, 344, 345, 347 Enemy class, 353, 354
GameObject class, 346 function, 349
layout, 343, 344 hierarchy, 348
main.dart file, 346 InputController (see Inputcontroller
story, 341, 343 class)
Game core logic main.dart (see main.dart source file)
AnimationController, 369 Player class (see Player class)
Animation object, 368 properties, 351
collision, 376–378 subclasses, 348
curve property, 369 Generators, 76, 77
first time initialization, 366, 367 Generics, 79, 80
main game loop function (see Game GlobalKey, 112
loop function) greetAgain() method, 68

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

mouse events, 364 Node, 260


Positioned wrapping, 361 defining, 260
services.dart module, 360 elementary, 264
Stack, 361, 364 installing and running, 261, 263
SystemUiOverlay.bottom element, 360 interaction, 263
TickerProviderStateMixin, 360 web site, 262
Map class, 48 Node Package Manager (NPM), 269, 270
MaterialApp widget, 87, 185 Notes, FlutterBook
material.dart library, 86 database layer
math package, 365 execute() method, 202
MediaQuery class, 367 init() method, 201
Metadata, 78 join() method, 202
Mobile development, 2 Note class, 203
Internet, 3 noteFromMap()
platforms, 2 function, 205, 206
SDKs, 2 NotesDBWorker class, 201
Model.dart path.dart module, 201
addMessage(), 287 query() method, 205
addRoomInvite(), 288 rawInsert() method, 204
clearCurrentRoomMessages(), 288 sqflite plugin, 201
properties, 285, 286 update() method, 206
removeRoomInvite(), 288 entry screen, 212, 213
setRoomList(), 287 build() method, 215
typical model class, 286 decoration, 219
Multi-line comments, 40 FocusScope class, 216
GlobalKey, 214
_save() method, 220, 221
N Scaffold widget, 216
Navigation widgets SnackBar message, 221
BottomNavigationBar, 99–102 TextFormFields, 214, 218
MaterialPageRoute, 98 trailing property, 217
pop() method, 98 update() method, 221
push() method, 98 list screen, 206
Stepper, 105–108 build() method, 207
TabBar, 102–104 _deleteNote() method, 211, 212
TabBarView, 102, 105 ListTile widget, 210
TabController, 104 ListView widget, 209
nextInt() method, 378 Scaffold, 208

393
INDEX

Notes, FlutterBook (cont.) pubspec.yaml file, 182, 183


secondaryActions list, 210 scoped_model, 184
showSnackBar() method, 212 sqflite, 184
SlidableDrawerDelegate() PopupMenuButton widget, 166, 167
instance, 209 Positioned widget, 353
model class, 199, 200 Projects
Notes.dart file, 197, 198 application, 21
Numeric values, 45 details, 23
numFrames property, 351 module, 22
package, 21
plugin, 21
O pubspec.yaml, 346, 347
Object-Oriented Programming, 348 pushNamedAndRemoveUntil()
obj.fakeMethod(), 49, 50 method, 312
onSelected handler function, 329
Opacity widget, 138
R
randomlyPositionObject(), 371, 378
P, Q remove() method, 49
Padding widget, 89 removeRoomInvite() method, 288
PalmOS, 2 resetGame() function, 371, 372
Personal Information RESTful servers, 264
Manager (PIM), 179, 180 Room.dart
Player class AlertDialog constructor, 337
anglesToRadiansConversion BoxDecoration class, 338
Table, 356, 358 build() method, 327
constructor, 356 connector.invite(), 340
directions, 358 connector.kick(), 339, 340
draw() method, 357 ExpansionPanelList
orientationChanged() method, 357 widget, 326, 327
track energy, 355 invite user dialog, 336
tricks, 355 itemBuilder function, 331
Plugins and configuration, FlutterBook leave string, 330
flutter_calendar_carousel widget, 184 main screen content, 331–335
flutter_slidable, 184 onSelected handler function, 329
image_picker, 184 PopupMenuEntry widgets, 331
intl, 184 RotatedBox, 91
path_provider, 184 Row widget, 84

394
INDEX

S StatefulWidget class, 28, 102, 118


State management, 192
sayName() method, 59
BaseModel class, 195
Scaffold widget, 87, 88, 102, 164, 216
entity’s screens, 195
scale() static method, 90
Server-bound message functions, 292–294 loadData() method, 196
Server code, 269 notifyListeners() method, 193
createServer() method, 272 scoped_model, 193
messages ScopedModelDescendent, 194
closing room, 282, 283 setStackIndex() method, 196
connection, 272 setState() paradigm, 193
inviting user to room, 280, 281 stateful widgets, 192
joining room, 278, 279 String values, 44
kicking user out of room, 283, 284 Switch statements, 52
leaving room, 281, 282
listing rooms, 277
T
listing users, 278
posting, 280 Tasks, 223
rooms, creation, 275, 276 database worker, 224
validating user, 273–275 entry screen, 228–230
NPM, 269 list screen
room descriptor objects, 271 build() function, 225
socket.io, 272 Checkbox, 226
user descriptor object, 271 DateTime constructor, 226
Set class, 47 deleteTask() method, 228
setRoomList() method, 287 loadData() method, 226
setUserList() method, 287 onTap() event handler, 228
showDatePicker() function, 120, 122, 191 Slidable, 226
showDialog() function, 124, 127, 212, model, 224
255, 290 Tasks.dart, 225
showTimePicker() function, 120, 122, 243 Text widget, 88, 91
SimpleDialog widget, 124–128 ThemeData widget, 87, 137
Single-line comments, 39 Ticker object, 368
SizedBox, 92, 290 Tokens, 39, 44
Skia, 4 Tooltip widget, 124
SnackBar widget, 130, 131 toString(), 49
someLongRunningFunction(), 72 transferEnergy() function, 379
Stack widget, 353 Transform widget, 90, 139, 140, 357

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

You might also like