From 5a35cbfe39112aae907992b196b2bb94498b1b0c Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Tue, 5 Nov 2019 17:45:08 +0800 Subject: [PATCH] feat: use sliding control for cupertino --- lib/scaffolds/tab.dart | 4 ++-- lib/screens/search.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/scaffolds/tab.dart b/lib/scaffolds/tab.dart index 09be88f..b768217 100644 --- a/lib/scaffolds/tab.dart +++ b/lib/scaffolds/tab.dart @@ -28,8 +28,8 @@ class TabScaffold extends StatelessWidget { switch (Provider.of(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( diff --git a/lib/screens/search.dart b/lib/screens/search.dart index b7b3f3f..a70d173 100644 --- a/lib/screens/search.dart +++ b/lib/screens/search.dart @@ -157,7 +157,7 @@ class _SearchScreenState extends State { Center( child: Padding( padding: EdgeInsets.symmetric(vertical: 8), - child: CupertinoSegmentedControl( + child: CupertinoSlidingSegmentedControl( groupValue: _activeTab, onValueChanged: _onTabSwitch, children: tabs.asMap().map((key, text) => MapEntry(