Skip to content

Commit c310425

Browse files
committed
lint: misc
1 parent 8207aa6 commit c310425

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ analyzer:
22
errors:
33
avoid_catches_without_on_clauses: ignore
44
avoid_print: ignore
5+
avoid_redundant_argument_values: ignore
56
deprecated_member_use: ignore
67
document_ignores: ignore
78
lines_longer_than_80_chars: ignore
9+
unnecessary_null_checks: ignore
810
include: package:very_good_analysis/analysis_options.9.0.0.yaml
911
linter:
1012
rules:

lib/app_configuration/view/app_configuration_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
211211
onPressed: isDirty
212212
? () async {
213213
final confirmed = await _showConfirmationDialog(context);
214-
if (confirmed && appConfig != null) {
214+
if (context.mounted && confirmed && appConfig != null) {
215215
context.read<AppConfigurationBloc>().add(
216216
AppConfigurationUpdated(appConfig),
217217
);

lib/content_management/view/content_management_page.dart

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@ class _ContentManagementPageState extends State<ContentManagementPage>
3333

3434
@override
3535
void dispose() {
36-
_tabController.removeListener(_onTabChanged);
37-
_tabController.dispose();
36+
_tabController
37+
..removeListener(_onTabChanged)
38+
..dispose();
3839
super.dispose();
3940
}
4041

4142
void _onTabChanged() {
4243
if (!_tabController.indexIsChanging) {
4344
final tab = ContentManagementTab.values[_tabController.index];
44-
context.read<ContentManagementBloc>().add(ContentManagementTabChanged(tab));
45+
context.read<ContentManagementBloc>().add(
46+
ContentManagementTabChanged(tab),
47+
);
4548
}
4649
}
4750

@@ -56,8 +59,9 @@ class _ContentManagementPageState extends State<ContentManagementPage>
5659
appBar: AppBar(
5760
title: Text(l10n.contentManagement),
5861
bottom: PreferredSize(
59-
preferredSize:
60-
const Size.fromHeight(kTextTabBarHeight + AppSpacing.lg),
62+
preferredSize: const Size.fromHeight(
63+
kTextTabBarHeight + AppSpacing.lg,
64+
),
6165
child: Column(
6266
crossAxisAlignment: CrossAxisAlignment.start,
6367
children: [
@@ -70,8 +74,8 @@ class _ContentManagementPageState extends State<ContentManagementPage>
7074
child: Text(
7175
l10n.contentManagementPageDescription,
7276
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
73-
color: Theme.of(context).colorScheme.onSurfaceVariant,
74-
),
77+
color: Theme.of(context).colorScheme.onSurfaceVariant,
78+
),
7579
),
7680
),
7781
TabBar(
@@ -98,8 +102,10 @@ class _ContentManagementPageState extends State<ContentManagementPage>
98102
),
99103
floatingActionButton: FloatingActionButton(
100104
onPressed: () {
101-
final currentTab =
102-
context.read<ContentManagementBloc>().state.activeTab;
105+
final currentTab = context
106+
.read<ContentManagementBloc>()
107+
.state
108+
.activeTab;
103109
switch (currentTab) {
104110
case ContentManagementTab.headlines:
105111
context.goNamed(Routes.createHeadlineName);

0 commit comments

Comments
 (0)