Skip to content

Commit ddc3969

Browse files
committed
lint: fix
1 parent 5a4c677 commit ddc3969

File tree

6 files changed

+31
-36
lines changed

6 files changed

+31
-36
lines changed

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
analyzer:
22
errors:
33
avoid_print: ignore
4+
document_ignores: ignore
5+
lines_longer_than_80_chars: ignore
46
include: package:very_good_analysis/analysis_options.9.0.0.yaml
57
linter:
68
rules:

lib/app/bloc/app_bloc.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import 'dart:async';
33
import 'package:bloc/bloc.dart';
44
import 'package:equatable/equatable.dart';
55
import 'package:ht_auth_repository/ht_auth_repository.dart';
6-
import 'package:ht_data_repository/ht_data_repository.dart';
76
import 'package:ht_dashboard/app/config/config.dart' as local_config;
7+
import 'package:ht_data_repository/ht_data_repository.dart';
88
import 'package:ht_shared/ht_shared.dart';
99

1010
part 'app_event.dart';
@@ -21,11 +21,7 @@ class AppBloc extends Bloc<AppEvent, AppState> {
2121
_appConfigRepository = appConfigRepository,
2222
_environment = environment,
2323
super(
24-
const AppState(
25-
user: null,
26-
status: AppStatus.initial,
27-
environment: null,
28-
),
24+
const AppState(),
2925
) {
3026
on<AppUserChanged>(_onAppUserChanged);
3127
on<AppLogoutRequested>(_onLogoutRequested);

lib/app/view/app.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import 'package:flutter/material.dart';
55
import 'package:flutter_bloc/flutter_bloc.dart';
66
import 'package:go_router/go_router.dart';
77
import 'package:ht_auth_repository/ht_auth_repository.dart';
8-
import 'package:ht_data_repository/ht_data_repository.dart';
9-
import 'package:ht_kv_storage_service/ht_kv_storage_service.dart';
108
import 'package:ht_dashboard/app/bloc/app_bloc.dart';
119
import 'package:ht_dashboard/app/config/app_environment.dart';
1210
import 'package:ht_dashboard/authentication/bloc/authentication_bloc.dart';
1311
import 'package:ht_dashboard/l10n/app_localizations.dart';
14-
import 'package:ht_dashboard/l10n/l10n.dart';
1512
import 'package:ht_dashboard/router/router.dart';
13+
import 'package:ht_data_repository/ht_data_repository.dart';
14+
import 'package:ht_kv_storage_service/ht_kv_storage_service.dart';
1615
import 'package:ht_shared/ht_shared.dart';
1716

1817
class App extends StatelessWidget {

lib/app/view/app_shell.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
22
import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart';
33
import 'package:go_router/go_router.dart';
44
import 'package:ht_dashboard/l10n/l10n.dart';
5-
import 'package:ht_dashboard/router/routes.dart';
65

76
/// A responsive scaffold shell for the main application sections.
87
///

lib/app_configuration/view/app_configuration_page.dart

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
160160
: null,
161161
child: const Text('Discard Changes'),
162162
),
163-
SizedBox(width: AppSpacing.md),
163+
const SizedBox(width: AppSpacing.md),
164164
ElevatedButton(
165165
onPressed: isDirty
166166
? () async {
@@ -229,14 +229,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
229229
'User Preference Limits',
230230
style: Theme.of(context).textTheme.headlineSmall,
231231
),
232-
SizedBox(height: AppSpacing.md),
232+
const SizedBox(height: AppSpacing.md),
233233
Text(
234234
'These settings define the maximum number of items a user can follow or save, tiered by user role. Changes here directly impact user capabilities.',
235235
style: Theme.of(context).textTheme.bodySmall?.copyWith(
236236
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7),
237237
),
238238
),
239-
SizedBox(height: AppSpacing.lg),
239+
const SizedBox(height: AppSpacing.lg),
240240
_buildIntField(
241241
context,
242242
label: 'Guest Followed Items Limit',
@@ -358,14 +358,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
358358
'Ad Configuration',
359359
style: Theme.of(context).textTheme.headlineSmall,
360360
),
361-
SizedBox(height: AppSpacing.md),
361+
const SizedBox(height: AppSpacing.md),
362362
Text(
363363
'These settings control how ads are injected and displayed in the application, tiered by user role. AdFrequency determines how often an ad can be injected, and AdPlacementInterval sets a minimum number of primary items before the first ad.',
364364
style: Theme.of(context).textTheme.bodySmall?.copyWith(
365365
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7),
366366
),
367367
),
368-
SizedBox(height: AppSpacing.lg),
368+
const SizedBox(height: AppSpacing.lg),
369369
_buildIntField(
370370
context,
371371
label: 'Guest Ad Frequency',
@@ -547,14 +547,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
547547
'Account Action Configuration',
548548
style: Theme.of(context).textTheme.headlineSmall,
549549
),
550-
SizedBox(height: AppSpacing.md),
550+
const SizedBox(height: AppSpacing.md),
551551
Text(
552552
'These settings control the display frequency of in-feed account actions (e.g., link account, upgrade prompts), tiered by user role.',
553553
style: Theme.of(context).textTheme.bodySmall?.copyWith(
554554
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7),
555555
),
556556
),
557-
SizedBox(height: AppSpacing.lg),
557+
const SizedBox(height: AppSpacing.lg),
558558
_buildIntField(
559559
context,
560560
label: 'Guest Days Between Account Actions',
@@ -606,20 +606,20 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
606606
'Kill Switch & App Status',
607607
style: Theme.of(context).textTheme.headlineSmall,
608608
),
609-
SizedBox(height: AppSpacing.md),
609+
const SizedBox(height: AppSpacing.md),
610610
Text(
611611
'WARNING: These settings can disable the entire mobile application. Use with extreme caution.',
612612
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
613613
color: Theme.of(context).colorScheme.error,
614614
fontWeight: FontWeight.bold,
615615
),
616616
),
617-
SizedBox(height: AppSpacing.lg),
617+
const SizedBox(height: AppSpacing.lg),
618618
_buildSwitchField(
619619
context,
620620
label: 'Kill Switch Enabled',
621621
description:
622-
'If enabled, the app\'s operational status will be enforced.',
622+
"If enabled, the app's operational status will be enforced.",
623623
value: appConfig.killSwitchEnabled,
624624
onChanged: (value) {
625625
context.read<AppConfigurationBloc>().add(
@@ -690,14 +690,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
690690
'Force Update Configuration',
691691
style: Theme.of(context).textTheme.headlineSmall,
692692
),
693-
SizedBox(height: AppSpacing.md),
693+
const SizedBox(height: AppSpacing.md),
694694
Text(
695695
'These settings control app version enforcement. Users on versions below the minimum allowed will be forced to update.',
696696
style: Theme.of(context).textTheme.bodySmall?.copyWith(
697697
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7),
698698
),
699699
),
700-
SizedBox(height: AppSpacing.lg),
700+
const SizedBox(height: AppSpacing.lg),
701701
_buildTextField(
702702
context,
703703
label: 'Minimum Allowed App Version',
@@ -798,14 +798,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
798798
label,
799799
style: Theme.of(context).textTheme.titleMedium,
800800
),
801-
SizedBox(height: AppSpacing.xs),
801+
const SizedBox(height: AppSpacing.xs),
802802
Text(
803803
description,
804804
style: Theme.of(context).textTheme.bodySmall?.copyWith(
805805
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7),
806806
),
807807
),
808-
SizedBox(height: AppSpacing.xs),
808+
const SizedBox(height: AppSpacing.xs),
809809
TextFormField(
810810
initialValue: value.toString(),
811811
keyboardType: TextInputType.number,
@@ -841,14 +841,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
841841
label,
842842
style: Theme.of(context).textTheme.titleMedium,
843843
),
844-
SizedBox(height: AppSpacing.xs),
844+
const SizedBox(height: AppSpacing.xs),
845845
Text(
846846
description,
847847
style: Theme.of(context).textTheme.bodySmall?.copyWith(
848848
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7),
849849
),
850850
),
851-
SizedBox(height: AppSpacing.xs),
851+
const SizedBox(height: AppSpacing.xs),
852852
TextFormField(
853853
initialValue: value,
854854
decoration: const InputDecoration(
@@ -878,7 +878,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
878878
label,
879879
style: Theme.of(context).textTheme.titleMedium,
880880
),
881-
SizedBox(height: AppSpacing.xs),
881+
const SizedBox(height: AppSpacing.xs),
882882
Text(
883883
description,
884884
style: Theme.of(context).textTheme.bodySmall?.copyWith(
@@ -914,14 +914,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
914914
label,
915915
style: Theme.of(context).textTheme.titleMedium,
916916
),
917-
SizedBox(height: AppSpacing.xs),
917+
const SizedBox(height: AppSpacing.xs),
918918
Text(
919919
description,
920920
style: Theme.of(context).textTheme.bodySmall?.copyWith(
921921
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7),
922922
),
923923
),
924-
SizedBox(height: AppSpacing.xs),
924+
const SizedBox(height: AppSpacing.xs),
925925
DropdownButtonFormField<T>(
926926
value: value,
927927
decoration: const InputDecoration(

lib/router/router.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ import 'package:ht_auth_repository/ht_auth_repository.dart';
55
import 'package:ht_dashboard/app/bloc/app_bloc.dart';
66
import 'package:ht_dashboard/app/config/config.dart' as local_config;
77
import 'package:ht_dashboard/app/view/app_shell.dart';
8+
import 'package:ht_dashboard/app_configuration/view/app_configuration_page.dart';
89
import 'package:ht_dashboard/authentication/bloc/authentication_bloc.dart';
910
import 'package:ht_dashboard/authentication/view/authentication_page.dart';
1011
import 'package:ht_dashboard/authentication/view/email_code_verification_page.dart';
1112
import 'package:ht_dashboard/authentication/view/request_code_page.dart';
12-
import 'package:ht_dashboard/l10n/l10n.dart';
13-
import 'package:ht_dashboard/router/routes.dart';
14-
import 'package:ht_dashboard/app_configuration/view/app_configuration_page.dart';
1513
import 'package:ht_dashboard/content_management/view/categories_page.dart';
1614
import 'package:ht_dashboard/content_management/view/content_management_page.dart';
1715
import 'package:ht_dashboard/content_management/view/headlines_page.dart';
1816
import 'package:ht_dashboard/content_management/view/sources_page.dart';
1917
import 'package:ht_dashboard/dashboard/view/dashboard_page.dart';
18+
import 'package:ht_dashboard/l10n/l10n.dart';
19+
import 'package:ht_dashboard/router/routes.dart';
2020
import 'package:ht_dashboard/settings/view/settings_page.dart';
21-
import 'package:ht_shared/ht_shared.dart';
2221

2322
/// Creates and configures the GoRouter instance for the application.
2423
///
@@ -98,10 +97,10 @@ GoRouter createRouter({
9897
name: Routes.authenticationName,
9998
builder: (BuildContext context, GoRouterState state) {
10099
final l10n = context.l10n;
101-
const String headline = 'Sign In to Dashboard';
102-
const String subHeadline =
100+
const headline = 'Sign In to Dashboard';
101+
const subHeadline =
103102
'Enter your email to get a verification code.';
104-
const bool showAnonymousButton = false;
103+
const showAnonymousButton = false;
105104

106105
return BlocProvider(
107106
create: (context) => AuthenticationBloc(

0 commit comments

Comments
 (0)