From 18b767abdb0fdf69f04050f0d497e5d4f6e37417 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Date: Thu, 2 Sep 2021 14:30:01 +0200 Subject: [PATCH 1/5] Add selectable text --- lib/pages/about.dart | 8 +- lib/pages/demo.dart | 9 +- lib/pages/home.dart | 6 +- lib/pages/settings.dart | 2 +- lib/pages/settings_list_item.dart | 2 +- lib/studies/crane/backdrop.dart | 2 +- lib/studies/crane/item_cards.dart | 10 +-- lib/studies/fortnightly/shared.dart | 41 ++++----- lib/studies/rally/charts/pie_chart.dart | 2 +- lib/studies/rally/login.dart | 74 ++++++++-------- lib/studies/rally/tabs/overview.dart | 6 +- lib/studies/rally/tabs/sidebar.dart | 4 +- lib/studies/reply/mail_view_page.dart | 8 +- lib/studies/shrine/category_menu_page.dart | 84 +++++++++++-------- .../shrine/expanding_bottom_sheet.dart | 13 ++- lib/studies/shrine/login.dart | 1 - lib/studies/shrine/shopping_cart.dart | 22 ++--- .../shrine/supplemental/product_card.dart | 13 +-- lib/studies/starter/home.dart | 14 ++-- pubspec.lock | 2 +- 20 files changed, 169 insertions(+), 154 deletions(-) diff --git a/lib/pages/about.dart b/lib/pages/about.dart index f5a411dc57..f9dc786a4b 100644 --- a/lib/pages/about.dart +++ b/lib/pages/about.dart @@ -54,14 +54,14 @@ class _AboutDialog extends StatelessWidget { children: [ FutureBuilder( future: getVersionNumber(), - builder: (context, snapshot) => Text( + builder: (context, snapshot) => SelectableText( snapshot.hasData ? '$name ${snapshot.data}' : name, style: textTheme.headline4.apply(color: colorScheme.onPrimary), ), ), const SizedBox(height: 24), - RichText( - text: TextSpan( + SelectableText.rich( + TextSpan( children: [ TextSpan( style: bodyTextStyle, @@ -91,7 +91,7 @@ class _AboutDialog extends StatelessWidget { ), ), const SizedBox(height: 18), - Text( + SelectableText( legalese, style: bodyTextStyle, ), diff --git a/lib/pages/demo.dart b/lib/pages/demo.dart index 0036f16475..c83144e382 100644 --- a/lib/pages/demo.dart +++ b/lib/pages/demo.dart @@ -672,7 +672,7 @@ class _DemoSectionInfo extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Text( + SelectableText( title, style: textTheme.headline4.apply( color: colorScheme.onSurface, @@ -681,7 +681,7 @@ class _DemoSectionInfo extends StatelessWidget { ), ), const SizedBox(height: 12), - Text( + SelectableText( description, style: textTheme.bodyText2.apply(color: colorScheme.onSurface), ), @@ -827,10 +827,7 @@ class CodeDisplayPage extends StatelessWidget { child: SingleChildScrollView( child: Container( padding: const EdgeInsets.symmetric(vertical: 8), - child: RichText( - textDirection: TextDirection.ltr, - text: _richTextCode, - ), + child: SelectableText.rich(_richTextCode), ), ), ), diff --git a/lib/pages/home.dart b/lib/pages/home.dart index ada2c66b94..b1a9148f6c 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -295,7 +295,7 @@ class Header extends StatelessWidget { top: isDisplayDesktop(context) ? 63 : 15, bottom: isDisplayDesktop(context) ? 21 : 11, ), - child: Text( + child: SelectableText( text, style: Theme.of(context).textTheme.headline4.apply( color: color, @@ -564,13 +564,11 @@ class _DesktopCategoryHeader extends StatelessWidget { padding: const EdgeInsetsDirectional.only(start: 8), child: Semantics( header: true, - child: Text( + child: SelectableText( category.displayTitle(GalleryLocalizations.of(context)), style: Theme.of(context).textTheme.headline5.apply( color: colorScheme.onSurface, ), - maxLines: 4, - overflow: TextOverflow.ellipsis, ), ), ), diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index 6b383b3496..06cc5b7983 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -352,7 +352,7 @@ class SettingsAttribution extends StatelessWidget { top: verticalPadding, bottom: verticalPadding, ), - child: Text( + child: SelectableText( GalleryLocalizations.of(context).settingsAttribution, style: Theme.of(context).textTheme.bodyText1.copyWith( fontSize: 12, diff --git a/lib/pages/settings_list_item.dart b/lib/pages/settings_list_item.dart index 9c888809f6..2d8920c05a 100644 --- a/lib/pages/settings_list_item.dart +++ b/lib/pages/settings_list_item.dart @@ -46,7 +46,7 @@ class SlowMotionSetting extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( + SelectableText( GalleryLocalizations.of(context).settingsSlowMotion, style: textTheme.subtitle1.apply( color: colorScheme.onSurface, diff --git a/lib/studies/crane/backdrop.dart b/lib/studies/crane/backdrop.dart index f8c1ed792e..f486005a96 100644 --- a/lib/studies/crane/backdrop.dart +++ b/lib/studies/crane/backdrop.dart @@ -60,7 +60,7 @@ class _FrontLayerState extends State<_FrontLayer> { top: 20, bottom: 22, ), - child: Text( + child: SelectableText( widget.title, style: Theme.of(context).textTheme.subtitle2, ), diff --git a/lib/studies/crane/item_cards.dart b/lib/studies/crane/item_cards.dart index b9f0cc3ba7..7d62d7c43f 100644 --- a/lib/studies/crane/item_cards.dart +++ b/lib/studies/crane/item_cards.dart @@ -37,12 +37,12 @@ class DestinationCard extends StatelessWidget { ), Padding( padding: const EdgeInsets.only(top: 20, bottom: 10), - child: Text( + child: SelectableText( destination.destination, style: textTheme.subtitle1, ), ), - Text( + SelectableText( destination.subtitle(context), semanticsLabel: destination.subtitleSemantics(context), style: textTheme.subtitle2, @@ -64,9 +64,9 @@ class DestinationCard extends StatelessWidget { child: _DestinationImage(destination: destination), ), ), - title: - Text(destination.destination, style: textTheme.subtitle1), - subtitle: Text( + title: SelectableText(destination.destination, + style: textTheme.subtitle1), + subtitle: SelectableText( destination.subtitle(context), semanticsLabel: destination.subtitleSemantics(context), style: textTheme.subtitle2, diff --git a/lib/studies/fortnightly/shared.dart b/lib/studies/fortnightly/shared.dart index b61d803d20..d5bd408b0b 100644 --- a/lib/studies/fortnightly/shared.dart +++ b/lib/studies/fortnightly/shared.dart @@ -45,12 +45,12 @@ class HorizontalArticlePreview extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + SelectableText( data.category, style: textTheme.subtitle1, ), const SizedBox(height: 12), - Text( + SelectableText( data.title, style: textTheme.headline5.copyWith(fontSize: 16), ), @@ -58,7 +58,7 @@ class HorizontalArticlePreview extends StatelessWidget { ), ), if (minutes != null) ...[ - Text( + SelectableText( GalleryLocalizations.of(context).craneMinutes(minutes), style: textTheme.bodyText1, ), @@ -122,18 +122,18 @@ class VerticalArticlePreview extends StatelessWidget { ), ), const SizedBox(height: 12), - Text( + SelectableText( data.category, style: textTheme.subtitle1, ), const SizedBox(height: 12), - Text( + SelectableText( data.title, style: headlineTextStyle ?? textTheme.headline5, ), if (showSnippet) ...[ const SizedBox(height: 4), - Text( + SelectableText( data.snippet, style: textTheme.bodyText2, ), @@ -190,7 +190,7 @@ List buildArticlePreviewItems(BuildContext context) { ), ), sectionDivider, - Text( + SelectableText( GalleryLocalizations.of(context).fortnightlyLatestUpdates, style: textTheme.headline6, ), @@ -253,35 +253,35 @@ class HashtagBar extends StatelessWidget { children: [ const SizedBox(width: 16), Center( - child: Text( + child: SelectableText( '#${GalleryLocalizations.of(context).fortnightlyTrendingTechDesign}', style: textTheme.subtitle2, ), ), verticalDivider, Center( - child: Text( + child: SelectableText( '#${GalleryLocalizations.of(context).fortnightlyTrendingReform}', style: textTheme.subtitle2, ), ), verticalDivider, Center( - child: Text( + child: SelectableText( '#${GalleryLocalizations.of(context).fortnightlyTrendingHealthcareRevolution}', style: textTheme.subtitle2, ), ), verticalDivider, Center( - child: Text( + child: SelectableText( '#${GalleryLocalizations.of(context).fortnightlyTrendingGreenArmy}', style: textTheme.subtitle2, ), ), verticalDivider, Center( - child: Text( + child: SelectableText( '#${GalleryLocalizations.of(context).fortnightlyTrendingStocks}', style: textTheme.subtitle2, ), @@ -354,7 +354,7 @@ class MenuItem extends StatelessWidget { child: header ? null : const Icon(Icons.arrow_drop_down), ), Expanded( - child: Text( + child: SelectableText( title, style: Theme.of(context).textTheme.subtitle1.copyWith( fontWeight: header ? FontWeight.w700 : FontWeight.w600, @@ -387,19 +387,19 @@ class StockItem extends StatelessWidget { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(ticker, style: textTheme.subtitle1), + SelectableText(ticker, style: textTheme.subtitle1), const SizedBox(height: 2), Row( children: [ Expanded( - child: Text( + child: SelectableText( price, style: textTheme.subtitle2.copyWith( color: textTheme.subtitle2.color.withOpacity(0.75), ), ), ), - Text( + SelectableText( percent > 0 ? '+' : '-', style: textTheme.subtitle2.copyWith( fontSize: 12, @@ -409,7 +409,7 @@ class StockItem extends StatelessWidget { ), ), const SizedBox(width: 4), - Text( + SelectableText( percentFormat.format(percent.abs() / 100), style: textTheme.caption.copyWith( fontSize: 12, @@ -521,13 +521,14 @@ class VideoPreview extends StatelessWidget { Row( children: [ Expanded( - child: Text(data.category, style: textTheme.subtitle1), + child: SelectableText(data.category, style: textTheme.subtitle1), ), - Text(time, style: textTheme.bodyText1) + SelectableText(time, style: textTheme.bodyText1) ], ), const SizedBox(height: 4), - Text(data.title, style: textTheme.headline5.copyWith(fontSize: 16)), + SelectableText(data.title, + style: textTheme.headline5.copyWith(fontSize: 16)), ], ); } diff --git a/lib/studies/rally/charts/pie_chart.dart b/lib/studies/rally/charts/pie_chart.dart index 87d6b24ddb..9621962a79 100644 --- a/lib/studies/rally/charts/pie_chart.dart +++ b/lib/studies/rally/charts/pie_chart.dart @@ -182,7 +182,7 @@ class _AnimatedRallyPieChart extends AnimatedWidget { centerLabel, style: labelTextStyle, ), - Text( + SelectableText( usdWithSignFormat(context).format(centerAmount), style: headlineStyle, ), diff --git a/lib/studies/rally/login.dart b/lib/studies/rally/login.dart index 4e1ab0c877..44fca892d9 100644 --- a/lib/studies/rally/login.dart +++ b/lib/studies/rally/login.dart @@ -39,7 +39,6 @@ class _LoginPageState extends State with RestorationMixin { Widget build(BuildContext context) { return ApplyTextOptions( child: Scaffold( - appBar: AppBar(automaticallyImplyLeading: false), body: SafeArea( child: _MainView( usernameController: _usernameController.value, @@ -293,42 +292,45 @@ class _ThumbButtonState extends State<_ThumbButton> { button: true, enabled: true, label: GalleryLocalizations.of(context).rallyLoginLabelLogin, - child: GestureDetector( - onTap: widget.onTap, - child: Focus( - onKey: (node, event) { - if (event is RawKeyDownEvent) { - if (event.logicalKey == LogicalKeyboardKey.enter || - event.logicalKey == LogicalKeyboardKey.space) { - widget.onTap(); - return KeyEventResult.handled; + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: widget.onTap, + child: Focus( + onKey: (node, event) { + if (event is RawKeyDownEvent) { + if (event.logicalKey == LogicalKeyboardKey.enter || + event.logicalKey == LogicalKeyboardKey.space) { + widget.onTap(); + return KeyEventResult.handled; + } } - } - return KeyEventResult.ignored; - }, - onFocusChange: (hasFocus) { - if (hasFocus) { - setState(() { - borderDecoration = BoxDecoration( - border: Border.all( - color: Colors.white.withOpacity(0.5), - width: 2, - ), - ); - }); - } else { - setState(() { - borderDecoration = null; - }); - } - }, - child: Container( - decoration: borderDecoration, - height: 120, - child: ExcludeSemantics( - child: Image.asset( - 'thumb.png', - package: 'rally_assets', + return KeyEventResult.ignored; + }, + onFocusChange: (hasFocus) { + if (hasFocus) { + setState(() { + borderDecoration = BoxDecoration( + border: Border.all( + color: Colors.white.withOpacity(0.5), + width: 2, + ), + ); + }); + } else { + setState(() { + borderDecoration = null; + }); + } + }, + child: Container( + decoration: borderDecoration, + height: 120, + child: ExcludeSemantics( + child: Image.asset( + 'thumb.png', + package: 'rally_assets', + ), ), ), ), diff --git a/lib/studies/rally/tabs/overview.dart b/lib/studies/rally/tabs/overview.dart index 02f33b916f..8b245463c2 100644 --- a/lib/studies/rally/tabs/overview.dart +++ b/lib/studies/rally/tabs/overview.dart @@ -210,7 +210,7 @@ class _Alert extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( - child: Text(alert.message), + child: SelectableText(alert.message), ), SizedBox( width: 100, @@ -264,11 +264,11 @@ class _FinancialView extends StatelessWidget { left: 16, right: 16, ), - child: Text(title), + child: SelectableText(title), ), Padding( padding: const EdgeInsets.only(left: 16, right: 16), - child: Text( + child: SelectableText( usdWithSignFormat(context).format(total), style: theme.textTheme.bodyText1.copyWith( fontSize: 44 / reducedTextScale(context), diff --git a/lib/studies/rally/tabs/sidebar.dart b/lib/studies/rally/tabs/sidebar.dart index 9da9abbe69..37b275f6af 100644 --- a/lib/studies/rally/tabs/sidebar.dart +++ b/lib/studies/rally/tabs/sidebar.dart @@ -69,7 +69,7 @@ class SidebarItem extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 8), - Text( + SelectableText( title, style: textTheme.bodyText2.copyWith( fontSize: 16, @@ -77,7 +77,7 @@ class SidebarItem extends StatelessWidget { ), ), const SizedBox(height: 8), - Text( + SelectableText( value, style: textTheme.bodyText1.copyWith(fontSize: 20), ), diff --git a/lib/studies/reply/mail_view_page.dart b/lib/studies/reply/mail_view_page.dart index 8d239bb6ff..2b7ad73933 100644 --- a/lib/studies/reply/mail_view_page.dart +++ b/lib/studies/reply/mail_view_page.dart @@ -66,7 +66,7 @@ class _MailViewHeader extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( - child: Text( + child: SelectableText( email.subject, style: textTheme.headline4.copyWith(height: 1.1), ), @@ -94,9 +94,9 @@ class _MailViewHeader extends StatelessWidget { mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Text('${email.sender} - ${email.time}'), + SelectableText('${email.sender} - ${email.time}'), const SizedBox(height: 4), - Text( + SelectableText( 'To ${email.recipients},', style: textTheme.caption.copyWith( color: Theme.of(context) @@ -125,7 +125,7 @@ class _MailViewBody extends StatelessWidget { @override Widget build(BuildContext context) { - return Text( + return SelectableText( message, style: Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 16), ); diff --git a/lib/studies/shrine/category_menu_page.dart b/lib/studies/shrine/category_menu_page.dart index 3edde44ebe..b9d5ceb920 100644 --- a/lib/studies/shrine/category_menu_page.dart +++ b/lib/studies/shrine/category_menu_page.dart @@ -70,22 +70,26 @@ class CategoryMenuPage extends StatelessWidget { selected: model.selectedCategory == category, button: true, enabled: true, - child: GestureDetector( - onTap: () { - model.setCategory(category); - if (onCategoryTap != null) { - onCategoryTap(); - } - }, - child: model.selectedCategory == category - ? CustomPaint( - painter: TriangleCategoryIndicator( - indicatorWidth, - indicatorHeight, - ), - child: _buttonText(categoryString, selectedCategoryTextStyle), - ) - : _buttonText(categoryString, unselectedCategoryTextStyle), + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + model.setCategory(category); + if (onCategoryTap != null) { + onCategoryTap(); + } + }, + child: model.selectedCategory == category + ? CustomPaint( + painter: TriangleCategoryIndicator( + indicatorWidth, + indicatorHeight, + ), + child: + _buttonText(categoryString, selectedCategoryTextStyle), + ) + : _buttonText(categoryString, unselectedCategoryTextStyle), + ), ), ), ); @@ -131,15 +135,18 @@ class CategoryMenuPage extends StatelessWidget { Semantics( button: true, enabled: true, - child: GestureDetector( - onTap: () { - Navigator.of(context) - .restorablePushNamed(ShrineApp.loginRoute); - }, - child: _buttonText( - GalleryLocalizations.of(context) - .shrineLogoutButtonCaption, - logoutTextStyle, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + Navigator.of(context) + .restorablePushNamed(ShrineApp.loginRoute); + }, + child: _buttonText( + GalleryLocalizations.of(context) + .shrineLogoutButtonCaption, + logoutTextStyle, + ), ), ), ), @@ -178,18 +185,21 @@ class CategoryMenuPage extends StatelessWidget { Semantics( button: true, enabled: true, - child: GestureDetector( - onTap: () { - if (onCategoryTap != null) { - onCategoryTap(); - } - Navigator.of(context) - .restorablePushNamed(ShrineApp.loginRoute); - }, - child: _buttonText( - GalleryLocalizations.of(context) - .shrineLogoutButtonCaption, - logoutTextStyle, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + if (onCategoryTap != null) { + onCategoryTap(); + } + Navigator.of(context) + .restorablePushNamed(ShrineApp.loginRoute); + }, + child: _buttonText( + GalleryLocalizations.of(context) + .shrineLogoutButtonCaption, + logoutTextStyle, + ), ), ), ), diff --git a/lib/studies/shrine/expanding_bottom_sheet.dart b/lib/studies/shrine/expanding_bottom_sheet.dart index d6c4bf8389..3c3fe5388e 100644 --- a/lib/studies/shrine/expanding_bottom_sheet.dart +++ b/lib/studies/shrine/expanding_bottom_sheet.dart @@ -508,10 +508,13 @@ class _ExpandingBottomSheetState extends State { enabled: true, label: GalleryLocalizations.of(context) .shrineScreenReaderCart(totalCartQuantity), - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: open, - child: child, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: open, + child: child, + ), ), ) : child; @@ -741,6 +744,8 @@ class ProductThumbnail extends StatelessWidget { Widget build(BuildContext context) { final isDesktop = isDisplayDesktop(context); + print(opacityAnimation); + print(animation); return FadeTransition( opacity: opacityAnimation, child: ScaleTransition( diff --git a/lib/studies/shrine/login.dart b/lib/studies/shrine/login.dart index 58b555128e..6ea5aed383 100644 --- a/lib/studies/shrine/login.dart +++ b/lib/studies/shrine/login.dart @@ -59,7 +59,6 @@ class LoginPage extends StatelessWidget { ), ) : Scaffold( - appBar: AppBar(backgroundColor: Colors.white), body: SafeArea( child: ListView( restorationId: 'login_list_view', diff --git a/lib/studies/shrine/shopping_cart.dart b/lib/studies/shrine/shopping_cart.dart index 19730a559f..ce32c61340 100644 --- a/lib/studies/shrine/shopping_cart.dart +++ b/lib/studies/shrine/shopping_cart.dart @@ -167,11 +167,11 @@ class ShoppingCartSummary extends StatelessWidget { child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( + SelectableText( GalleryLocalizations.of(context).shrineCartTotalCaption, ), Expanded( - child: Text( + child: SelectableText( formatter.format(model.totalCost), style: largeAmountStyle, textAlign: TextAlign.end, @@ -184,12 +184,12 @@ class ShoppingCartSummary extends StatelessWidget { MergeSemantics( child: Row( children: [ - Text( + SelectableText( GalleryLocalizations.of(context) .shrineCartSubtotalCaption, ), Expanded( - child: Text( + child: SelectableText( formatter.format(model.subtotalCost), style: smallAmountStyle, textAlign: TextAlign.end, @@ -202,12 +202,12 @@ class ShoppingCartSummary extends StatelessWidget { MergeSemantics( child: Row( children: [ - Text( + SelectableText( GalleryLocalizations.of(context) .shrineCartShippingCaption, ), Expanded( - child: Text( + child: SelectableText( formatter.format(model.shippingCost), style: smallAmountStyle, textAlign: TextAlign.end, @@ -220,11 +220,11 @@ class ShoppingCartSummary extends StatelessWidget { MergeSemantics( child: Row( children: [ - Text( + SelectableText( GalleryLocalizations.of(context).shrineCartTaxCaption, ), Expanded( - child: Text( + child: SelectableText( formatter.format(model.tax), style: smallAmountStyle, textAlign: TextAlign.end, @@ -312,12 +312,12 @@ class ShoppingCartRow extends StatelessWidget { child: Row( children: [ Expanded( - child: Text( + child: SelectableText( GalleryLocalizations.of(context) .shrineProductQuantity(quantity), ), ), - Text( + SelectableText( GalleryLocalizations.of(context) .shrineProductPrice( formatter.format(product.price), @@ -326,7 +326,7 @@ class ShoppingCartRow extends StatelessWidget { ], ), ), - Text( + SelectableText( product.name(context), style: localTheme.textTheme.subtitle1 .copyWith(fontWeight: FontWeight.w600), diff --git a/lib/studies/shrine/supplemental/product_card.dart b/lib/studies/shrine/supplemental/product_card.dart index 6372b1872e..74eccb04f4 100644 --- a/lib/studies/shrine/supplemental/product_card.dart +++ b/lib/studies/shrine/supplemental/product_card.dart @@ -87,11 +87,14 @@ Widget _buildProductCard({ return Semantics( hint: GalleryLocalizations.of(context).shrineScreenReaderProductAddToCart, - child: GestureDetector( - onTap: () { - model.addProductToCart(product.id); - }, - child: child, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + model.addProductToCart(product.id); + }, + child: child, + ), ), ); }, diff --git a/lib/studies/starter/home.dart b/lib/studies/starter/home.dart index 6f46053388..da7b838b15 100644 --- a/lib/studies/starter/home.dart +++ b/lib/studies/starter/home.dart @@ -25,19 +25,19 @@ class HomePage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + SelectableText( GalleryLocalizations.of(context).starterAppGenericHeadline, style: textTheme.headline3.copyWith( color: colorScheme.onSecondary, ), ), const SizedBox(height: 10), - Text( + SelectableText( GalleryLocalizations.of(context).starterAppGenericSubtitle, style: textTheme.subtitle1, ), const SizedBox(height: 48), - Text( + SelectableText( GalleryLocalizations.of(context).starterAppGenericBody, style: textTheme.bodyText1, ), @@ -110,14 +110,14 @@ class AdaptiveAppBar extends StatelessWidget implements PreferredSizeWidget { automaticallyImplyLeading: !isDesktop, title: isDesktop ? null - : Text(GalleryLocalizations.of(context).starterAppGenericTitle), + : SelectableText(GalleryLocalizations.of(context).starterAppGenericTitle), bottom: isDesktop ? PreferredSize( preferredSize: const Size.fromHeight(26), child: Container( alignment: AlignmentDirectional.centerStart, margin: const EdgeInsetsDirectional.fromSTEB(72, 0, 0, 22), - child: Text( + child: SelectableText( GalleryLocalizations.of(context).starterAppGenericTitle, style: themeData.textTheme.headline6.copyWith( color: themeData.colorScheme.onPrimary, @@ -167,11 +167,11 @@ class _ListDrawerState extends State { child: ListView( children: [ ListTile( - title: Text( + title: SelectableText( GalleryLocalizations.of(context).starterAppTitle, style: textTheme.headline6, ), - subtitle: Text( + subtitle: SelectableText( GalleryLocalizations.of(context).starterAppGenericSubtitle, style: textTheme.bodyText2, ), diff --git a/pubspec.lock b/pubspec.lock index 6f1b013847..63376f139c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -651,7 +651,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "7.1.1" + version: "7.2.0" watcher: dependency: transitive description: From d07fe40a3fdfa56831b162a14b206060188d3d6d Mon Sep 17 00:00:00 2001 From: Pierre-Louis Date: Thu, 2 Sep 2021 15:42:34 +0200 Subject: [PATCH 2/5] add more mouseregions --- .../cupertino/cupertino_picker_demo.dart | 204 +++++++++--------- lib/demos/material/text_field_demo.dart | 8 +- lib/demos/reference/transformations_demo.dart | 39 ++-- lib/feature_discovery/feature_discovery.dart | 17 +- lib/pages/demo.dart | 26 ++- lib/pages/splash.dart | 32 +-- lib/studies/reply/adaptive_nav.dart | 35 +-- lib/studies/shrine/backdrop.dart | 15 +- lib/studies/shrine/scrim.dart | 13 +- 9 files changed, 214 insertions(+), 175 deletions(-) diff --git a/lib/demos/cupertino/cupertino_picker_demo.dart b/lib/demos/cupertino/cupertino_picker_demo.dart index c3df6b23df..9446310b61 100644 --- a/lib/demos/cupertino/cupertino_picker_demo.dart +++ b/lib/demos/cupertino/cupertino_picker_demo.dart @@ -44,122 +44,134 @@ class _CupertinoPickerDemoState extends State { } Widget _buildDatePicker(BuildContext context) { - return GestureDetector( - onTap: () { - _showDemoPicker( - context: context, - child: _BottomPicker( - child: CupertinoDatePicker( - backgroundColor: - CupertinoColors.systemBackground.resolveFrom(context), - mode: CupertinoDatePickerMode.date, - initialDateTime: date, - onDateTimeChanged: (newDateTime) { - setState(() => date = newDateTime); - }, + return MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + _showDemoPicker( + context: context, + child: _BottomPicker( + child: CupertinoDatePicker( + backgroundColor: + CupertinoColors.systemBackground.resolveFrom(context), + mode: CupertinoDatePickerMode.date, + initialDateTime: date, + onDateTimeChanged: (newDateTime) { + setState(() => date = newDateTime); + }, + ), ), + ); + }, + child: _Menu(children: [ + Text(GalleryLocalizations.of(context).demoCupertinoPickerDate), + Text( + DateFormat.yMMMMd().format(date), + style: const TextStyle(color: CupertinoColors.inactiveGray), ), - ); - }, - child: _Menu(children: [ - Text(GalleryLocalizations.of(context).demoCupertinoPickerDate), - Text( - DateFormat.yMMMMd().format(date), - style: const TextStyle(color: CupertinoColors.inactiveGray), - ), - ]), + ]), + ), ); } Widget _buildTimePicker(BuildContext context) { - return GestureDetector( - onTap: () { - _showDemoPicker( - context: context, - child: _BottomPicker( - child: CupertinoDatePicker( - backgroundColor: - CupertinoColors.systemBackground.resolveFrom(context), - mode: CupertinoDatePickerMode.time, - initialDateTime: time, - onDateTimeChanged: (newDateTime) { - setState(() => time = newDateTime); - }, + return MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + _showDemoPicker( + context: context, + child: _BottomPicker( + child: CupertinoDatePicker( + backgroundColor: + CupertinoColors.systemBackground.resolveFrom(context), + mode: CupertinoDatePickerMode.time, + initialDateTime: time, + onDateTimeChanged: (newDateTime) { + setState(() => time = newDateTime); + }, + ), ), - ), - ); - }, - child: _Menu( - children: [ - Text(GalleryLocalizations.of(context).demoCupertinoPickerTime), - Text( - DateFormat.jm().format(time), - style: const TextStyle(color: CupertinoColors.inactiveGray), - ), - ], + ); + }, + child: _Menu( + children: [ + Text(GalleryLocalizations.of(context).demoCupertinoPickerTime), + Text( + DateFormat.jm().format(time), + style: const TextStyle(color: CupertinoColors.inactiveGray), + ), + ], + ), ), ); } Widget _buildDateAndTimePicker(BuildContext context) { - return GestureDetector( - onTap: () { - _showDemoPicker( - context: context, - child: _BottomPicker( - child: CupertinoDatePicker( - backgroundColor: - CupertinoColors.systemBackground.resolveFrom(context), - mode: CupertinoDatePickerMode.dateAndTime, - initialDateTime: dateTime, - onDateTimeChanged: (newDateTime) { - setState(() => dateTime = newDateTime); - }, + return MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + _showDemoPicker( + context: context, + child: _BottomPicker( + child: CupertinoDatePicker( + backgroundColor: + CupertinoColors.systemBackground.resolveFrom(context), + mode: CupertinoDatePickerMode.dateAndTime, + initialDateTime: dateTime, + onDateTimeChanged: (newDateTime) { + setState(() => dateTime = newDateTime); + }, + ), ), - ), - ); - }, - child: _Menu( - children: [ - Text(GalleryLocalizations.of(context).demoCupertinoPickerDateTime), - Flexible( - child: Text( - DateFormat.yMMMd().add_jm().format(dateTime), - style: const TextStyle(color: CupertinoColors.inactiveGray), + ); + }, + child: _Menu( + children: [ + Text(GalleryLocalizations.of(context).demoCupertinoPickerDateTime), + Flexible( + child: Text( + DateFormat.yMMMd().add_jm().format(dateTime), + style: const TextStyle(color: CupertinoColors.inactiveGray), + ), ), - ), - ], + ], + ), ), ); } Widget _buildCountdownTimerPicker(BuildContext context) { - return GestureDetector( - onTap: () { - _showDemoPicker( - context: context, - child: _BottomPicker( - child: CupertinoTimerPicker( - backgroundColor: - CupertinoColors.systemBackground.resolveFrom(context), - initialTimerDuration: timer, - onTimerDurationChanged: (newTimer) { - setState(() => timer = newTimer); - }, + return MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + _showDemoPicker( + context: context, + child: _BottomPicker( + child: CupertinoTimerPicker( + backgroundColor: + CupertinoColors.systemBackground.resolveFrom(context), + initialTimerDuration: timer, + onTimerDurationChanged: (newTimer) { + setState(() => timer = newTimer); + }, + ), ), - ), - ); - }, - child: _Menu( - children: [ - Text(GalleryLocalizations.of(context).demoCupertinoPickerTimer), - Text( - '${timer.inHours}:' - '${(timer.inMinutes % 60).toString().padLeft(2, '0')}:' - '${(timer.inSeconds % 60).toString().padLeft(2, '0')}', - style: const TextStyle(color: CupertinoColors.inactiveGray), - ), - ], + ); + }, + child: _Menu( + children: [ + Text(GalleryLocalizations.of(context).demoCupertinoPickerTimer), + Text( + '${timer.inHours}:' + '${(timer.inMinutes % 60).toString().padLeft(2, '0')}:' + '${(timer.inSeconds % 60).toString().padLeft(2, '0')}', + style: const TextStyle(color: CupertinoColors.inactiveGray), + ), + ], + ), ), ); } diff --git a/lib/demos/material/text_field_demo.dart b/lib/demos/material/text_field_demo.dart index 1e0c331a56..3017799eee 100644 --- a/lib/demos/material/text_field_demo.dart +++ b/lib/demos/material/text_field_demo.dart @@ -95,14 +95,14 @@ class _PasswordFieldState extends State with RestorationMixin { hintText: widget.hintText, labelText: widget.labelText, helperText: widget.helperText, - suffixIcon: GestureDetector( - dragStartBehavior: DragStartBehavior.down, - onTap: () { + suffixIcon: IconButton( + onPressed: () { setState(() { _obscureText.value = !_obscureText.value; }); }, - child: Icon( + hoverColor: Colors.transparent, + icon: Icon( _obscureText.value ? Icons.visibility : Icons.visibility_off, semanticLabel: _obscureText.value ? GalleryLocalizations.of(context) diff --git a/lib/demos/reference/transformations_demo.dart b/lib/demos/reference/transformations_demo.dart index a6634d99fd..1c4689f330 100644 --- a/lib/demos/reference/transformations_demo.dart +++ b/lib/demos/reference/transformations_demo.dart @@ -130,24 +130,27 @@ class _TransformationsDemoState extends State } return ClipRect( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTapUp: _onTapUp, - child: InteractiveViewer( - key: _targetKey, - scaleEnabled: !kIsWeb, - transformationController: _transformationController, - boundaryMargin: EdgeInsets.symmetric( - horizontal: viewportSize.width, - vertical: viewportSize.height, - ), - minScale: 0.01, - onInteractionStart: _onScaleStart, - child: SizedBox.expand( - child: CustomPaint( - size: _board.size, - painter: _BoardPainter( - board: _board, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTapUp: _onTapUp, + child: InteractiveViewer( + key: _targetKey, + scaleEnabled: !kIsWeb, + transformationController: _transformationController, + boundaryMargin: EdgeInsets.symmetric( + horizontal: viewportSize.width, + vertical: viewportSize.height, + ), + minScale: 0.01, + onInteractionStart: _onScaleStart, + child: SizedBox.expand( + child: CustomPaint( + size: _board.size, + painter: _BoardPainter( + board: _board, + ), ), ), ), diff --git a/lib/feature_discovery/feature_discovery.dart b/lib/feature_discovery/feature_discovery.dart index 47c9022b76..f608b1cd6d 100644 --- a/lib/feature_discovery/feature_discovery.dart +++ b/lib/feature_discovery/feature_discovery.dart @@ -150,13 +150,16 @@ class _FeatureDiscoveryState extends State type: MaterialType.transparency, child: Stack( children: [ - GestureDetector( - key: FeatureDiscovery.gestureDetectorKey, - onTap: dismiss, - child: Container( - width: double.infinity, - height: double.infinity, - color: Colors.transparent, + MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + key: FeatureDiscovery.gestureDetectorKey, + onTap: dismiss, + child: Container( + width: double.infinity, + height: double.infinity, + color: Colors.transparent, + ), ), ), Background( diff --git a/lib/pages/demo.dart b/lib/pages/demo.dart index c83144e382..694c62c653 100644 --- a/lib/pages/demo.dart +++ b/lib/pages/demo.dart @@ -411,20 +411,24 @@ class _GalleryDemoPageState extends State child: section, ); + final isDemoNormal = currentDemoState == _DemoState.normal; // Add a tap gesture to collapse the currently opened section. demoContent = Semantics( label: MaterialLocalizations.of(context).modalBarrierDismissLabel, - child: GestureDetector( - onTap: () { - if (currentDemoState != _DemoState.normal) { - setStateAndUpdate(() { - _demoStateIndex.value = _DemoState.normal.index; - }); - } - }, - child: Semantics( - excludeSemantics: currentDemoState != _DemoState.normal, - child: demoContent, + child: MouseRegion( + cursor: isDemoNormal ? MouseCursor.defer : SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + if (!isDemoNormal) { + setStateAndUpdate(() { + _demoStateIndex.value = _DemoState.normal.index; + }); + } + }, + child: Semantics( + excludeSemantics: !isDemoNormal, + child: demoContent, + ), ), ), ); diff --git a/lib/pages/splash.dart b/lib/pages/splash.dart index c523c49ed3..56def49950 100644 --- a/lib/pages/splash.dart +++ b/lib/pages/splash.dart @@ -119,17 +119,20 @@ class _SplashPageState extends State final animation = _getPanelAnimation(context, constraints); var frontLayer = widget.child; if (_isSplashVisible) { - frontLayer = GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _controller.reverse(); - }, - onVerticalDragEnd: (details) { - if (details.velocity.pixelsPerSecond.dy < -200) { + frontLayer = MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { _controller.reverse(); - } - }, - child: IgnorePointer(child: frontLayer), + }, + onVerticalDragEnd: (details) { + if (details.velocity.pixelsPerSecond.dy < -200) { + _controller.reverse(); + } + }, + child: IgnorePointer(child: frontLayer), + ), ); } @@ -194,9 +197,12 @@ class _SplashBackLayer extends StatelessWidget { padding: const EdgeInsets.only(top: 50), child: Align( alignment: Alignment.topCenter, - child: GestureDetector( - onTap: onTap, - child: flutterLogo, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: onTap, + child: flutterLogo, + ), ), ), ) diff --git a/lib/studies/reply/adaptive_nav.dart b/lib/studies/reply/adaptive_nav.dart index 2cc91c0477..a1f22f38d0 100644 --- a/lib/studies/reply/adaptive_nav.dart +++ b/lib/studies/reply/adaptive_nav.dart @@ -631,21 +631,24 @@ class _MobileNavState extends State<_MobileNav> with TickerProviderStateMixin { ), ), ), - GestureDetector( - onTap: () { - _drawerController.reverse(); - _dropArrowController.reverse(); - }, - child: Visibility( - maintainAnimation: true, - maintainState: true, - visible: _bottomDrawerVisible, - child: FadeTransition( - opacity: _drawerCurve, - child: Container( - height: MediaQuery.of(context).size.height, - width: MediaQuery.of(context).size.width, - color: Theme.of(context).bottomSheetTheme.modalBackgroundColor, + MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + _drawerController.reverse(); + _dropArrowController.reverse(); + }, + child: Visibility( + maintainAnimation: true, + maintainState: true, + visible: _bottomDrawerVisible, + child: FadeTransition( + opacity: _drawerCurve, + child: Container( + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + color: Theme.of(context).bottomSheetTheme.modalBackgroundColor, + ), ), ), ), @@ -967,6 +970,7 @@ class _BottomDrawerDestinations extends StatelessWidget { ); }, child: ListTile( + mouseCursor: SystemMouseCursors.click, leading: ImageIcon( AssetImage( destination.icon, @@ -1029,6 +1033,7 @@ class _BottomDrawerFolderSection extends StatelessWidget { InkWell( onTap: () {}, child: ListTile( + mouseCursor: SystemMouseCursors.click, leading: ImageIcon( AssetImage( folders[folder], diff --git a/lib/studies/shrine/backdrop.dart b/lib/studies/shrine/backdrop.dart index c81140ebe3..eb0cbfd386 100644 --- a/lib/studies/shrine/backdrop.dart +++ b/lib/studies/shrine/backdrop.dart @@ -45,12 +45,15 @@ class _FrontLayer extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ onTap != null - ? GestureDetector( - behavior: HitTestBehavior.opaque, - excludeFromSemantics: - true, // Because there is already a "Close Menu" button on screen. - onTap: onTap, - child: pageTopArea, + ? MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + excludeFromSemantics: + true, // Because there is already a "Close Menu" button on screen. + onTap: onTap, + child: pageTopArea, + ), ) : pageTopArea, Expanded( diff --git a/lib/studies/shrine/scrim.dart b/lib/studies/shrine/scrim.dart index 073073672f..3a31870225 100644 --- a/lib/studies/shrine/scrim.dart +++ b/lib/studies/shrine/scrim.dart @@ -27,11 +27,14 @@ class Scrim extends StatelessWidget { final tapToRevert = (controller.status == AnimationStatus.completed); if (tapToRevert) { - return GestureDetector( - onTap: () { - controller.reverse(); - }, - child: scrimRectangle, + return MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + controller.reverse(); + }, + child: scrimRectangle, + ), ); } else if (ignorePointer) { return IgnorePointer(child: scrimRectangle); From bbf10dbfebf83969920fca2cdd98de39464d5cfc Mon Sep 17 00:00:00 2001 From: Pierre-Louis Date: Thu, 2 Sep 2021 15:49:35 +0200 Subject: [PATCH 3/5] address feedback --- lib/pages/demo.dart | 5 ++++- lib/studies/shrine/expanding_bottom_sheet.dart | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/pages/demo.dart b/lib/pages/demo.dart index 694c62c653..45bcfe1127 100644 --- a/lib/pages/demo.dart +++ b/lib/pages/demo.dart @@ -831,7 +831,10 @@ class CodeDisplayPage extends StatelessWidget { child: SingleChildScrollView( child: Container( padding: const EdgeInsets.symmetric(vertical: 8), - child: SelectableText.rich(_richTextCode), + child: SelectableText.rich( + _richTextCode, + textDirection: TextDirection.ltr, + ), ), ), ), diff --git a/lib/studies/shrine/expanding_bottom_sheet.dart b/lib/studies/shrine/expanding_bottom_sheet.dart index 3c3fe5388e..ad308637e8 100644 --- a/lib/studies/shrine/expanding_bottom_sheet.dart +++ b/lib/studies/shrine/expanding_bottom_sheet.dart @@ -744,8 +744,6 @@ class ProductThumbnail extends StatelessWidget { Widget build(BuildContext context) { final isDesktop = isDisplayDesktop(context); - print(opacityAnimation); - print(animation); return FadeTransition( opacity: opacityAnimation, child: ScaleTransition( From 5573e4df127274fac656b2c195e0d3ca28d18937 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Date: Wed, 15 Sep 2021 12:12:56 +0200 Subject: [PATCH 4/5] update code segments --- lib/codeviewer/code_segments.dart | 328 ++++++++++++++---------- lib/demos/material/text_field_demo.dart | 1 - pubspec.lock | 2 +- 3 files changed, 198 insertions(+), 133 deletions(-) diff --git a/lib/codeviewer/code_segments.dart b/lib/codeviewer/code_segments.dart index e5300f6b06..98e4adb284 100644 --- a/lib/codeviewer/code_segments.dart +++ b/lib/codeviewer/code_segments.dart @@ -13710,36 +13710,48 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'MouseRegion'), + TextSpan(style: codeStyle.punctuationStyle, text: '('), + TextSpan(style: codeStyle.baseStyle, text: '\u000a cursor'), + TextSpan(style: codeStyle.punctuationStyle, text: ':'), + TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'SystemMouseCursors'), + TextSpan(style: codeStyle.punctuationStyle, text: '.'), + TextSpan(style: codeStyle.baseStyle, text: 'click'), + 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: 'GestureDetector'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), + style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' context'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_BottomPicker'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoDatePicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( style: codeStyle.baseStyle, - text: '\u000a backgroundColor'), + text: '\u000a backgroundColor'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoColors'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'systemBackground'), @@ -13748,7 +13760,7 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.baseStyle, text: 'context'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a mode'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a mode'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoDatePickerMode'), @@ -13757,13 +13769,13 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a initialDateTime'), + text: '\u000a initialDateTime'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' date'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a onDateTimeChanged'), + text: '\u000a onDateTimeChanged'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '('), @@ -13772,7 +13784,7 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a setState'), + style: codeStyle.baseStyle, text: '\u000a setState'), TextSpan(style: codeStyle.punctuationStyle, text: '(()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '=>'), @@ -13780,17 +13792,17 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '='), TextSpan(style: codeStyle.baseStyle, text: ' newDateTime'), 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.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.baseStyle, text: '\u000a child'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_Menu'), @@ -13799,7 +13811,7 @@ class CodeSegments { 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.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'), @@ -13810,10 +13822,10 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ').'), TextSpan(style: codeStyle.baseStyle, text: 'demoCupertinoPickerDate'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'DateFormat'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'yMMMMd'), @@ -13822,7 +13834,7 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.baseStyle, text: 'date'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.keywordStyle, text: 'const'), @@ -13836,10 +13848,12 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'inactiveGray'), 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.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 '), @@ -13856,36 +13870,48 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'MouseRegion'), + TextSpan(style: codeStyle.punctuationStyle, text: '('), + TextSpan(style: codeStyle.baseStyle, text: '\u000a cursor'), + TextSpan(style: codeStyle.punctuationStyle, text: ':'), + TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'SystemMouseCursors'), + TextSpan(style: codeStyle.punctuationStyle, text: '.'), + TextSpan(style: codeStyle.baseStyle, text: 'click'), + 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: 'GestureDetector'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), + style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' context'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_BottomPicker'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoDatePicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( style: codeStyle.baseStyle, - text: '\u000a backgroundColor'), + text: '\u000a backgroundColor'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoColors'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'systemBackground'), @@ -13894,7 +13920,7 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.baseStyle, text: 'context'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a mode'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a mode'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoDatePickerMode'), @@ -13903,13 +13929,13 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a initialDateTime'), + text: '\u000a initialDateTime'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' time'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a onDateTimeChanged'), + text: '\u000a onDateTimeChanged'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '('), @@ -13918,7 +13944,7 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a setState'), + style: codeStyle.baseStyle, text: '\u000a setState'), TextSpan(style: codeStyle.punctuationStyle, text: '(()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '=>'), @@ -13926,26 +13952,26 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '='), TextSpan(style: codeStyle.baseStyle, text: ' newDateTime'), 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.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.baseStyle, text: '\u000a child'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_Menu'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a children'), + 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.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'), @@ -13956,10 +13982,10 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ').'), TextSpan(style: codeStyle.baseStyle, text: 'demoCupertinoPickerTime'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'DateFormat'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'jm'), @@ -13968,7 +13994,7 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.baseStyle, text: 'time'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.keywordStyle, text: 'const'), @@ -13982,10 +14008,12 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'inactiveGray'), 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.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 '), @@ -14004,36 +14032,48 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'MouseRegion'), + TextSpan(style: codeStyle.punctuationStyle, text: '('), + TextSpan(style: codeStyle.baseStyle, text: '\u000a cursor'), + TextSpan(style: codeStyle.punctuationStyle, text: ':'), + TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'SystemMouseCursors'), + TextSpan(style: codeStyle.punctuationStyle, text: '.'), + TextSpan(style: codeStyle.baseStyle, text: 'click'), + 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: 'GestureDetector'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), + style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' context'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_BottomPicker'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoDatePicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( style: codeStyle.baseStyle, - text: '\u000a backgroundColor'), + text: '\u000a backgroundColor'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoColors'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'systemBackground'), @@ -14042,7 +14082,7 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.baseStyle, text: 'context'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a mode'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a mode'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoDatePickerMode'), @@ -14051,13 +14091,13 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a initialDateTime'), + text: '\u000a initialDateTime'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' dateTime'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a onDateTimeChanged'), + text: '\u000a onDateTimeChanged'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '('), @@ -14066,7 +14106,7 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a setState'), + style: codeStyle.baseStyle, text: '\u000a setState'), TextSpan(style: codeStyle.punctuationStyle, text: '(()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '=>'), @@ -14074,26 +14114,26 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '='), TextSpan(style: codeStyle.baseStyle, text: ' newDateTime'), 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.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.baseStyle, text: '\u000a child'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_Menu'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a children'), + 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.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'), @@ -14104,15 +14144,15 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ').'), TextSpan(style: codeStyle.baseStyle, text: 'demoCupertinoPickerDateTime'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'Flexible'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'DateFormat'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'yMMMd'), @@ -14123,7 +14163,7 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.baseStyle, text: 'dateTime'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.keywordStyle, text: 'const'), @@ -14137,12 +14177,14 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'inactiveGray'), 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 '), TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.baseStyle, text: '\u000a '), @@ -14161,36 +14203,48 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.keywordStyle, text: 'return'), TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'MouseRegion'), + TextSpan(style: codeStyle.punctuationStyle, text: '('), + TextSpan(style: codeStyle.baseStyle, text: '\u000a cursor'), + TextSpan(style: codeStyle.punctuationStyle, text: ':'), + TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'SystemMouseCursors'), + TextSpan(style: codeStyle.punctuationStyle, text: '.'), + TextSpan(style: codeStyle.baseStyle, text: 'click'), + 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: 'GestureDetector'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), + style: codeStyle.baseStyle, text: '\u000a _showDemoPicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a context'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' context'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_BottomPicker'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoTimerPicker'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( style: codeStyle.baseStyle, - text: '\u000a backgroundColor'), + text: '\u000a backgroundColor'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'CupertinoColors'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'systemBackground'), @@ -14201,13 +14255,13 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan( style: codeStyle.baseStyle, - text: '\u000a initialTimerDuration'), + text: '\u000a initialTimerDuration'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' timer'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a onTimerDurationChanged'), + text: '\u000a onTimerDurationChanged'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '('), @@ -14216,7 +14270,7 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '{'), TextSpan( - style: codeStyle.baseStyle, text: '\u000a setState'), + style: codeStyle.baseStyle, text: '\u000a setState'), TextSpan(style: codeStyle.punctuationStyle, text: '(()'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '=>'), @@ -14224,26 +14278,26 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '='), TextSpan(style: codeStyle.baseStyle, text: ' newTimer'), 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.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.baseStyle, text: '\u000a child'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_Menu'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a children'), + 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.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'), @@ -14254,21 +14308,21 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ').'), TextSpan(style: codeStyle.baseStyle, text: 'demoCupertinoPickerTimer'), TextSpan(style: codeStyle.punctuationStyle, text: '),'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.classStyle, text: 'Text'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan( style: codeStyle.stringStyle, text: '\u0027\u0024{timer.inHours}:\u0027'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan( style: codeStyle.stringStyle, text: '\u0027\u0024{(timer.inMinutes % 60).toString().padLeft(2, \u0027'), TextSpan(style: codeStyle.numberStyle, text: '0'), TextSpan(style: codeStyle.stringStyle, text: '\u0027)}:\u0027'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan( style: codeStyle.stringStyle, text: @@ -14276,7 +14330,7 @@ class CodeSegments { TextSpan(style: codeStyle.numberStyle, text: '0'), TextSpan(style: codeStyle.stringStyle, text: '\u0027)}\u0027'), TextSpan(style: codeStyle.punctuationStyle, text: ','), - TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a style'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.keywordStyle, text: 'const'), @@ -14290,10 +14344,12 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'inactiveGray'), 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.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 '), @@ -41495,15 +41551,6 @@ class CodeSegments { 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/gestures.dart\u0027'), - TextSpan(style: codeStyle.baseStyle, text: ' show '), - TextSpan(style: codeStyle.classStyle, text: 'DragStartBehavior'), - TextSpan(style: codeStyle.punctuationStyle, text: ';'), - TextSpan(style: codeStyle.baseStyle, text: '\u000a'), - TextSpan(style: codeStyle.keywordStyle, text: 'import'), - TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan( style: codeStyle.stringStyle, text: '\u0027package:flutter/material.dart\u0027'), @@ -41999,18 +42046,9 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: '\u000a suffixIcon'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), - TextSpan(style: codeStyle.classStyle, text: 'GestureDetector'), + TextSpan(style: codeStyle.classStyle, text: 'IconButton'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan( - style: codeStyle.baseStyle, - text: '\u000a dragStartBehavior'), - TextSpan(style: codeStyle.punctuationStyle, text: ':'), - TextSpan(style: codeStyle.baseStyle, text: ' '), - TextSpan(style: codeStyle.classStyle, text: 'DragStartBehavior'), - TextSpan(style: codeStyle.punctuationStyle, text: '.'), - TextSpan(style: codeStyle.baseStyle, text: 'down'), - TextSpan(style: codeStyle.punctuationStyle, text: ','), - TextSpan(style: codeStyle.baseStyle, text: '\u000a onTap'), + TextSpan(style: codeStyle.baseStyle, text: '\u000a onPressed'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '()'), @@ -42035,7 +42073,14 @@ class CodeSegments { 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 hoverColor'), + TextSpan(style: codeStyle.punctuationStyle, text: ':'), + TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'Colors'), + TextSpan(style: codeStyle.punctuationStyle, text: '.'), + TextSpan(style: codeStyle.baseStyle, text: 'transparent'), + TextSpan(style: codeStyle.punctuationStyle, text: ','), + TextSpan(style: codeStyle.baseStyle, text: '\u000a icon'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'Icon'), @@ -44842,10 +44887,23 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'MouseRegion'), + TextSpan(style: codeStyle.punctuationStyle, text: '('), + TextSpan( + style: codeStyle.baseStyle, text: '\u000a cursor'), + TextSpan(style: codeStyle.punctuationStyle, text: ':'), + TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'SystemMouseCursors'), + TextSpan(style: codeStyle.punctuationStyle, text: '.'), + TextSpan(style: codeStyle.baseStyle, text: 'click'), + 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: 'GestureDetector'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( - style: codeStyle.baseStyle, text: '\u000a behavior'), + style: codeStyle.baseStyle, text: '\u000a behavior'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'HitTestBehavior'), @@ -44853,22 +44911,24 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: 'opaque'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( - style: codeStyle.baseStyle, text: '\u000a onTapUp'), + style: codeStyle.baseStyle, text: '\u000a onTapUp'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' _onTapUp'), 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.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'InteractiveViewer'), TextSpan(style: codeStyle.punctuationStyle, text: '('), - TextSpan(style: codeStyle.baseStyle, text: '\u000a key'), + TextSpan( + style: codeStyle.baseStyle, text: '\u000a key'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' _targetKey'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a scaleEnabled'), + text: '\u000a scaleEnabled'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '!'), @@ -44876,13 +44936,13 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a transformationController'), + text: '\u000a transformationController'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' _transformationController'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a boundaryMargin'), + text: '\u000a boundaryMargin'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'EdgeInsets'), @@ -44891,7 +44951,7 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( style: codeStyle.baseStyle, - text: '\u000a horizontal'), + text: '\u000a horizontal'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' viewportSize'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), @@ -44899,28 +44959,29 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a vertical'), + text: '\u000a vertical'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' viewportSize'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), TextSpan(style: codeStyle.baseStyle, text: 'height'), 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 minScale'), + style: codeStyle.baseStyle, + text: '\u000a minScale'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.numberStyle, text: '0.01'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a onInteractionStart'), + text: '\u000a onInteractionStart'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' _onScaleStart'), TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( - style: codeStyle.baseStyle, text: '\u000a child'), + style: codeStyle.baseStyle, text: '\u000a child'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'SizedBox'), @@ -44928,13 +44989,15 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: 'expand'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( - style: codeStyle.baseStyle, text: '\u000a child'), + style: codeStyle.baseStyle, + text: '\u000a child'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CustomPaint'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( - style: codeStyle.baseStyle, text: '\u000a size'), + style: codeStyle.baseStyle, + text: '\u000a size'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' _board'), TextSpan(style: codeStyle.punctuationStyle, text: '.'), @@ -44942,17 +45005,20 @@ class CodeSegments { TextSpan(style: codeStyle.punctuationStyle, text: ','), TextSpan( style: codeStyle.baseStyle, - text: '\u000a painter'), + text: '\u000a painter'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: '_BoardPainter'), TextSpan(style: codeStyle.punctuationStyle, text: '('), TextSpan( style: codeStyle.baseStyle, - text: '\u000a board'), + text: '\u000a board'), TextSpan(style: codeStyle.punctuationStyle, text: ':'), TextSpan(style: codeStyle.baseStyle, text: ' _board'), 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: '),'), diff --git a/lib/demos/material/text_field_demo.dart b/lib/demos/material/text_field_demo.dart index 3017799eee..49939f351d 100644 --- a/lib/demos/material/text_field_demo.dart +++ b/lib/demos/material/text_field_demo.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/gestures.dart' show DragStartBehavior; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/pubspec.lock b/pubspec.lock index 63376f139c..5c8d4f1395 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -651,7 +651,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "7.2.0" + version: "7.3.0" watcher: dependency: transitive description: From ed21ff9f290979e77b52078d098e0014963a00d0 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Date: Wed, 15 Sep 2021 12:21:25 +0200 Subject: [PATCH 5/5] formatting --- lib/studies/reply/adaptive_nav.dart | 3 ++- lib/studies/starter/home.dart | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/studies/reply/adaptive_nav.dart b/lib/studies/reply/adaptive_nav.dart index a1f22f38d0..c453f8ce0b 100644 --- a/lib/studies/reply/adaptive_nav.dart +++ b/lib/studies/reply/adaptive_nav.dart @@ -647,7 +647,8 @@ class _MobileNavState extends State<_MobileNav> with TickerProviderStateMixin { child: Container( height: MediaQuery.of(context).size.height, width: MediaQuery.of(context).size.width, - color: Theme.of(context).bottomSheetTheme.modalBackgroundColor, + color: + Theme.of(context).bottomSheetTheme.modalBackgroundColor, ), ), ), diff --git a/lib/studies/starter/home.dart b/lib/studies/starter/home.dart index da7b838b15..ca68ce8391 100644 --- a/lib/studies/starter/home.dart +++ b/lib/studies/starter/home.dart @@ -110,7 +110,8 @@ class AdaptiveAppBar extends StatelessWidget implements PreferredSizeWidget { automaticallyImplyLeading: !isDesktop, title: isDesktop ? null - : SelectableText(GalleryLocalizations.of(context).starterAppGenericTitle), + : SelectableText( + GalleryLocalizations.of(context).starterAppGenericTitle), bottom: isDesktop ? PreferredSize( preferredSize: const Size.fromHeight(26),