Commit d69fcea1 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Use Mountain View/Cupertino terms in drawer on iOS (#12699)

Use our platform identifiers rather than OS names for the platform
switcher radio buttons in the drawer as noted in section 2.3.10 of the
App Store review guidelines.

See: https://developer.apple.com/app-store/review/guidelines/
parent 021a2688
...@@ -171,7 +171,7 @@ class GalleryDrawer extends StatelessWidget { ...@@ -171,7 +171,7 @@ class GalleryDrawer extends StatelessWidget {
final Widget mountainViewItem = new RadioListTile<TargetPlatform>( final Widget mountainViewItem = new RadioListTile<TargetPlatform>(
// on iOS, we don't want to show an Android phone icon // on iOS, we don't want to show an Android phone icon
secondary: new Icon(defaultTargetPlatform == TargetPlatform.iOS ? Icons.star : Icons.phone_android), secondary: new Icon(defaultTargetPlatform == TargetPlatform.iOS ? Icons.star : Icons.phone_android),
title: const Text('Android'), title: new Text(defaultTargetPlatform == TargetPlatform.iOS ? 'Mountain View' : 'Android'),
value: TargetPlatform.android, value: TargetPlatform.android,
groupValue: Theme.of(context).platform, groupValue: Theme.of(context).platform,
onChanged: onPlatformChanged, onChanged: onPlatformChanged,
...@@ -181,7 +181,7 @@ class GalleryDrawer extends StatelessWidget { ...@@ -181,7 +181,7 @@ class GalleryDrawer extends StatelessWidget {
final Widget cupertinoItem = new RadioListTile<TargetPlatform>( final Widget cupertinoItem = new RadioListTile<TargetPlatform>(
// on iOS, we don't want to show the iPhone icon // on iOS, we don't want to show the iPhone icon
secondary: new Icon(defaultTargetPlatform == TargetPlatform.iOS ? Icons.star_border : Icons.phone_iphone), secondary: new Icon(defaultTargetPlatform == TargetPlatform.iOS ? Icons.star_border : Icons.phone_iphone),
title: const Text('iOS'), title: new Text(defaultTargetPlatform == TargetPlatform.iOS ? 'Cupertino' : 'iOS'),
value: TargetPlatform.iOS, value: TargetPlatform.iOS,
groupValue: Theme.of(context).platform, groupValue: Theme.of(context).platform,
onChanged: onPlatformChanged, onChanged: onPlatformChanged,
...@@ -238,11 +238,12 @@ class GalleryDrawer extends StatelessWidget { ...@@ -238,11 +238,12 @@ class GalleryDrawer extends StatelessWidget {
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
style: aboutTextStyle, style: aboutTextStyle,
text: 'Flutter is an early-stage, open-source project to help ' text: 'Flutter is an early-stage, open-source project to help developers'
'developers build high-performance, high-fidelity, mobile ' 'build high-performance, high-fidelity, mobile apps for '
'apps for iOS and Android from a single codebase. This ' '${defaultTargetPlatform == TargetPlatform.iOS ? 'multiple platforms' : 'iOS and Android'} '
"gallery is a preview of Flutter's many widgets, behaviors, " 'from a single codebase. This gallery is a preview of '
'animations, layouts, and more. Learn more about Flutter at ' "Flutter's many widgets, behaviors, animations, layouts, "
'and more. Learn more about Flutter at '
), ),
new LinkTextSpan( new LinkTextSpan(
style: linkStyle, style: linkStyle,
......
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