Implement Cupertino switch and slider demos (#196)

pull/201/head
rami-a 5 years ago committed by GitHub
parent b7b3c2c6c5
commit f72ed43ac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -478,7 +478,7 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'), TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'class'), TextSpan(style: codeStyle.keywordStyle, text: 'class'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoNavigationDemo'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoTabBarDemo'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'extends'), TextSpan(style: codeStyle.keywordStyle, text: 'extends'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
@ -501,9 +501,7 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo '), TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo '),
TextSpan(style: codeStyle.punctuationStyle, text: '='), TextSpan(style: codeStyle.punctuationStyle, text: '='),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '<'), TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.classStyle, text: '_TabInfo'),
TextSpan(style: codeStyle.punctuationStyle, text: '>['),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: '_TabInfo'), TextSpan(style: codeStyle.classStyle, text: '_TabInfo'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
@ -514,7 +512,7 @@ class CodeSegments {
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'), TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'), TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan(style: codeStyle.baseStyle, text: 'cupertinoNavigationHomeTab'), TextSpan(style: codeStyle.baseStyle, text: 'cupertinoTabBarHomeTab'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoIcons'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoIcons'),
@ -533,7 +531,7 @@ class CodeSegments {
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'), TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'), TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan(style: codeStyle.baseStyle, text: 'cupertinoNavigationChatTab'), TextSpan(style: codeStyle.baseStyle, text: 'cupertinoTabBarChatTab'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoIcons'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoIcons'),
@ -552,8 +550,7 @@ class CodeSegments {
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'), TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'), TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan( TextSpan(style: codeStyle.baseStyle, text: 'cupertinoTabBarProfileTab'),
style: codeStyle.baseStyle, text: 'cupertinoNavigationProfileTab'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoIcons'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoIcons'),
@ -643,25 +640,11 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'switch'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'index'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'case'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '0'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.keywordStyle, text: 'return'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoTabView'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoTabView'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan( TextSpan(style: codeStyle.baseStyle, text: '\u000a builder'),
style: codeStyle.baseStyle, text: '\u000a builder'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
@ -672,164 +655,584 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'), TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan( TextSpan(style: codeStyle.baseStyle, text: '\u000a title'),
style: codeStyle.baseStyle, text: '\u000a title'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'), TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'),
TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.numberStyle, text: '0'), TextSpan(style: codeStyle.baseStyle, text: 'index'),
TextSpan(style: codeStyle.punctuationStyle, text: '].'), TextSpan(style: codeStyle.punctuationStyle, text: '].'),
TextSpan(style: codeStyle.baseStyle, text: 'title'), TextSpan(style: codeStyle.baseStyle, text: 'title'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan( TextSpan(style: codeStyle.baseStyle, text: '\u000a icon'),
style: codeStyle.baseStyle, text: '\u000a icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'), TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'),
TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.numberStyle, text: '0'), TextSpan(style: codeStyle.baseStyle, text: 'index'),
TextSpan(style: codeStyle.punctuationStyle, text: '].'), TextSpan(style: codeStyle.punctuationStyle, text: '].'),
TextSpan(style: codeStyle.baseStyle, text: 'icon'), TextSpan(style: codeStyle.baseStyle, text: 'icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan( TextSpan(
style: codeStyle.baseStyle, style: codeStyle.baseStyle, text: '\u000a defaultTitle'),
text: '\u000a defaultTitle'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'), TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'),
TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.numberStyle, text: '0'), TextSpan(style: codeStyle.baseStyle, text: 'index'),
TextSpan(style: codeStyle.punctuationStyle, text: '].'), TextSpan(style: codeStyle.punctuationStyle, text: '].'),
TextSpan(style: codeStyle.baseStyle, text: 'title'), TextSpan(style: codeStyle.baseStyle, text: 'title'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: ');'), TextSpan(style: codeStyle.punctuationStyle, text: ');'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'break'), TextSpan(style: codeStyle.punctuationStyle, text: '},'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'case'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: ');'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '}'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(style: codeStyle.punctuationStyle, text: '}'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'class'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'extends'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'StatelessWidget'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'const'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'),
TextSpan(style: codeStyle.punctuationStyle, text: '({'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'Key'),
TextSpan(style: codeStyle.baseStyle, text: ' key'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@required'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'this'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'title'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@required'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'this'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '})'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '1'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'super'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'key'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' key'),
TextSpan(style: codeStyle.punctuationStyle, text: ');'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'final'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'String'),
TextSpan(style: codeStyle.baseStyle, text: ' title'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'final'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'IconData'),
TextSpan(style: codeStyle.baseStyle, text: ' icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@override'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'Widget'),
TextSpan(style: codeStyle.baseStyle, text: ' build'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.classStyle, text: 'BuildContext'),
TextSpan(style: codeStyle.baseStyle, text: ' context'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.keywordStyle, text: 'return'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoTabView'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoPageScaffold'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a navigationBar'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoNavigationBar'),
TextSpan(style: codeStyle.punctuationStyle, text: '(),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a backgroundColor'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoColors'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'systemBackground'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Center'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Icon'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan( TextSpan(
style: codeStyle.baseStyle, text: '\u000a builder'), style: codeStyle.baseStyle, text: '\u000a semanticLabel'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' title'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a size'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '100'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: ');'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '}'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(style: codeStyle.punctuationStyle, text: '}'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
]);
}
static TextSpan cupertinoSliderDemo(BuildContext context) {
final CodeStyle codeStyle = CodeStyle.of(context);
return TextSpan(children: [
TextSpan(
style: codeStyle.commentStyle,
text: '// Copyright 2019 The Flutter team. All rights reserved.'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(
style: codeStyle.commentStyle,
text:
'// Use of this source code is governed by a BSD-style license that can be'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(
style: codeStyle.commentStyle, text: '// found in the LICENSE file.'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'import'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(
style: codeStyle.stringStyle,
text: '\u0027package:flutter/cupertino.dart\u0027'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'import'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(
style: codeStyle.stringStyle,
text: '\u0027package:gallery/l10n/gallery_localizations.dart\u0027'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'class'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoSliderDemo'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'extends'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'StatefulWidget'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@override'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoSliderDemoState'),
TextSpan(style: codeStyle.baseStyle, text: ' createState'),
TextSpan(style: codeStyle.punctuationStyle, text: '()'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '=>'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoSliderDemoState'),
TextSpan(style: codeStyle.punctuationStyle, text: '();'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(style: codeStyle.punctuationStyle, text: '}'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'class'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoSliderDemoState'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'extends'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'State'),
TextSpan(style: codeStyle.punctuationStyle, text: '<'),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoSliderDemo'),
TextSpan(style: codeStyle.punctuationStyle, text: '>'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'double'),
TextSpan(style: codeStyle.baseStyle, text: ' _value '),
TextSpan(style: codeStyle.punctuationStyle, text: '='),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '25.0'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'double'),
TextSpan(style: codeStyle.baseStyle, text: ' _discreteValue '),
TextSpan(style: codeStyle.punctuationStyle, text: '='),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '20.0'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@override'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'Widget'),
TextSpan(style: codeStyle.baseStyle, text: ' build'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.classStyle, text: 'BuildContext'),
TextSpan(style: codeStyle.baseStyle, text: ' context'), TextSpan(style: codeStyle.baseStyle, text: ' context'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'), TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '=>'), TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'return'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoPageScaffold'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a navigationBar'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoNavigationBar'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a middle'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Text'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'of'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan(style: codeStyle.baseStyle, text: 'demoCupertinoSliderTitle'),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'DefaultTextStyle'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a style'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoTheme'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'of'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan(style: codeStyle.baseStyle, text: 'textTheme'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'textStyle'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Center'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Column'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan( TextSpan(
style: codeStyle.baseStyle, text: '\u000a title'), style: codeStyle.baseStyle,
text: '\u000a mainAxisAlignment'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'MainAxisAlignment'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'spaceEvenly'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a children'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.numberStyle, text: '1'), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '].'), TextSpan(style: codeStyle.classStyle, text: 'Column'),
TextSpan(style: codeStyle.baseStyle, text: 'title'), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a mainAxisSize'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'MainAxisSize'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'min'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan( TextSpan(
style: codeStyle.baseStyle, text: '\u000a icon'), style: codeStyle.baseStyle, text: '\u000a children'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.numberStyle, text: '1'), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '].'), TextSpan(style: codeStyle.classStyle, text: 'SizedBox'),
TextSpan(style: codeStyle.baseStyle, text: 'icon'), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a width'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'double'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'infinity'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoSlider'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a value'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _value'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a min'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '0.0'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a max'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '100.0'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a onChanged'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'value'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a setState'),
TextSpan(style: codeStyle.punctuationStyle, text: '(()'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a _value '),
TextSpan(style: codeStyle.punctuationStyle, text: '='),
TextSpan(style: codeStyle.baseStyle, text: ' value'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '});'),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '},'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'MergeSemantics'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan( TextSpan(
style: codeStyle.baseStyle, style: codeStyle.baseStyle, text: '\u000a child'),
text: '\u000a defaultTitle'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.classStyle, text: 'Text'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'of'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(
style: codeStyle.baseStyle, text: 'demoCupertinoSliderContinuous'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a _value'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'toStringAsFixed'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.numberStyle, text: '1'), TextSpan(style: codeStyle.numberStyle, text: '1'),
TextSpan(style: codeStyle.punctuationStyle, text: '].'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: 'title'), TextSpan(
TextSpan(style: codeStyle.punctuationStyle, text: ','), style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: ');'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'break'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '],'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'Column'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a mainAxisSize'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'MainAxisSize'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'min'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a children'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'SizedBox'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a width'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'double'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'infinity'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoSlider'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a value'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _discreteValue'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a min'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '0.0'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a max'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '100.0'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a divisions'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '5'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a onChanged'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'value'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a setState'),
TextSpan(style: codeStyle.punctuationStyle, text: '(()'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a _discreteValue '),
TextSpan(style: codeStyle.punctuationStyle, text: '='),
TextSpan(style: codeStyle.baseStyle, text: ' value'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'), TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '});'),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '},'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'case'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '2'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoTabView'), TextSpan(style: codeStyle.classStyle, text: 'MergeSemantics'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan( TextSpan(
style: codeStyle.baseStyle, text: '\u000a builder'), style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Text'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'of'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'), TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'), TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(
TextSpan(style: codeStyle.punctuationStyle, text: '=>'), style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'), TextSpan(style: codeStyle.baseStyle, text: 'demoCupertinoSliderDiscrete'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan( TextSpan(
style: codeStyle.baseStyle, text: '\u000a title'), style: codeStyle.baseStyle,
TextSpan(style: codeStyle.punctuationStyle, text: ':'), text: '\u000a _discreteValue'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'), TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.baseStyle, text: 'toStringAsFixed'),
TextSpan(style: codeStyle.numberStyle, text: '2'), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.punctuationStyle, text: '].'), TextSpan(style: codeStyle.numberStyle, text: '1'),
TextSpan(style: codeStyle.baseStyle, text: 'title'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan( TextSpan(
style: codeStyle.baseStyle, text: '\u000a icon'), style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'),
TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.numberStyle, text: '2'),
TextSpan(style: codeStyle.punctuationStyle, text: '].'),
TextSpan(style: codeStyle.baseStyle, text: 'icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a defaultTitle'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _tabInfo'),
TextSpan(style: codeStyle.punctuationStyle, text: '['),
TextSpan(style: codeStyle.numberStyle, text: '2'),
TextSpan(style: codeStyle.punctuationStyle, text: '].'),
TextSpan(style: codeStyle.baseStyle, text: 'title'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: ');'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'break'), TextSpan(style: codeStyle.punctuationStyle, text: '],'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '}'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.punctuationStyle, text: '],'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'null'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '},'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
@ -839,60 +1242,79 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: '\u000a'), TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(style: codeStyle.punctuationStyle, text: '}'), TextSpan(style: codeStyle.punctuationStyle, text: '}'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'), TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
]);
}
static TextSpan cupertinoSwitchDemo(BuildContext context) {
final CodeStyle codeStyle = CodeStyle.of(context);
return TextSpan(children: [
TextSpan(
style: codeStyle.commentStyle,
text: '// Copyright 2019 The Flutter team. All rights reserved.'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(
style: codeStyle.commentStyle,
text:
'// Use of this source code is governed by a BSD-style license that can be'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(
style: codeStyle.commentStyle, text: '// found in the LICENSE file.'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'import'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(
style: codeStyle.stringStyle,
text: '\u0027package:flutter/cupertino.dart\u0027'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'import'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(
style: codeStyle.stringStyle,
text: '\u0027package:gallery/l10n/gallery_localizations.dart\u0027'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'class'), TextSpan(style: codeStyle.keywordStyle, text: 'class'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoSwitchDemo'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'extends'), TextSpan(style: codeStyle.keywordStyle, text: 'extends'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'StatelessWidget'), TextSpan(style: codeStyle.classStyle, text: 'StatefulWidget'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'const'), TextSpan(style: codeStyle.keywordStyle, text: '@override'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: '_CupertinoDemoTab'),
TextSpan(style: codeStyle.punctuationStyle, text: '({'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'Key'),
TextSpan(style: codeStyle.baseStyle, text: ' key'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@required'), TextSpan(style: codeStyle.classStyle, text: '_CupertinoSwitchDemoState'),
TextSpan(style: codeStyle.baseStyle, text: ' createState'),
TextSpan(style: codeStyle.punctuationStyle, text: '()'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'this'), TextSpan(style: codeStyle.punctuationStyle, text: '=>'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'title'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@required'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'this'), TextSpan(style: codeStyle.classStyle, text: '_CupertinoSwitchDemoState'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.punctuationStyle, text: '();'),
TextSpan(style: codeStyle.baseStyle, text: 'icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a'), TextSpan(style: codeStyle.baseStyle, text: '\u000a'),
TextSpan(style: codeStyle.punctuationStyle, text: '})'), TextSpan(style: codeStyle.punctuationStyle, text: '}'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a'),
TextSpan(style: codeStyle.keywordStyle, text: 'class'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.classStyle, text: '_CupertinoSwitchDemoState'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'super'), TextSpan(style: codeStyle.keywordStyle, text: 'extends'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'key'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' key'),
TextSpan(style: codeStyle.punctuationStyle, text: ');'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'final'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'String'), TextSpan(style: codeStyle.classStyle, text: 'State'),
TextSpan(style: codeStyle.baseStyle, text: ' title'), TextSpan(style: codeStyle.punctuationStyle, text: '<'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoSwitchDemo'),
TextSpan(style: codeStyle.punctuationStyle, text: '>'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: 'final'), TextSpan(style: codeStyle.keywordStyle, text: 'bool'),
TextSpan(style: codeStyle.baseStyle, text: ' _switchValue '),
TextSpan(style: codeStyle.punctuationStyle, text: '='),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'IconData'), TextSpan(style: codeStyle.keywordStyle, text: 'false'),
TextSpan(style: codeStyle.baseStyle, text: ' icon'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'), TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '),
TextSpan(style: codeStyle.keywordStyle, text: '@override'), TextSpan(style: codeStyle.keywordStyle, text: '@override'),
@ -914,14 +1336,26 @@ class CodeSegments {
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoNavigationBar'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoNavigationBar'),
TextSpan(style: codeStyle.punctuationStyle, text: '(),'), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a backgroundColor'), TextSpan(style: codeStyle.baseStyle, text: '\u000a middle'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'CupertinoColors'), TextSpan(style: codeStyle.classStyle, text: 'Text'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'systemBackground'), TextSpan(style: codeStyle.baseStyle, text: 'of'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan(
style: codeStyle.baseStyle, text: 'demoSelectionControlsSwitchTitle'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
@ -930,20 +1364,59 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Icon'), TextSpan(style: codeStyle.classStyle, text: 'Semantics'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a icon'), TextSpan(style: codeStyle.baseStyle, text: '\u000a container'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'true'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan( TextSpan(style: codeStyle.baseStyle, text: '\u000a label'),
style: codeStyle.baseStyle, text: '\u000a semanticLabel'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' title'), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'of'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan(
style: codeStyle.baseStyle, text: 'demoSelectionControlsSwitchTitle'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a size'), TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.numberStyle, text: '100'), TextSpan(style: codeStyle.classStyle, text: 'CupertinoSwitch'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a value'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' _switchValue'),
TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a onChanged'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'value'),
TextSpan(style: codeStyle.punctuationStyle, text: ')'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(
style: codeStyle.baseStyle, text: '\u000a setState'),
TextSpan(style: codeStyle.punctuationStyle, text: '(()'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
TextSpan(
style: codeStyle.baseStyle,
text: '\u000a _switchValue '),
TextSpan(style: codeStyle.punctuationStyle, text: '='),
TextSpan(style: codeStyle.baseStyle, text: ' value'),
TextSpan(style: codeStyle.punctuationStyle, text: ';'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '});'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '},'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
@ -3420,6 +3893,28 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Semantics'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a container'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.keywordStyle, text: 'true'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a label'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'),
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
TextSpan(style: codeStyle.baseStyle, text: 'of'),
TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: 'context'),
TextSpan(style: codeStyle.punctuationStyle, text: ').'),
TextSpan(
style: codeStyle.baseStyle, text: 'demoSelectionControlsSwitchTitle'),
TextSpan(style: codeStyle.punctuationStyle, text: ','),
TextSpan(style: codeStyle.baseStyle, text: '\u000a child'),
TextSpan(style: codeStyle.punctuationStyle, text: ':'),
TextSpan(style: codeStyle.baseStyle, text: ' '),
TextSpan(style: codeStyle.classStyle, text: 'Switch'), TextSpan(style: codeStyle.classStyle, text: 'Switch'),
TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.punctuationStyle, text: '('),
TextSpan(style: codeStyle.baseStyle, text: '\u000a value'), TextSpan(style: codeStyle.baseStyle, text: '\u000a value'),
@ -3450,6 +3945,8 @@ class CodeSegments {
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '),'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: ');'), TextSpan(style: codeStyle.punctuationStyle, text: ');'),
TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
TextSpan(style: codeStyle.punctuationStyle, text: '}'), TextSpan(style: codeStyle.punctuationStyle, text: '}'),

@ -10,8 +10,10 @@ import 'package:gallery/data/gallery_options.dart';
import 'package:gallery/data/icons.dart'; import 'package:gallery/data/icons.dart';
import 'package:gallery/demos/cupertino/cupertino_alert_demo.dart'; import 'package:gallery/demos/cupertino/cupertino_alert_demo.dart';
import 'package:gallery/demos/cupertino/cupertino_button_demo.dart'; import 'package:gallery/demos/cupertino/cupertino_button_demo.dart';
import 'package:gallery/demos/cupertino/cupertino_tab_bar_demo.dart';
import 'package:gallery/demos/cupertino/cupertino_segmented_control_demo.dart'; import 'package:gallery/demos/cupertino/cupertino_segmented_control_demo.dart';
import 'package:gallery/demos/cupertino/cupertino_slider_demo.dart';
import 'package:gallery/demos/cupertino/cupertino_switch_demo.dart';
import 'package:gallery/demos/cupertino/cupertino_tab_bar_demo.dart';
import 'package:gallery/demos/material/bottom_navigation_demo.dart'; import 'package:gallery/demos/material/bottom_navigation_demo.dart';
import 'package:gallery/demos/material/bottom_sheet_demo.dart'; import 'package:gallery/demos/material/bottom_sheet_demo.dart';
import 'package:gallery/demos/material/button_demo.dart'; import 'package:gallery/demos/material/button_demo.dart';
@ -467,6 +469,39 @@ List<GalleryDemo> cupertinoDemos(BuildContext context) {
), ),
], ],
), ),
GalleryDemo(
title: GalleryLocalizations.of(context).demoCupertinoSliderTitle,
icon: GalleryIcons.sliders,
subtitle: GalleryLocalizations.of(context).demoCupertinoSliderSubtitle,
configurations: [
GalleryDemoConfiguration(
title: GalleryLocalizations.of(context).demoCupertinoSliderTitle,
description:
GalleryLocalizations.of(context).demoCupertinoSliderDescription,
documentationUrl:
'https://api.flutter.dev/flutter/cupertino/CupertinoSlider-class.html',
buildRoute: (_) => CupertinoSliderDemo(),
code: CodeSegments.cupertinoSliderDemo,
),
],
),
GalleryDemo(
title: GalleryLocalizations.of(context).demoSelectionControlsSwitchTitle,
icon: GalleryIcons.switches,
subtitle: GalleryLocalizations.of(context).demoCupertinoSwitchSubtitle,
configurations: [
GalleryDemoConfiguration(
title:
GalleryLocalizations.of(context).demoSelectionControlsSwitchTitle,
description:
GalleryLocalizations.of(context).demoCupertinoSwitchDescription,
documentationUrl:
'https://api.flutter.dev/flutter/cupertino/CupertinoSwitch-class.html',
buildRoute: (_) => CupertinoSwitchDemo(),
code: CodeSegments.cupertinoSwitchDemo,
),
],
),
GalleryDemo( GalleryDemo(
title: GalleryLocalizations.of(context).demoCupertinoTabBarTitle, title: GalleryLocalizations.of(context).demoCupertinoTabBarTitle,
icon: GalleryIcons.bottomNavigation, icon: GalleryIcons.bottomNavigation,

@ -0,0 +1,93 @@
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/cupertino.dart';
import 'package:gallery/l10n/gallery_localizations.dart';
// BEGIN cupertinoSliderDemo
class CupertinoSliderDemo extends StatefulWidget {
@override
_CupertinoSliderDemoState createState() => _CupertinoSliderDemoState();
}
class _CupertinoSliderDemoState extends State<CupertinoSliderDemo> {
double _value = 25.0;
double _discreteValue = 20.0;
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text(GalleryLocalizations.of(context).demoCupertinoSliderTitle),
),
child: DefaultTextStyle(
style: CupertinoTheme.of(context).textTheme.textStyle,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: double.infinity,
child: CupertinoSlider(
value: _value,
min: 0.0,
max: 100.0,
onChanged: (value) {
setState(() {
_value = value;
});
},
),
),
MergeSemantics(
child: Text(
GalleryLocalizations.of(context)
.demoCupertinoSliderContinuous(
_value.toStringAsFixed(1),
),
),
),
],
),
Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: double.infinity,
child: CupertinoSlider(
value: _discreteValue,
min: 0.0,
max: 100.0,
divisions: 5,
onChanged: (value) {
setState(() {
_discreteValue = value;
});
},
),
),
MergeSemantics(
child: Text(
GalleryLocalizations.of(context)
.demoCupertinoSliderDiscrete(
_discreteValue.toStringAsFixed(1),
),
),
),
],
),
],
),
),
),
);
}
}
// END

@ -0,0 +1,46 @@
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/cupertino.dart';
import 'package:gallery/l10n/gallery_localizations.dart';
// BEGIN cupertinoSwitchDemo
class CupertinoSwitchDemo extends StatefulWidget {
@override
_CupertinoSwitchDemoState createState() => _CupertinoSwitchDemoState();
}
class _CupertinoSwitchDemoState extends State<CupertinoSwitchDemo> {
bool _switchValue = false;
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text(
GalleryLocalizations.of(context).demoSelectionControlsSwitchTitle,
),
),
child: Center(
child: Semantics(
container: true,
label:
GalleryLocalizations.of(context).demoSelectionControlsSwitchTitle,
child: CupertinoSwitch(
value: _switchValue,
onChanged: (value) {
setState(() {
_switchValue = value;
});
},
),
),
),
);
}
}
// END

@ -155,6 +155,10 @@ class _SwitchDemoState extends State<_SwitchDemo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Center( return Center(
child: Semantics(
container: true,
label:
GalleryLocalizations.of(context).demoSelectionControlsSwitchTitle,
child: Switch( child: Switch(
value: switchValue, value: switchValue,
onChanged: (value) { onChanged: (value) {
@ -163,6 +167,7 @@ class _SwitchDemoState extends State<_SwitchDemo> {
}); });
}, },
), ),
),
); );
} }
} }

@ -1560,6 +1560,61 @@ class GalleryLocalizations {
desc: r'Title for the cupertino segmented control component demo.'); desc: r'Title for the cupertino segmented control component demo.');
} }
String demoCupertinoSliderContinuous(Object value) {
return Intl.message(r'Continuous: $value',
locale: _localeName,
name: 'demoCupertinoSliderContinuous',
desc:
r'A label for a continuous slider that indicates what value it is set to.',
args: <Object>[value]);
}
String get demoCupertinoSliderDescription {
return Intl.message(
r'A slider can be used to select from either a continuous or a discrete set of values.',
locale: _localeName,
name: 'demoCupertinoSliderDescription',
desc: r'Description for the cupertino slider component demo.');
}
String demoCupertinoSliderDiscrete(Object value) {
return Intl.message(r'Discrete: $value',
locale: _localeName,
name: 'demoCupertinoSliderDiscrete',
desc:
r'A label for a discrete slider that indicates what value it is set to.',
args: <Object>[value]);
}
String get demoCupertinoSliderSubtitle {
return Intl.message(r'iOS-style slider',
locale: _localeName,
name: 'demoCupertinoSliderSubtitle',
desc: r'Subtitle for the cupertino slider component demo.');
}
String get demoCupertinoSliderTitle {
return Intl.message(r'Slider',
locale: _localeName,
name: 'demoCupertinoSliderTitle',
desc: r'Title for the cupertino slider component demo.');
}
String get demoCupertinoSwitchDescription {
return Intl.message(
r'A switch is used to toggle the on/off state of a single setting.',
locale: _localeName,
name: 'demoCupertinoSwitchDescription',
desc: r'Description for the cupertino switch component demo.');
}
String get demoCupertinoSwitchSubtitle {
return Intl.message(r'iOS-style switch',
locale: _localeName,
name: 'demoCupertinoSwitchSubtitle',
desc: r'Subtitle for the cupertino switch component demo.');
}
String get demoCupertinoTabBarDescription { String get demoCupertinoTabBarDescription {
return Intl.message( return Intl.message(
r'An iOS-style bottom navigation tab bar. Displays multiple tabs with one tab being active, the first tab by default.', r'An iOS-style bottom navigation tab bar. Displays multiple tabs with one tab being active, the first tab by default.',

@ -645,6 +645,44 @@
"@demoCupertinoSegmentedControlDescription": { "@demoCupertinoSegmentedControlDescription": {
"description": "Description for the cupertino segmented control component demo." "description": "Description for the cupertino segmented control component demo."
}, },
"demoCupertinoSliderTitle": "Slider",
"@demoCupertinoSliderTitle": {
"description": "Title for the cupertino slider component demo."
},
"demoCupertinoSliderSubtitle": "iOS-style slider",
"@demoCupertinoSliderSubtitle": {
"description": "Subtitle for the cupertino slider component demo."
},
"demoCupertinoSliderDescription": "A slider can be used to select from either a continuous or a discrete set of values.",
"@demoCupertinoSliderDescription": {
"description": "Description for the cupertino slider component demo."
},
"demoCupertinoSliderContinuous": "Continuous: {value}",
"@demoCupertinoSliderContinuous": {
"description": "A label for a continuous slider that indicates what value it is set to.",
"placeholders": {
"value": {
"example": "1"
}
}
},
"demoCupertinoSliderDiscrete": "Discrete: {value}",
"@demoCupertinoSliderDiscrete": {
"description": "A label for a discrete slider that indicates what value it is set to.",
"placeholders": {
"value": {
"example": "1"
}
}
},
"demoCupertinoSwitchSubtitle": "iOS-style switch",
"@demoCupertinoSwitchSubtitle": {
"description": "Subtitle for the cupertino switch component demo."
},
"demoCupertinoSwitchDescription": "A switch is used to toggle the on/off state of a single setting.",
"@demoCupertinoSwitchDescription": {
"description": "Description for the cupertino switch component demo."
},
"demoCupertinoTabBarTitle": "Tab Bar", "demoCupertinoTabBarTitle": "Tab Bar",
"@demoCupertinoTabBarTitle": { "@demoCupertinoTabBarTitle": {
"description": "Title for the cupertino bottom tab bar demo." "description": "Title for the cupertino bottom tab bar demo."

@ -609,6 +609,34 @@
name="demoCupertinoSegmentedControlDescription" name="demoCupertinoSegmentedControlDescription"
description="Description for the cupertino segmented control component demo." description="Description for the cupertino segmented control component demo."
>Used to select between a number of mutually exclusive options. When one option in the segmented control is selected, the other options in the segmented control cease to be selected.</string> >Used to select between a number of mutually exclusive options. When one option in the segmented control is selected, the other options in the segmented control cease to be selected.</string>
<string
name="demoCupertinoSliderTitle"
description="Title for the cupertino slider component demo."
>Slider</string>
<string
name="demoCupertinoSliderSubtitle"
description="Subtitle for the cupertino slider component demo."
>iOS-style slider</string>
<string
name="demoCupertinoSliderDescription"
description="Description for the cupertino slider component demo."
>A slider can be used to select from either a continuous or a discrete set of values.</string>
<string
name="demoCupertinoSliderContinuous"
description="A label for a continuous slider that indicates what value it is set to."
>Continuous: {value}</string>
<string
name="demoCupertinoSliderDiscrete"
description="A label for a discrete slider that indicates what value it is set to."
>Discrete: {value}</string>
<string
name="demoCupertinoSwitchSubtitle"
description="Subtitle for the cupertino switch component demo."
>iOS-style switch</string>
<string
name="demoCupertinoSwitchDescription"
description="Description for the cupertino switch component demo."
>A switch is used to toggle the on/off state of a single setting.</string>
<string <string
name="demoCupertinoTabBarTitle" name="demoCupertinoTabBarTitle"
description="Title for the cupertino bottom tab bar demo." description="Title for the cupertino bottom tab bar demo."

@ -37,6 +37,10 @@ class MessageLookup extends MessageLookupByLibrary {
static m6(error) => "Failed to copy to clipboard: ${error}"; static m6(error) => "Failed to copy to clipboard: ${error}";
static m23(value) => "Continuous: ${value}";
static m24(value) => "Discrete: ${value}";
static m7(name, phoneNumber) => "${name} phone number is ${phoneNumber}"; static m7(name, phoneNumber) => "${name} phone number is ${phoneNumber}";
static m8(value) => "You selected: \"${value}\""; static m8(value) => "You selected: \"${value}\"";
@ -400,6 +404,18 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("iOS-style segmented control"), MessageLookupByLibrary.simpleMessage("iOS-style segmented control"),
"demoCupertinoSegmentedControlTitle": "demoCupertinoSegmentedControlTitle":
MessageLookupByLibrary.simpleMessage("Segmented Control"), MessageLookupByLibrary.simpleMessage("Segmented Control"),
"demoCupertinoSliderContinuous": m23,
"demoCupertinoSliderDescription": MessageLookupByLibrary.simpleMessage(
"A slider can be used to select from either a continuous or a discrete set of values."),
"demoCupertinoSliderDiscrete": m24,
"demoCupertinoSliderSubtitle":
MessageLookupByLibrary.simpleMessage("iOS-style slider"),
"demoCupertinoSliderTitle":
MessageLookupByLibrary.simpleMessage("Slider"),
"demoCupertinoSwitchDescription": MessageLookupByLibrary.simpleMessage(
"A switch is used to toggle the on/off state of a single setting."),
"demoCupertinoSwitchSubtitle":
MessageLookupByLibrary.simpleMessage("iOS-style switch"),
"demoCupertinoTabBarDescription": MessageLookupByLibrary.simpleMessage( "demoCupertinoTabBarDescription": MessageLookupByLibrary.simpleMessage(
"An iOS-style bottom navigation tab bar. Displays multiple tabs with one tab being active, the first tab by default."), "An iOS-style bottom navigation tab bar. Displays multiple tabs with one tab being active, the first tab by default."),
"demoCupertinoTabBarSubtitle": "demoCupertinoTabBarSubtitle":

Loading…
Cancel
Save