What is the FloatingActionButton widget?
Why Interviewers Ask This
This is a classic screening question for Flutter roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.
Answer
FloatingActionButton (FAB) is a circular button that floats above the main content, representing the primary action of the screen. It is placed in the floatingActionButton slot of a Scaffold and automatically positions itself. It requires a child (usually an Icon) and an onPressed callback. Use FloatingActionButton.extended() for a wider button with both an icon and a label. Only use one FAB per screen.
Pro Tip
Demonstrate both theoretical understanding and practical experience. Say what it is, then give an example of how you actually used it in a Flutter codebase.