Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


project03 - The third knockdown 👊

A Flutter project to showcase adding a Title and Floating Action Button (FAB)

This app focuses on adding a custom app title (app name) and FAB customisation by following these steps:

project03 > lib > main.dart

  1. floatingActionButton: FloatingActionButton We first use the floatingActionButton variable to store all the information about FAB. The FAB is used to allow user to start a primary action to the app.

  2. child: Icon(Icons.polymer, color: fabIconColor,) The child is used when we need to store some information into a bigger item. So here, we have FAB inside which we have its child for declaring the Icons class. The Icons is a class under the Icon widget class. We give it a property of color and assign it to the fabIconColor declared in line 6. See how to do this. As for the icon, we choose the polymer icon from the Material Icon asset.

  3. onPressed: () This method is called when we tap the FAB and want something to happen by the tap action. As for this project, it's kept blank. See docs.

  4. title: Text('Third Knockdown') We add a title property to the AppBar, adding a Text widget class to display a single style text i.e. our app name which we pass in as a String.