Refactor: Reduce .of(context) calls theme
Signed commit
This commit is contained in:
parent
a928ecec1e
commit
5d2aaef3ca
69 changed files with 525 additions and 501 deletions
|
|
@ -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(),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue