Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of deprecated members (beta channel) #551

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/lib/code_snippet_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class _CodeDialog extends StatelessWidget {
children: [
YaruAnimatedNoNetworkIcon(
size: 200,
color: Theme.of(context).errorColor,
color: Theme.of(context).colorScheme.error,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'errorColor' is deprecated and shouldn't be used. Use colorScheme.error instead. This feature was deprecated after v3.3.0-0.5.pre.

),
Padding(
padding: const EdgeInsets.symmetric(
Expand Down
8 changes: 1 addition & 7 deletions lib/src/pages/yaru_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,7 @@ class YaruTile extends StatelessWidget {
}

TextStyle _titleTextStyle(BuildContext context) {
final theme = Theme.of(context);
switch (style) {
case YaruTileStyle.normal:
return theme.textTheme.bodyText1!;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'bodyText1' is deprecated and shouldn't be used. Use bodyLarge instead. This feature was deprecated after v3.1.0-0.0.pre.

case YaruTileStyle.banner:
return theme.textTheme.bodyLarge!;
}
return Theme.of(context).textTheme.bodyLarge!;
}

TextStyle _subtitleTextStyle(BuildContext context) {
Expand Down