These are codes for my flutter class. Each lesson is a complete flutter app in itself which you can run using flutter run
command.
Lessons are organized serially and go from basic to advance stuffs.
Flutter Hello world project (flutter initial project created using flutter create
command)
- Demo of using multiple pages, using Navigator to navigate from one screen to another.
- Showing the use various basic widgets (Container, Column, Appbar, Scaffold etc)
Using Drawer Navigation, organizing code using functions and inline styling text using RichText and TextSpan widgets.
Using various types of buttons in flutter
- FlatButton
- RaisedButton
- RaisedButton.icon
- FlatButton.icon
- MaterialButton
- IconButton
- FloatingActionButton
Using containers and its various properties
- Container padding
- container decoration with gradients
- container with background colors
- container with decoration image (background image)
- and much more
- Read more about containers here
Various ways of using listviews, using listview to make master detail views
- Using simple
ListView
with children like using Column widget - Using
ListView.builder
to show the list of static data - Using
ListView.builder
to show the list of data fetched from API using http library - Passing data from listview to detail view to show detail on click the list item
A simple stateful widget, updating UI at runtime using setState() function inside stateful widget.
- basic structure of stateful widget
- showing and hiding widget based on state
- updating textfield text change in realtime
Showing Snackbar and Alert dialog - Two most common widgets to display messages and errors.
In this lesson you will learn how to make HTTP calls and display result using future builder
- In this lesson you will learn to integrate plugin to access native feature
- You will add
image_picker
plugin as dependency - You will use the
image_picker
plugin to access camera - You will use the
image_picker
plugin to pick image from gallery
In this lesson you will learn to
- Lift state up
- Send Function as parameter
- Change state of parent widget from child widget
In this lesson you will learn to
- Use shared preference library to save app data
- Use dart convert library to convert json to string and back
- Load data from shared preference and display on your app
In this lesson you will learn to
- Use http client to make http call
- Parse JSON result into map
- Use user defined data type to hold json objects returned
- Display the return result in the listview by using future builder