Check Box
Check Box
In Flutter, the Checkbox widget is a fundamental building block used to create single-selectable
options. It allows users to toggle between a checked and unchecked state, typically representing a
binary choice (yes/no, true/false).expand_more Here's a detailed breakdown of its functionalities and
customization options:
Key Characteristics:
• Visual Representation: Displays a square checkbox with a checkmark when selected and an
empty box when deselected.
• Boolean Value: Holds a boolean value (true or false) representing the checkbox's
state.expand_more
• User Interaction: Users can tap on the checkbox to toggle its state.
Basic Usage:
The Checkbox widget requires two main properties:
• value: A boolean value representing the current state of the checkbox (checked or
unchecked).expand_more
• onChanged: A callback function that gets called whenever the user taps on the checkbox and its
state changes.expand_more This function typically updates the underlying data or performs
other actions based on the new state.exclamation
Example:
Flutter Page 1