feat: use sliding control for cupertino

This commit is contained in:
Rongjian Zhang 2019-11-05 17:45:08 +08:00
parent 119a01ce76
commit 5a35cbfe39
2 changed files with 3 additions and 3 deletions

View File

@ -28,8 +28,8 @@ class TabScaffold extends StatelessWidget {
switch (Provider.of<ThemeModel>(context).theme) {
case AppThemeType.cupertino:
return DefaultTextStyle(
style: TextStyle(fontSize: 14),
child: CupertinoSegmentedControl(
style: DefaultTextStyle.of(context).style.copyWith(fontSize: 14),
child: CupertinoSlidingSegmentedControl(
groupValue: activeTab,
onValueChanged: onTabSwitch,
children: tabs.asMap().map((key, text) => MapEntry(

View File

@ -157,7 +157,7 @@ class _SearchScreenState extends State<SearchScreen> {
Center(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 8),
child: CupertinoSegmentedControl(
child: CupertinoSlidingSegmentedControl(
groupValue: _activeTab,
onValueChanged: _onTabSwitch,
children: tabs.asMap().map((key, text) => MapEntry(