- Introduction
- Basics
- App1 : Elon Musk’s Resume
- App2 : 5K Quotes
- App3 : Calculator
- App4_v1 : Flags Quiz
- Running Apps On Different Devices
- Debbuging
- App5 : Yacht Charter
- App6_v1 : My Books
- Creating responsive and adaptive apps
- App6_v2: My Books
- App7 : Short Vacation
- App8 : Movie Time
- App9 : Schedule Planner
- Shared Preferences
- App10 : Local Weather
- App11 : Discover Tunisia
App2 : 5K Quotes - Learning New Widgets
Table Of Content :
- FloatingActionButton
- child : Widget
- backgroundColor : Color
- foregroundColor : Color
- onPressed : VoidCallback (that have no arguments and return no data )
- Image
A floating action button is a circular icon button that hovers over content to promote a primary action in the application. Floating action buttons are most commonly used in the Scaffold.floatingActionButton field.
Some properties of FloatingActionButton Class:
The widget below this widget in the tree.
The button's background color.
The default foreground color for icons and text within the button.
The callback that is called when the button is tapped or otherwise activated.
We will see more properties in the next apps.
Example :
floatingActionButton: FloatingActionButton(
child: Icon(Icons.update),
onPressed: () {
print("updated");
},
backgroundColor: Colors.redAccent,
foregroundColor: Colors.yellow,
),
A widget that displays an image.
Second Method : Image.asset( path )
In the next lesson, you will learn how to include images in your app before using them.
Example
Image.asset("assets/images/heart.jpg"),