isMomentary property
final
Determines whether segments provide only momentary feedback when pressed rather than maintaining a persistent selected state.
When true, segments behave more like buttons that trigger actions rather than options that can be selected and remain in that state.
Defaults to false.
This example shows a CupertinoSlidingSegmentedControl with isMomentary set
to true, providing feedback to the user when the segment is selected with a
text scaling effect.
link
To create a local project with this code sample, run:
flutter create --sample=cupertino.CupertinoSlidingSegmentedControl.isMomentary.1 mysample
Implementation
final bool isMomentary;