Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 263e140

Browse files
committed
docs: Update docs for momentary flag
1 parent b00fbf6 commit 263e140

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/flutter/lib/src/cupertino/sliding_segmented_control.dart

+7-4
Original file line numberDiff line numberDiff line change
@@ -491,15 +491,18 @@ class CupertinoSlidingSegmentedControl<T extends Object> extends StatefulWidget
491491
/// Defaults to `EdgeInsets.symmetric(vertical: 2, horizontal: 3)`.
492492
final EdgeInsetsGeometry padding;
493493

494-
/// Determines whether segments in the segmented control show selected state.
494+
/// Determines whether segments provide only momentary feedback when pressed
495+
/// rather than maintaining a persistent selected state.
495496
///
496-
/// If true, segments in the control don’t show selected state and
497-
/// don’t update the value of selectedSegmentIndex after tracking ends.
497+
/// When true, segments behave more like buttons that trigger actions rather
498+
/// than options that can be selected and remain in that state.
498499
///
499500
/// Defaults to false.
500501
///
501502
/// {@tool dartpad}
502-
/// This example shows a [CupertinoSlidingSegmentedControl] with [isMomentary] set to true.
503+
/// This example shows a [CupertinoSlidingSegmentedControl] with [isMomentary] set
504+
/// to true, providing feedback to the user when the segment is selected with a
505+
/// text scaling effect.
503506
///
504507
/// ** See code in examples/api/lib/cupertino/segmented_control/cupertino_sliding_segmented_control.1.dart **
505508
/// {@end-tool}

0 commit comments

Comments
 (0)