Created
February 25, 2025 04:22
-
-
Save loic-sharma/45b9387a03779ecf95d781c205cd3da3 to your computer and use it in GitHub Desktop.
Cupertino sliding segmented control is translucent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/cupertino.dart'; | |
void main() { | |
runApp( | |
CupertinoApp( | |
theme: CupertinoThemeData( | |
brightness: Brightness.light, | |
), | |
home: CupertinoPageScaffold( | |
child: Stack( | |
children: <Widget>[ | |
Text('Hello world'), | |
CupertinoSlidingSegmentedControl<int>( | |
onValueChanged: (value) {}, | |
children: { | |
0: Text('Foo'), | |
1: Text('Bar'), | |
} | |
), | |
], | |
), | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment