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

Part1 Meet Flutter: The Widget Tree Widget Types and The State Object 60

This document outlines a tutorial on Flutter development that is split into 4 parts. Part 1 introduces Flutter and the Dart programming language. It covers building a basic counter app to demonstrate widgets, state, and layout. Part 2 discusses user interface design with Flutter, including common widgets, forms, gestures, and animations. Part 3 focuses on state management with routes, streams, and asynchronous programming. It also includes a section on infinite scrolling lists. Part 4 covers integrating Flutter apps with external data sources like HTTP requests and Firebase, as well as testing strategies.

Uploaded by

biruk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Part1 Meet Flutter: The Widget Tree Widget Types and The State Object 60

This document outlines a tutorial on Flutter development that is split into 4 parts. Part 1 introduces Flutter and the Dart programming language. It covers building a basic counter app to demonstrate widgets, state, and layout. Part 2 discusses user interface design with Flutter, including common widgets, forms, gestures, and animations. Part 3 focuses on state management with routes, streams, and asynchronous programming. It also includes a section on infinite scrolling lists. Part 4 covers integrating Flutter apps with external data sources like HTTP requests and Firebase, as well as testing strategies.

Uploaded by

biruk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

part1 meet flutter

1. PART-1 :- MEET FLUTTER;


1) meet Flutter
2) A Brief intro to dart
3) Breaking into flutter(54)
2. PART-2 FLUTTER USER INTERACTION, STYLES, AND ANIMATIONS(95)
1) Flutter Ui(important themes, widgets & layouts)(97)
2) User interaction : forms & gestures(129)
3) Pushing Pixels: flutter animation & using canvas(158)
3. PART-3 STATE MANAGEMENT & ASYNCHRONOUS DART(256)
1) Flutter routing in depth(191)
2) Flutter State management(212)
3) Async Dart & flutter & infinite scrolling(236)
4. PART-4(265)

~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

3 Breaking into Flutter 54


3.1 Intro to the counter app 55
Flutter project structure 56 ■ Anatomy of a Flutter app 56
Again, everything is a widget 57 ■ The build method 58
The new and const constructors in Flutter 59 ■ Hot reload 59
3.2 Widgets: The widget tree, widget types, and the State object 60
Stateless widgets 61 ■ Stateful widgets 62 ■ setState 64
initState 66
3.3 BuildContext 67
3.4 Enhancing the counter app with the most important widgets 68
RaisedButton 68
3.5 Favor composition in Flutter (over inheritance) 69
What is composition? 69 ■ An example of composition in Flutter 71
3.6 Intro to layout in Flutter 72
Row and Column 72 ■ Layout constraints in Flutter 74
RenderObject 74 ■ RenderObject and constraints 75
RenderBoxes and layout errors 75 ■ Multi-child widgets 76
Icons and the FloatingActionButton 78 ■ Images 80
Container widget 81
3.7 The element tree 83
Elements and widgets 85 ■ Exploring the element tree with an example 86
■ The element tree and State objects 88 ■ Widget keys 90
3.8 A final note 92
3.9 Summary 93

PART 2 FLUTTER USER INTERACTION, STYLES, AND ANIMATIONS...........95


4 Flutter UI: Important widgets, themes, and layout 97
4.1 Setting up and configuring a Flutter app 99
Configuration: pubspec.yaml and main.dart 99
SystemChrome 1014.2 Structural widgets and more configuration 102
MaterialApp widget 102 ■ The Scaffold widget 104 ■ AppBar
widget 106
4.3 Styling and themes in Flutter 108
Theme widget 108 ■ MediaQuery and the of method 110
ScreenAwareSize method 111

1/3
4.4 Common layout and UI widgets 112
■ Table widget 116 ■ TabBar widget 122
4.5 ListView and builders 126
5 User interaction: Forms and gestures 129
5.1 User interaction and gestures 130
The GestureDetector widget 130 ■ GestureDetector in
practice 131 ■ The Dismissible widget 134
5.2 Flutter forms 136
The Form widget 137 ■ GlobalKey<FormState> 138 ■ The structure
of the AddCityPage form 138 ■ Implementing the form in the weather
app 140
5.3 FormField widgets 141
The TextFormField widget 142 ■ The DropdownFormButton
widget 143 ■ Generic form fields 146
5.4 Form UI and working with focus nodes 147
InputDecoration 147 ■ Improving the UI with FocusNodes 149
5.5 Managing form state with form methods 151
Form.onChange 152 ■ FormState.save 153
Form.onWillPop 155
5.6 Summary 157
6 Pushing pixels: Flutter animations and using the canvas 158
6.1 Introducing Flutter animations 159
Tweens 160 ■ Animation curves 161 ■ Ticker providers 162
AnimationController 162 ■ AnimatedWidget 163 ■ Implement
ing the animation controller and tween for the background 166
6.2 CustomPainter and the canvas 172
The shapes used to make up the clouds 173 ■ Defining the
CustomPainter and the Paint object 173 ■ The CustomPainter
paint method 175
6.3 Staggered animations, TweenSequence, and built-in animations 179
Creating a custom animation state class 179 ■ Built-in animation
widgets: SlideTransition 182 ■ Building animations for the
Clouds widget 184 ■ TweenSequence 185
6.4 Reusable custom color transition widgets 187
PART 3 STATE MANAGEMENT AND ASYNCHRONOUS DART .................189
7 Flutter routing in depth 191
7.1 Routing in Flutter 192
The Farmers Market app 192 ■ The app source code 193
7.2 Declarative routing and named routes 193
Declaring routes 194 ■ Navigating to named routes 195
MaterialDrawer widget and the full menu 197 ■ Menu items
and the appropriate widgets: ListView and ListItems 198
NavigatorObserver: Highlighting the active route with
RouteAware 201
7.3 Routing on the fly 204
MaterialRouteBuilder 204 ■ showSnackBar, showBottomSheet,
and the like 205
7.4 Routing animations 209
7.5 Summary 211
8 Flutter state management 212
8.1 Deep dive into StatefulWidgets 213
The widget tree and the element tree 213 ■ The StatefulWidget
lifecycle and when to do what 214
8.2 Pure Flutter state management: The InheritedWidget 216
Creating a Central Store wth an InheritedWidget/StatefulWidget
team 218 ■ The inheritFromWidgetOfExactType and of
methods 218 ■ Use the of method to lift up state 222

2/3
State management patterns beyond Flutter 224
8.3 Blocs: Business Logic Components 225
How do blocs work? 227 ■ Implementing the bloc
architecture 228 ■ Intro to streams and async Dart 231
Implementing streams in the CartBloc 232
8.4 Summary 235
9 Async Dart and Flutter and infinite scrolling 236
9.1 Async Dart 237
Future recap 237 ■ The async/await keywords 239 ■ Catching
errors with futures 240 ■ Catching errors with try and catch 241
9.2 Sinks and streams (and StreamControllers) 242
Anatomy of the observer pattern with Dart streams 243
Implementing streams 243 ■ Broadcasting streams 245
Higher-order streams 247
9.3 Using streams in blocs 250
Blocs use inputs and outputs 250 ■ Implementing a bloc input 253
9.4 Async Flutter: StreamBuilder 254
9.5 Infinite and custom scrollable widgets 255
CustomScrollView and slivers 256 ■ Catalog widget scroll view 256
The SliverGrid widget 260 ■ Delegates 260 ■ Custom slivers 261
PART 4 BEYOND FOUNDATIONS ........................................265
10 Working with data: HTTP, Firestore, and JSON 267
10.1 HTTP and Flutter 268
HTTP package 269 ■ GET requests 269
10.2 JSON serialization 270
Manual serialization 271 ■ Auto-generated JSON serialization 275
Updating the Todo class 275 ■ Bringing it all together in the UI 277
10.3 Working with Firebase in Flutter 281
Installing Firestore 282 ■ Create a Firestore project 283
Configure your app 283 ■ Add Firebase to your pubspec 286
Using Firestore 286
10.4 Dependency injection 288
10.5 Summary 291
11 Testing Flutter apps 292
11.1 Tests in Flutter 293
Dart unit tests 293 ■ Using mockito to test methods that need external
dependencies 297 ■ Flutter widget tests 300 ■ Flutter integration
tests 303 ■ Performance profiling integration tests 307
11.2 Accessibility with the semantics widgets 310
11.3 Next steps with Flutter 311

3/3

You might also like