0. Environment Setup

  • Download Flutter sdk.
  • Add Flutter bin path to environment path
  • Download Android Studio and install it.
  • Open Android Studio Plugins and Install plugins: Flutter. and Dart .
  • Run the “flutter doctor” command. and follow the output

1. Declarative UI vs Imperative

  • Declarative: means that Flutter builds its user interface to reflect the current state of your app.
    When the state of your app changes, that triggers a redraw of the user interface.
  • Imperative: means changing of the UI itself (like widget.setText)
    Understanding UI Paradigms
    Simple Example to show difference

2. Everything is Widget

  • Navigator and routes
  • Clear the main.dart from all code, then inside the lib folder create folder “pages’
  • Create 3 dart files ‘page1.dart, page2.dart, page3.dart’ each one is stateless widgets.
  • In the main , inside the material app specify the home: to be Page1
  • In Page1:
    • Add an app bar,and a centered button “Go to Page2”
    • On click on button , use Navigator.push
  • Switch to Routes and Push Named
    • Create 3 pages Home,Settings,Notifications
    • In the main inside the material app , add **routes **: {‘/page2’:(context)=>Page2()}
    • In Page 1 replace Navigator.push with Navigator.pushNamed
  • Bottom Navigation
    • BottomNavigationBar , BottomNavigationBarItem
    • Create int _currentPageand a List<Widget>_pages,
    • Inside the scaffold , make body: _pages[_currentPage]
    • Inside Scaffold use the **bottomNavigationBar **property
    • In the BottomNavigationBar pass currentIndex: _currentPage and in to **onTap: **use **setSate **to change the value of _currentPage
  • Task2: Food Navigation Figma

4. Stateless VS Stateful

  • Create a new project (default counter) , clear it and rewrite it.
  • Start with creating new Stateful Widget CounterScreen
  • Mention that any stateful need
    • Variable to hold the state: like: counter
    • Method to update the state : like setState()
    • UI to respond to state changes
  • **Stateful **widget means that a widget can **change **based on the state.
  • Stateless means that that widget does not change ever
  • Life Cycle of stateful widget: article
  • Task3: Calculator Screen Figma
  • Text Inputs

  • Create a new project, clear the default code. The app Asks user to enter some info, and click OK, then navigate to another screen to show the inputs added from the previous screen.

  • Task4: Todo App Figma

    • Login,
    • Show list of Items,
    • Each Item contains checkbox, swipe to delete Slide to delete package
    • There is a floating action button to add a new task , it opens a dialog to enter task details.

6. Reference 9 hours video Youtube