Session #03
Ishita Satpathy
@firstnamelastname
Handling State and Data
Handling State and Data
Topics we will be Covering
● State
●Stateless vs Stateful Widgets
●Navigation
State
The state is information that can read simultaneously when
the widget is built and might change during runtime, in short,
we can say that the State defines the current properties of
the Widget.
According to state, widgets are divided into:
●Stateless widget
●Stateful widget
Stateless Widget
● They are static widgets; they are updated only
when initialized.
●It is not dependent on data changes or
behavior changes
●Examples are Text, Icons, or a RaisedButton.
Stateful Widget
● They are dynamic in nature.
●It is dependent on changes when user
interacts.
●Examples are Checkbox, Radio Button,
Slider.
• Routes- In flutter terminology screen or pages are referred to as
Routes.
• By making use of routes we navigate between pages.
• To navigate between two or more routes we make use of Navigator.
The basic steps now to follow are:
● Create two screens
● Define routes
● Navigate between them using:
● Navigator.pushNamed(): To move to second screen.
● Navigator.pop(): To move to previous screen.
Navigation
Question And Answer

Flutter-Festivals Day-3.pptx

  • 1.
  • 2.
    Handling State andData Topics we will be Covering ● State ●Stateless vs Stateful Widgets ●Navigation
  • 3.
    State The state isinformation that can read simultaneously when the widget is built and might change during runtime, in short, we can say that the State defines the current properties of the Widget. According to state, widgets are divided into: ●Stateless widget ●Stateful widget
  • 4.
    Stateless Widget ● Theyare static widgets; they are updated only when initialized. ●It is not dependent on data changes or behavior changes ●Examples are Text, Icons, or a RaisedButton.
  • 5.
    Stateful Widget ● Theyare dynamic in nature. ●It is dependent on changes when user interacts. ●Examples are Checkbox, Radio Button, Slider.
  • 6.
    • Routes- Influtter terminology screen or pages are referred to as Routes. • By making use of routes we navigate between pages. • To navigate between two or more routes we make use of Navigator. The basic steps now to follow are: ● Create two screens ● Define routes ● Navigate between them using: ● Navigator.pushNamed(): To move to second screen. ● Navigator.pop(): To move to previous screen. Navigation
  • 7.