From 15e20f16a4f3b006911ab2399c2e36504532e4c6 Mon Sep 17 00:00:00 2001 From: Paul Kepinski <36476595+Jupi007@users.noreply.github.com> Date: Wed, 31 Aug 2022 12:43:00 +0200 Subject: [PATCH] Flutter 3.1 deprecations (#194) --- lib/src/pages/rows/yaru_row.dart | 6 +++--- lib/src/pages/yaru_section.dart | 2 +- lib/src/utilities/yaru_carousel.dart | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/pages/rows/yaru_row.dart b/lib/src/pages/rows/yaru_row.dart index 82de74199..1eaa62c85 100644 --- a/lib/src/pages/rows/yaru_row.dart +++ b/lib/src/pages/rows/yaru_row.dart @@ -75,7 +75,7 @@ class YaruRow extends StatelessWidget { return DefaultTextStyle( style: TextStyle( color: enabled - ? Theme.of(context).textTheme.bodyText1!.color + ? Theme.of(context).textTheme.bodyLarge!.color : Theme.of(context).disabledColor, ), child: SizedBox( @@ -106,8 +106,8 @@ class YaruRow extends StatelessWidget { child: Text( description!, style: enabled - ? Theme.of(context).textTheme.caption - : Theme.of(context).textTheme.caption?.copyWith( + ? Theme.of(context).textTheme.bodySmall + : Theme.of(context).textTheme.bodySmall?.copyWith( color: Theme.of(context).disabledColor, ), ), diff --git a/lib/src/pages/yaru_section.dart b/lib/src/pages/yaru_section.dart index fd6176766..a25e25a69 100644 --- a/lib/src/pages/yaru_section.dart +++ b/lib/src/pages/yaru_section.dart @@ -61,7 +61,7 @@ class YaruSection extends StatelessWidget { if (headline != null) Text( headline!, - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, textAlign: TextAlign.left, ), headerWidget ?? const SizedBox() diff --git a/lib/src/utilities/yaru_carousel.dart b/lib/src/utilities/yaru_carousel.dart index 86c021352..43144f335 100644 --- a/lib/src/utilities/yaru_carousel.dart +++ b/lib/src/utilities/yaru_carousel.dart @@ -247,7 +247,7 @@ class _YaruCarouselState extends State { Widget _buildTextIndicator() { return Text( '${_index + 1}/${widget.children.length}', - style: Theme.of(context).textTheme.caption, + style: Theme.of(context).textTheme.bodySmall, textAlign: TextAlign.center, ); }