Floating Action Button (FAB) in Flutter

This Flutter project demonstrates the implementation of a Floating Action Button (FAB) with various styles and functionalities.

Features

  • Basic Floating Action Button
  • FAB with Icon and Label
  • FAB with Custom Styling
  • FAB with Multiple Actions

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/fab_flutter.git
    
  2. Navigate to the project directory:
    cd fab_flutter
    
  3. Install dependencies:
    flutter pub get
    
  4. Run the app:
    flutter run
    

Usage

Basic FAB

FloatingActionButton(
  onPressed: () {
    // Action when pressed
  },
  child: Icon(Icons.add),
)

FAB with Label

FloatingActionButton.extended(
  onPressed: () {
    // Action when pressed
  },
  label: Text('Add Item'),
  icon: Icon(Icons.add),
)

Custom Styled FAB

FloatingActionButton(
  onPressed: () {},
  backgroundColor: Colors.purple,
  shape: RoundedRectangleBorder(
    borderRadius: BorderRadius.circular(12.0),
  ),
  child: Icon(Icons.edit),
)

Screenshots

(Add screenshots or GIFs of the FAB in action)

Contributing

Feel free to contribute by creating a pull request or submitting an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Libraries

fabbuttonnew