Unverified Commit b2cf1a24 authored by Natalie Sampsell's avatar Natalie Sampsell Committed by GitHub

SegmentedControl -> CupertinoSegmentedControl (#20267)

parent a49bffa5
......@@ -63,7 +63,7 @@ const Duration _kFadeDuration = Duration(milliseconds: 165);
/// See also:
///
/// * <https://developer.apple.com/design/human-interface-guidelines/ios/controls/segmented-controls/>
class SegmentedControl<T> extends StatefulWidget {
class CupertinoSegmentedControl<T> extends StatefulWidget {
/// Creates an iOS-style segmented control bar.
///
/// The [children], [onValueChanged], [unselectedColor], [selectedColor],
......@@ -80,7 +80,7 @@ class SegmentedControl<T> extends StatefulWidget {
/// If no [groupValue] is provided, or the [groupValue] is null, no widget will
/// appear as selected. The [groupValue] must be either null or one of the keys
/// in the [children] map.
SegmentedControl({
CupertinoSegmentedControl({
Key key,
@required this.children,
@required this.onValueChanged,
......@@ -144,7 +144,7 @@ class SegmentedControl<T> extends StatefulWidget {
/// @override
/// Widget build(BuildContext context) {
/// return new Container(
/// child: new SegmentedControl<int>(
/// child: new CupertinoSegmentedControl<int>(
/// children: children,
/// onValueChanged: (int newValue) {
/// setState(() {
......@@ -198,8 +198,8 @@ class SegmentedControl<T> extends StatefulWidget {
_SegmentedControlState<T> createState() => _SegmentedControlState<T>();
}
class _SegmentedControlState<T> extends State<SegmentedControl<T>>
with TickerProviderStateMixin<SegmentedControl<T>> {
class _SegmentedControlState<T> extends State<CupertinoSegmentedControl<T>>
with TickerProviderStateMixin<CupertinoSegmentedControl<T>> {
T _pressedKey;
final List<AnimationController> _selectionControllers = <AnimationController>[];
......@@ -308,7 +308,7 @@ class _SegmentedControlState<T> extends State<SegmentedControl<T>>
}
@override
void didUpdateWidget(SegmentedControl<T> oldWidget) {
void didUpdateWidget(CupertinoSegmentedControl<T> oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.children.length != widget.children.length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment