From cec7351f8253570f5e0b5f7806c2d04b84ea6714 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 15:08:00 -0400 Subject: [PATCH] Replace deprecated theme properties --- lib/components/SpecialButton.dart | 2 +- lib/components/config/ConfigHeader.dart | 2 +- lib/components/config/ConfigPageItem.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/components/SpecialButton.dart b/lib/components/SpecialButton.dart index 7915418..fd97aff 100644 --- a/lib/components/SpecialButton.dart +++ b/lib/components/SpecialButton.dart @@ -28,7 +28,7 @@ class _SpecialButtonState extends State with SingleTickerProvider Widget _buildAndroid() { var textStyle; if (widget.useButtonTheme) { - textStyle = Theme.of(context).textTheme.button; + textStyle = Theme.of(context).textTheme.labelLarge; } return Material( diff --git a/lib/components/config/ConfigHeader.dart b/lib/components/config/ConfigHeader.dart index 5e5389e..bcb9c09 100644 --- a/lib/components/config/ConfigHeader.dart +++ b/lib/components/config/ConfigHeader.dart @@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; TextStyle basicTextStyle(BuildContext context) => - Platform.isIOS ? CupertinoTheme.of(context).textTheme.textStyle : Theme.of(context).textTheme.subtitle1!; + Platform.isIOS ? CupertinoTheme.of(context).textTheme.textStyle : Theme.of(context).textTheme.titleMedium!; const double _headerFontSize = 13.0; diff --git a/lib/components/config/ConfigPageItem.dart b/lib/components/config/ConfigPageItem.dart index 067a1d3..e7c0149 100644 --- a/lib/components/config/ConfigPageItem.dart +++ b/lib/components/config/ConfigPageItem.dart @@ -31,7 +31,7 @@ class ConfigPageItem extends StatelessWidget { final origTheme = Theme.of(context); theme = origTheme.copyWith( textTheme: origTheme.textTheme - .copyWith(button: origTheme.textTheme.button!.copyWith(fontWeight: FontWeight.normal))); + .copyWith(labelLarge: origTheme.textTheme.labelLarge!.copyWith(fontWeight: FontWeight.normal))); return Theme(data: theme, child: _buildContent(context)); } else { final origTheme = CupertinoTheme.of(context);