FloatingActionButton (FAB) is a Flutter Material widget that renders a prominent button floating above a screen's content, intended for that screen’s single most important action. In Material 3 (the default since Flutter 3.16), it uses a rounded-square shape by default; the classic circular look from Material 2 is still available via shape: CircleBorder().
It's typically placed through Scaffold's floatingActionButton slot rather than directly inside the body layout. Material 3 provides three standard sizes – FloatingActionButton.small, the default size, and .large – as well as .extended, which displays an icon and label in a wider, pill-shaped button.
FloatingActionButton in Flutter is part of the core Material library and requires no additional package.Scaffold.floatingActionButton, not as a regular child widget in the body.FloatingActionButton.extended adds a label next to the icon; .small and .large change only the FAB’s size.heroTag. Using more than one FAB with the default tag on the same route causes a runtime error; assign unique heroTag values when multiple FABs are needed.A FloatingActionButton needs an onPressed callback and usually an Icon as its child.
import 'package:flutter/material.dart';
class NoteEditorScreen extends StatelessWidget {
const NoteEditorScreen({super.key, required this.onAddNote});
final VoidCallback onAddNote;
@override
Widget build(BuildContext context) {
return Scaffold(
body: const Center(child: Text('Notes')),
floatingActionButton: FloatingActionButton(
onPressed: onAddNote,
tooltip: 'Add note',
child: const Icon(Icons.add),
),
);
}
}Scaffold positions the FAB automatically. By default, it uses FloatingActionButtonLocation.endFloat, which places the FAB near the bottom end of the Scaffold (typically the bottom-right). You can customize its position through Scaffold.floatingActionButtonLocation, for example with FloatingActionButtonLocation.centerFloat or FloatingActionButtonLocation.centerDocked.
See the FloatingActionButtonLocation documentation for the available positioning options.
Two FABs on the same route without a distinct heroTag trigger "there are multiple heroes that share the same tag" at runtime, because Flutter derives a default tag from the FAB's type.
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
FloatingActionButton(
heroTag: 'fab-camera',
onPressed: () {},
child: const Icon(Icons.camera_alt),
),
FloatingActionButton(
heroTag: 'fab-gallery',
onPressed: () {},
child: const Icon(Icons.photo_library),
),
],
),Give each FAB a unique heroTag if you want to keep Hero animations. Alternatively, set heroTag: null to disable the Hero for a FAB.
.extended to pair the icon with a short label for clarity.AppBar.AppBar, or a BottomAppBar instead.heroTag.tooltip for icon-only FABs – it describes the action and provides a textual representation that can improve accessibility.heroTag values when multiple FABs share a route – the default tag is shared, so multiple FABs on the same route otherwise cause a Hero tag conflict. Set heroTag: null instead if you don't want a FAB to participate in Hero animations..extended when the action isn't self-evident from an icon alone – a label removes the guesswork.Scaffold.floatingActionButtonLocation for standard positioning rather than manually positioning the FAB with Stack or Positioned.floatingActionButtonTheme for consistent styling – configure ThemeData.floatingActionButtonTheme when you want to apply shared FAB properties such as colors, shape, or elevation across the app instead of repeating them on individual buttons.heroTag. By default, FABs use a shared hero tag. If multiple FABs with the default tag are present on the same route, Flutter throws a Hero tag conflict. Give each FAB a unique heroTag, or set heroTag: null if it should not participate in Hero animations.FloatingActionButton inside the body instead of Scaffold.floatingActionButton. This bypasses Scaffold's standard FAB positioning and its integration with locations such as centerDocked, where a BottomAppBar can provide a notch for the FAB.FilledButton or OutlinedButton, depending on its emphasis.tooltip because "the icon is obvious." A tooltip describes the action and provides a textual representation that can improve accessibility, especially when the action is represented by an icon alone.
Flutter ships with plenty of high-quality widgets, layouts, and themes that developers can use to speed up the whole creation process. A great example of custom widgets made in Flutter is the Placement Wheel developed for one of our clients. See how to do it.

Flutter is known for its seamless UI/UX features and robust design elements. It allowed us to deliver a unique customer experience in the “CA24 Mobile” banking app. This article shares some of the learnings and pain points behind implementing it in this large project.

Building a new digital product, such as a web or mobile application, is complex. You need to map user stories - create a simple description of features - then apply them to the developers' scope of work and the app’s design. Discover how a design system can unleash efficiency, consistency, and scalability in your digital product.