From d69fcea1a818d68f795055f6b3db5d23243e7a62 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 24 Oct 2017 18:11:10 -0700 Subject: [PATCH] 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/ --- examples/flutter_gallery/lib/gallery/drawer.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/flutter_gallery/lib/gallery/drawer.dart b/examples/flutter_gallery/lib/gallery/drawer.dart index 14f2d660bca..1089224c504 100644 --- a/examples/flutter_gallery/lib/gallery/drawer.dart +++ b/examples/flutter_gallery/lib/gallery/drawer.dart @@ -171,7 +171,7 @@ class GalleryDrawer extends StatelessWidget { final Widget mountainViewItem = new RadioListTile( // on iOS, we don't want to show an Android phone icon 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, groupValue: Theme.of(context).platform, onChanged: onPlatformChanged, @@ -181,7 +181,7 @@ class GalleryDrawer extends StatelessWidget { final Widget cupertinoItem = new RadioListTile( // on iOS, we don't want to show the iPhone icon 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, groupValue: Theme.of(context).platform, onChanged: onPlatformChanged, @@ -238,11 +238,12 @@ class GalleryDrawer extends StatelessWidget { children: [ new TextSpan( style: aboutTextStyle, - text: 'Flutter is an early-stage, open-source project to help ' - 'developers build high-performance, high-fidelity, mobile ' - 'apps for iOS and Android from a single codebase. This ' - "gallery is a preview of Flutter's many widgets, behaviors, " - 'animations, layouts, and more. Learn more about Flutter at ' + text: 'Flutter is an early-stage, open-source project to help developers' + 'build high-performance, high-fidelity, mobile apps for ' + '${defaultTargetPlatform == TargetPlatform.iOS ? 'multiple platforms' : 'iOS and Android'} ' + 'from a single codebase. This gallery is a preview of ' + "Flutter's many widgets, behaviors, animations, layouts, " + 'and more. Learn more about Flutter at ' ), new LinkTextSpan( style: linkStyle,