Merge pull request #1261 from CodeThomnics/refactor/reduce_context_calls_theme

Refactor: Reduce .of(context) calls theme
This commit is contained in:
Krille-chan 2024-08-09 16:13:00 +02:00 committed by GitHub
commit 9731fb461a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
69 changed files with 525 additions and 501 deletions

View file

@ -11,6 +11,7 @@ abstract class UpdateNotifier {
static const String versionStoreKey = 'last_known_version';
static void showUpdateSnackBar(BuildContext context) async {
final theme = Theme.of(context);
final scaffoldMessenger = ScaffoldMessenger.of(context);
final currentVersion = await PlatformInfos.getVersion();
final store = await SharedPreferences.getInstance();
@ -28,7 +29,7 @@ abstract class UpdateNotifier {
icon: Icon(
Icons.close_outlined,
size: 20,
color: Theme.of(context).colorScheme.onPrimary,
color: theme.colorScheme.onPrimary,
),
onPressed: () => controller?.close(),
),