This commit is contained in:
Rongjian Zhang 2020-10-08 14:38:33 +08:00
parent 0ab05646f0
commit c71c2da2ef
1 changed files with 15 additions and 11 deletions

View File

@ -29,17 +29,21 @@ class TabScaffold extends StatelessWidget {
case AppThemeType.cupertino:
return DefaultTextStyle(
style: DefaultTextStyle.of(context).style.copyWith(fontSize: 14),
child: CupertinoSlidingSegmentedControl(
groupValue: activeTab,
onValueChanged: onTabSwitch,
children: tabs.asMap().map((key, text) => MapEntry(
key,
Container(
width: 100,
child: Center(
child: Text(text),
),
))),
child: Row(
children: [
Expanded(
child: CupertinoSlidingSegmentedControl(
groupValue: activeTab,
onValueChanged: onTabSwitch,
children: tabs.asMap().map((key, text) => MapEntry(
key,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Text(text),
))),
),
),
],
),
);
default: