From aa3dee585bad7916f0a48dc13211479f2573ed45 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 26 Oct 2022 20:26:09 +0400 Subject: [PATCH] chore(dart): Fix warnings that appeared at Dart 2.18 SDK --- lib/config/bloc_config.dart | 2 +- lib/config/bloc_observer.dart | 12 ----- lib/config/localization.dart | 2 +- .../graphql_maps/server_api/server.dart | 6 +-- .../graphql_maps/server_api/users_api.dart | 6 +-- .../graphql_maps/server_api/volume_api.dart | 6 +-- .../dns_providers/dns_provider_factory.dart | 6 +-- lib/logic/api_maps/rest_maps/server.dart | 1 - .../server_providers/hetzner/hetzner.dart | 2 +- .../cubit/forms/user/user_form_cubit.dart | 2 +- .../server_installation_state.dart | 52 +++++++++---------- lib/logic/models/disk_size.dart | 2 +- lib/logic/models/json/server_job.dart | 10 ++-- lib/logic/models/server_basic_info.dart | 12 ++--- lib/logic/models/service.dart | 43 ++++++++------- lib/main.dart | 2 +- .../action_button/action_button.dart | 2 +- .../components/brand_alert/brand_alert.dart | 4 +- .../brand_bottom_sheet.dart | 2 +- .../components/brand_button/brand_button.dart | 2 +- .../brand_button/filled_button.dart | 10 ++-- .../brand_button/outlined_button.dart | 2 +- .../brand_button/segmented_buttons.dart | 2 +- .../components/brand_cards/filled_card.dart | 2 +- .../components/brand_cards/outlined_card.dart | 2 +- .../components/brand_header/brand_header.dart | 2 +- .../brand_hero_screen/brand_hero_screen.dart | 4 +- .../brand_linear_indicator.dart | 2 +- .../components/brand_loader/brand_loader.dart | 2 +- lib/ui/components/brand_md/brand_md.dart | 2 +- .../components/brand_radio/brand_radio.dart | 2 +- .../components/brand_switch/brand_switch.dart | 2 +- .../brand_tab_bar/brand_tab_bar.dart | 2 +- lib/ui/components/brand_text/brand_text.dart | 2 +- .../components/brand_timer/brand_timer.dart | 2 +- lib/ui/components/error/error.dart | 2 +- .../icon_status_mask/icon_status_mask.dart | 2 +- lib/ui/components/info_box/info_box.dart | 2 +- .../components/jobs_content/jobs_content.dart | 5 +- .../jobs_content/server_job_card.dart | 4 +- .../list_tile_on_surface_variant.dart | 2 +- .../not_ready_card/not_ready_card.dart | 2 +- .../pre_styled_buttons/flash_fab.dart | 2 +- .../components/progress_bar/progress_bar.dart | 2 +- .../server_storage_list_item.dart | 8 +-- .../service_migration_list_item.dart | 4 +- ...service_storage_consumption_list_item.dart | 2 +- .../components/switch_block/switch_bloc.dart | 2 +- lib/ui/helpers/widget_size.dart | 5 +- .../pages/backup_details/backup_details.dart | 2 +- lib/ui/pages/devices/devices.dart | 2 +- lib/ui/pages/devices/new_device.dart | 2 +- lib/ui/pages/dns_details/dns_details.dart | 2 +- lib/ui/pages/more/about_application.dart | 2 +- lib/ui/pages/more/about_us.dart | 2 +- .../pages/more/app_settings/app_setting.dart | 6 +-- lib/ui/pages/more/console.dart | 2 +- lib/ui/pages/more/more.dart | 2 +- lib/ui/pages/onboarding/onboarding.dart | 2 +- lib/ui/pages/providers/providers.dart | 12 ++--- lib/ui/pages/recovery_key/recovery_key.dart | 10 ++-- .../recovery_key/recovery_key_receiving.dart | 2 +- lib/ui/pages/root_route.dart | 2 +- lib/ui/pages/server_details/charts/chart.dart | 2 +- .../server_details/charts/cpu_chart.dart | 2 +- .../server_details/charts/network_charts.dart | 2 +- .../server_details/server_details_screen.dart | 2 +- .../server_details/time_zone/time_zone.dart | 6 ++- .../migration_process_page.dart | 4 +- .../binds_migration/services_migration.dart | 2 +- .../server_storage/extending_volume.dart | 2 +- .../pages/server_storage/server_storage.dart | 9 ++-- lib/ui/pages/server_storage/storage_card.dart | 4 +- lib/ui/pages/services/service_page.dart | 5 +- lib/ui/pages/services/services.dart | 3 +- lib/ui/pages/setup/initializing.dart | 4 +- .../recovering/recover_by_new_device_key.dart | 4 +- .../recovering/recover_by_old_token.dart | 4 +- .../recovering/recover_by_recovery_key.dart | 2 +- .../recovery_confirm_backblaze.dart | 2 +- .../recovery_confirm_cloudflare.dart | 2 +- .../recovering/recovery_confirm_server.dart | 4 +- .../recovery_hentzner_connected.dart | 2 +- .../recovering/recovery_method_select.dart | 4 +- .../setup/recovering/recovery_routing.dart | 4 +- lib/ui/pages/users/add_user_fab.dart | 2 +- lib/ui/pages/users/new_user.dart | 2 +- lib/ui/pages/users/reset_password.dart | 2 +- lib/ui/pages/users/user_details.dart | 4 +- lib/ui/pages/users/users.dart | 2 +- 90 files changed, 191 insertions(+), 206 deletions(-) diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index b88b21d7..6c870f9e 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -16,7 +16,7 @@ import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/cubit/provider_volumes/provider_volume_cubit.dart'; class BlocAndProviderConfig extends StatelessWidget { - const BlocAndProviderConfig({final super.key, this.child}); + const BlocAndProviderConfig({super.key, this.child}); final Widget? child; diff --git a/lib/config/bloc_observer.dart b/lib/config/bloc_observer.dart index 9e2e8f43..3cb9e1c0 100644 --- a/lib/config/bloc_observer.dart +++ b/lib/config/bloc_observer.dart @@ -4,16 +4,4 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class SimpleBlocObserver extends BlocObserver { SimpleBlocObserver(); - - @override - void onError( - final BlocBase bloc, - final Object error, - final StackTrace stackTrace, - ) { - // getIt().showSnackBar( - // 'Bloc error: ${error.toString()}', - // ); - super.onError(bloc, error, stackTrace); - } } diff --git a/lib/config/localization.dart b/lib/config/localization.dart index 5e5ffc38..297928ed 100644 --- a/lib/config/localization.dart +++ b/lib/config/localization.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class Localization extends StatelessWidget { const Localization({ - final super.key, + super.key, this.child, }); diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 0e20fb02..5fdf495a 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -35,9 +35,9 @@ class GenericMutationResult { class GenericJobMutationReturn extends GenericMutationResult { GenericJobMutationReturn({ - required final super.success, - required final super.code, - final super.message, + required super.success, + required super.code, + super.message, this.job, }); final ServerJob? job; diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index be7d4fb0..07da1083 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -2,9 +2,9 @@ part of 'server.dart'; class UserMutationResult extends GenericMutationResult { UserMutationResult({ - required final super.success, - required final super.code, - final super.message, + required super.success, + required super.code, + super.message, this.user, }); diff --git a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart index 4865a565..160a78ca 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/volume_api.dart @@ -2,9 +2,9 @@ part of 'server.dart'; class MigrateToBindsMutationReturn extends GenericMutationResult { MigrateToBindsMutationReturn({ - required final super.success, - required final super.code, - final super.message, + required super.success, + required super.code, + super.message, this.jobUid, }); final String? jobUid; diff --git a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart index 01f59e98..a425ab93 100644 --- a/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart +++ b/lib/logic/api_maps/rest_maps/dns_providers/dns_provider_factory.dart @@ -3,9 +3,9 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/provider_api_settings.dart' class DnsProviderApiSettings extends ProviderApiSettings { const DnsProviderApiSettings({ - final super.hasLogger = false, - final super.isWithToken = true, - final this.customToken, + super.hasLogger = false, + super.isWithToken = true, + this.customToken, }); final String? customToken; } diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 1cef3dfc..67c88e05 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/models/hive/backblaze_bucket.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index 8340676d..37ecc0f0 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -13,7 +13,7 @@ import 'package:selfprivacy/logic/models/server_basic_info.dart'; import 'package:selfprivacy/utils/password_generator.dart'; class HetznerApi extends ServerProviderApi with VolumeProviderApi { - HetznerApi({final this.hasLogger = false, final this.isWithToken = true}); + HetznerApi({this.hasLogger = false, this.isWithToken = true}); @override bool hasLogger; @override diff --git a/lib/logic/cubit/forms/user/user_form_cubit.dart b/lib/logic/cubit/forms/user/user_form_cubit.dart index c60fef9e..c3712382 100644 --- a/lib/logic/cubit/forms/user/user_form_cubit.dart +++ b/lib/logic/cubit/forms/user/user_form_cubit.dart @@ -11,7 +11,7 @@ class UserFormCubit extends FormCubit { UserFormCubit({ required this.jobsCubit, required final FieldCubitFactory fieldFactory, - final this.initialUser, + this.initialUser, }) { if (initialUser == null) { login = fieldFactory.createUserLoginField(); diff --git a/lib/logic/cubit/server_installation/server_installation_state.dart b/lib/logic/cubit/server_installation/server_installation_state.dart index bb04c07d..11c66ffe 100644 --- a/lib/logic/cubit/server_installation/server_installation_state.dart +++ b/lib/logic/cubit/server_installation/server_installation_state.dart @@ -76,7 +76,7 @@ abstract class ServerInstallationState extends Equatable { class TimerState extends ServerInstallationNotFinished { TimerState({ required this.dataState, - required final super.isLoading, + required super.isLoading, this.timerStart, this.duration, }) : super( @@ -119,17 +119,17 @@ enum ServerSetupProgress { class ServerInstallationNotFinished extends ServerInstallationState { const ServerInstallationNotFinished({ - required final super.isServerStarted, - required final super.isServerResetedFirstTime, - required final super.isServerResetedSecondTime, - required final this.isLoading, + required super.isServerStarted, + required super.isServerResetedFirstTime, + required super.isServerResetedSecondTime, + required this.isLoading, required this.dnsMatches, - final super.providerApiToken, - final super.cloudFlareKey, - final super.backblazeCredential, - final super.serverDomain, - final super.rootUser, - final super.serverDetails, + super.providerApiToken, + super.cloudFlareKey, + super.backblazeCredential, + super.serverDomain, + super.rootUser, + super.serverDetails, }); final bool isLoading; final Map? dnsMatches; @@ -209,15 +209,15 @@ class ServerInstallationEmpty extends ServerInstallationNotFinished { class ServerInstallationFinished extends ServerInstallationState { const ServerInstallationFinished({ - required final String super.providerApiToken, - required final String super.cloudFlareKey, - required final BackblazeCredential super.backblazeCredential, - required final ServerDomain super.serverDomain, - required final User super.rootUser, - required final ServerHostingDetails super.serverDetails, - required final super.isServerStarted, - required final super.isServerResetedFirstTime, - required final super.isServerResetedSecondTime, + required String super.providerApiToken, + required String super.cloudFlareKey, + required BackblazeCredential super.backblazeCredential, + required ServerDomain super.serverDomain, + required User super.rootUser, + required ServerHostingDetails super.serverDetails, + required super.isServerStarted, + required super.isServerResetedFirstTime, + required super.isServerResetedSecondTime, }); @override @@ -260,12 +260,12 @@ class ServerInstallationRecovery extends ServerInstallationState { const ServerInstallationRecovery({ required this.currentStep, required this.recoveryCapabilities, - final super.providerApiToken, - final super.cloudFlareKey, - final super.backblazeCredential, - final super.serverDomain, - final super.rootUser, - final super.serverDetails, + super.providerApiToken, + super.cloudFlareKey, + super.backblazeCredential, + super.serverDomain, + super.rootUser, + super.serverDetails, }) : super( isServerStarted: true, isServerResetedFirstTime: true, diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart index c6f55873..6d335683 100644 --- a/lib/logic/models/disk_size.dart +++ b/lib/logic/models/disk_size.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; class DiskSize { - const DiskSize({final this.byte = 0}); + const DiskSize({this.byte = 0}); DiskSize.fromKibibyte(final double kibibyte) : this(byte: (kibibyte * 1024).round()); diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart index 67bbfca4..2c448e81 100644 --- a/lib/logic/models/json/server_job.dart +++ b/lib/logic/models/json/server_job.dart @@ -14,11 +14,11 @@ class ServerJob { required this.uid, required this.updatedAt, required this.createdAt, - final this.error, - final this.progress, - final this.result, - final this.statusText, - final this.finishedAt, + this.error, + this.progress, + this.result, + this.statusText, + this.finishedAt, }); ServerJob.fromGraphQL(final Query$GetApiJobs$jobs$getJobs serverJob) diff --git a/lib/logic/models/server_basic_info.dart b/lib/logic/models/server_basic_info.dart index 8670dc8c..c7d44ff8 100644 --- a/lib/logic/models/server_basic_info.dart +++ b/lib/logic/models/server_basic_info.dart @@ -32,12 +32,12 @@ class ServerBasicInfoWithValidators extends ServerBasicInfo { ); ServerBasicInfoWithValidators({ - required final super.id, - required final super.name, - required final super.reverseDns, - required final super.ip, - required final super.created, - required final super.volumeId, + required super.id, + required super.name, + required super.reverseDns, + required super.ip, + required super.created, + required super.volumeId, required this.isIpValid, required this.isReverseDnsValid, }); diff --git a/lib/logic/models/service.dart b/lib/logic/models/service.dart index 04c5c6d3..79bd8f7e 100644 --- a/lib/logic/models/service.dart +++ b/lib/logic/models/service.dart @@ -7,6 +7,27 @@ import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/json/dns_records.dart'; class Service { + Service.fromGraphQL(final Query$AllServices$services$allServices service) + : this( + id: service.id, + displayName: service.displayName, + description: service.description, + isEnabled: service.isEnabled, + isRequired: service.isRequired, + isMovable: service.isMovable, + status: ServiceStatus.fromGraphQL(service.status), + storageUsage: ServiceStorageUsage( + used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), + volume: service.storageUsage.volume?.name, + ), + // Decode the base64 encoded svg icon to text. + svgIcon: utf8.decode(base64.decode(service.svgIcon)), + dnsRecords: service.dnsRecords + ?.map((final record) => DnsRecord.fromGraphQL(record)) + .toList() ?? + [], + url: service.url, + ); Service({ required this.id, required this.displayName, @@ -40,28 +61,6 @@ class Service { return ''; } - Service.fromGraphQL(final Query$AllServices$services$allServices service) - : this( - id: service.id, - displayName: service.displayName, - description: service.description, - isEnabled: service.isEnabled, - isRequired: service.isRequired, - isMovable: service.isMovable, - status: ServiceStatus.fromGraphQL(service.status), - storageUsage: ServiceStorageUsage( - used: DiskSize(byte: int.parse(service.storageUsage.usedSpace)), - volume: service.storageUsage.volume?.name, - ), - // Decode the base64 encoded svg icon to text. - svgIcon: utf8.decode(base64.decode(service.svgIcon)), - dnsRecords: service.dnsRecords - ?.map((final record) => DnsRecord.fromGraphQL(record)) - .toList() ?? - [], - url: service.url, - ); - static Service empty = Service( id: 'empty', displayName: '', diff --git a/lib/main.dart b/lib/main.dart index f2c36392..ee771474 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,7 +60,7 @@ class MyApp extends StatelessWidget { const MyApp({ required this.lightThemeData, required this.darkThemeData, - final super.key, + super.key, }); final ThemeData lightThemeData; diff --git a/lib/ui/components/action_button/action_button.dart b/lib/ui/components/action_button/action_button.dart index 6572794b..4073393f 100644 --- a/lib/ui/components/action_button/action_button.dart +++ b/lib/ui/components/action_button/action_button.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class ActionButton extends StatelessWidget { const ActionButton({ - final super.key, + super.key, this.text, this.onPressed, this.isRed = false, diff --git a/lib/ui/components/brand_alert/brand_alert.dart b/lib/ui/components/brand_alert/brand_alert.dart index 0d673ded..352b091c 100644 --- a/lib/ui/components/brand_alert/brand_alert.dart +++ b/lib/ui/components/brand_alert/brand_alert.dart @@ -2,10 +2,10 @@ import 'package:flutter/material.dart'; class BrandAlert extends AlertDialog { BrandAlert({ - final super.key, + super.key, final String? title, final String? contentText, - final super.actions, + super.actions, }) : super( title: title != null ? Text(title) : null, content: title != null ? Text(contentText!) : null, diff --git a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart index de322b05..0f60ed09 100644 --- a/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart +++ b/lib/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart @@ -4,7 +4,7 @@ import 'package:selfprivacy/config/brand_colors.dart'; class BrandBottomSheet extends StatelessWidget { const BrandBottomSheet({ required this.child, - final super.key, + super.key, this.isExpended = false, }); diff --git a/lib/ui/components/brand_button/brand_button.dart b/lib/ui/components/brand_button/brand_button.dart index 8951b70f..c56fad37 100644 --- a/lib/ui/components/brand_button/brand_button.dart +++ b/lib/ui/components/brand_button/brand_button.dart @@ -56,7 +56,7 @@ class BrandButton { class IconTextButton extends StatelessWidget { const IconTextButton({ - final super.key, + super.key, this.onPressed, this.title, this.icon, diff --git a/lib/ui/components/brand_button/filled_button.dart b/lib/ui/components/brand_button/filled_button.dart index b3888f3c..93f8e467 100644 --- a/lib/ui/components/brand_button/filled_button.dart +++ b/lib/ui/components/brand_button/filled_button.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class FilledButton extends StatelessWidget { const FilledButton({ - final super.key, + super.key, this.onPressed, this.title, this.child, @@ -17,13 +17,13 @@ class FilledButton extends StatelessWidget { @override Widget build(final BuildContext context) { final ButtonStyle enabledStyle = ElevatedButton.styleFrom( - onPrimary: Theme.of(context).colorScheme.onPrimary, - primary: Theme.of(context).colorScheme.primary, + foregroundColor: Theme.of(context).colorScheme.onPrimary, + backgroundColor: Theme.of(context).colorScheme.primary, ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)); final ButtonStyle disabledStyle = ElevatedButton.styleFrom( - onPrimary: Theme.of(context).colorScheme.onSurface.withAlpha(30), - primary: Theme.of(context).colorScheme.onSurface.withAlpha(98), + foregroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(30), + backgroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(98), ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)); return ConstrainedBox( diff --git a/lib/ui/components/brand_button/outlined_button.dart b/lib/ui/components/brand_button/outlined_button.dart index 6284943a..260de23a 100644 --- a/lib/ui/components/brand_button/outlined_button.dart +++ b/lib/ui/components/brand_button/outlined_button.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class BrandOutlinedButton extends StatelessWidget { const BrandOutlinedButton({ - final super.key, + super.key, this.onPressed, this.title, this.child, diff --git a/lib/ui/components/brand_button/segmented_buttons.dart b/lib/ui/components/brand_button/segmented_buttons.dart index e3ce50cd..7632dc20 100644 --- a/lib/ui/components/brand_button/segmented_buttons.dart +++ b/lib/ui/components/brand_button/segmented_buttons.dart @@ -5,7 +5,7 @@ class SegmentedButtons extends StatelessWidget { required this.isSelected, required this.onPressed, required this.titles, - final super.key, + super.key, }); final List isSelected; diff --git a/lib/ui/components/brand_cards/filled_card.dart b/lib/ui/components/brand_cards/filled_card.dart index 02d46604..497f3c77 100644 --- a/lib/ui/components/brand_cards/filled_card.dart +++ b/lib/ui/components/brand_cards/filled_card.dart @@ -7,7 +7,7 @@ class FilledCard extends StatelessWidget { this.tertiary = false, this.error = false, this.clipped = true, - final super.key, + super.key, }); final Widget child; diff --git a/lib/ui/components/brand_cards/outlined_card.dart b/lib/ui/components/brand_cards/outlined_card.dart index dc959dc2..91f13b44 100644 --- a/lib/ui/components/brand_cards/outlined_card.dart +++ b/lib/ui/components/brand_cards/outlined_card.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class OutlinedCard extends StatelessWidget { const OutlinedCard({ required this.child, - final super.key, + super.key, }); final Widget child; diff --git a/lib/ui/components/brand_header/brand_header.dart b/lib/ui/components/brand_header/brand_header.dart index fa643710..abdabc6f 100644 --- a/lib/ui/components/brand_header/brand_header.dart +++ b/lib/ui/components/brand_header/brand_header.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class BrandHeader extends StatelessWidget { const BrandHeader({ - final super.key, + super.key, this.title = '', this.hasBackButton = false, this.onBackButtonPressed, diff --git a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart index 5eb07858..68f5d772 100644 --- a/lib/ui/components/brand_hero_screen/brand_hero_screen.dart +++ b/lib/ui/components/brand_hero_screen/brand_hero_screen.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/ui/helpers/widget_size.dart'; class BrandHeroScreen extends StatelessWidget { const BrandHeroScreen({ required this.children, - final super.key, + super.key, this.hasBackButton = true, this.hasFlashButton = true, this.heroIcon, @@ -82,7 +82,7 @@ class HeroSliverAppBar extends StatefulWidget { required this.hasBackButton, required this.onBackButtonPressed, required this.heroIconWidget, - final super.key, + super.key, }); final String heroTitle; diff --git a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart index 50104aa0..335387f5 100644 --- a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart +++ b/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart @@ -6,7 +6,7 @@ class BrandLinearIndicator extends StatelessWidget { required this.color, required this.backgroundColor, required this.height, - final super.key, + super.key, }); final double value; diff --git a/lib/ui/components/brand_loader/brand_loader.dart b/lib/ui/components/brand_loader/brand_loader.dart index 59f1f177..63c7cccd 100644 --- a/lib/ui/components/brand_loader/brand_loader.dart +++ b/lib/ui/components/brand_loader/brand_loader.dart @@ -6,7 +6,7 @@ class BrandLoader { } class HorizontalLoader extends StatelessWidget { - const HorizontalLoader({final super.key}); + const HorizontalLoader({super.key}); @override Widget build(final BuildContext context) => Column( diff --git a/lib/ui/components/brand_md/brand_md.dart b/lib/ui/components/brand_md/brand_md.dart index 249895a9..457bb5c3 100644 --- a/lib/ui/components/brand_md/brand_md.dart +++ b/lib/ui/components/brand_md/brand_md.dart @@ -9,7 +9,7 @@ import 'package:url_launcher/url_launcher_string.dart'; class BrandMarkdown extends StatefulWidget { const BrandMarkdown({ required this.fileName, - final super.key, + super.key, }); final String fileName; diff --git a/lib/ui/components/brand_radio/brand_radio.dart b/lib/ui/components/brand_radio/brand_radio.dart index 2dc8fc00..494c3e81 100644 --- a/lib/ui/components/brand_radio/brand_radio.dart +++ b/lib/ui/components/brand_radio/brand_radio.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/config/brand_colors.dart'; class BrandRadio extends StatelessWidget { const BrandRadio({ required this.isChecked, - final super.key, + super.key, }); final bool isChecked; diff --git a/lib/ui/components/brand_switch/brand_switch.dart b/lib/ui/components/brand_switch/brand_switch.dart index 89396acc..4ded47dd 100644 --- a/lib/ui/components/brand_switch/brand_switch.dart +++ b/lib/ui/components/brand_switch/brand_switch.dart @@ -4,7 +4,7 @@ class BrandSwitch extends StatelessWidget { const BrandSwitch({ required this.onChanged, required this.value, - final super.key, + super.key, }); final ValueChanged onChanged; diff --git a/lib/ui/components/brand_tab_bar/brand_tab_bar.dart b/lib/ui/components/brand_tab_bar/brand_tab_bar.dart index 194c0ac1..8362bedb 100644 --- a/lib/ui/components/brand_tab_bar/brand_tab_bar.dart +++ b/lib/ui/components/brand_tab_bar/brand_tab_bar.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; class BrandTabBar extends StatefulWidget { - const BrandTabBar({final super.key, this.controller}); + const BrandTabBar({super.key, this.controller}); final TabController? controller; @override diff --git a/lib/ui/components/brand_text/brand_text.dart b/lib/ui/components/brand_text/brand_text.dart index 00e9d736..15307577 100644 --- a/lib/ui/components/brand_text/brand_text.dart +++ b/lib/ui/components/brand_text/brand_text.dart @@ -147,7 +147,7 @@ class BrandText extends StatelessWidget { const BrandText( this.text, { required this.type, - final super.key, + super.key, this.style, this.overflow, this.softWrap, diff --git a/lib/ui/components/brand_timer/brand_timer.dart b/lib/ui/components/brand_timer/brand_timer.dart index 5d76d57d..3ccf9a63 100644 --- a/lib/ui/components/brand_timer/brand_timer.dart +++ b/lib/ui/components/brand_timer/brand_timer.dart @@ -9,7 +9,7 @@ class BrandTimer extends StatefulWidget { const BrandTimer({ required this.startDateTime, required this.duration, - final super.key, + super.key, }); final DateTime startDateTime; diff --git a/lib/ui/components/error/error.dart b/lib/ui/components/error/error.dart index d12af1a3..402ce512 100644 --- a/lib/ui/components/error/error.dart +++ b/lib/ui/components/error/error.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; class BrandError extends StatelessWidget { - const BrandError({final super.key, this.error, this.stackTrace}); + const BrandError({super.key, this.error, this.stackTrace}); final Object? error; final StackTrace? stackTrace; diff --git a/lib/ui/components/icon_status_mask/icon_status_mask.dart b/lib/ui/components/icon_status_mask/icon_status_mask.dart index 8c7a2379..54d02aaf 100644 --- a/lib/ui/components/icon_status_mask/icon_status_mask.dart +++ b/lib/ui/components/icon_status_mask/icon_status_mask.dart @@ -6,7 +6,7 @@ class IconStatusMask extends StatelessWidget { const IconStatusMask({ required this.icon, required this.status, - final super.key, + super.key, }); final Widget icon; diff --git a/lib/ui/components/info_box/info_box.dart b/lib/ui/components/info_box/info_box.dart index 816053e3..c2e67def 100644 --- a/lib/ui/components/info_box/info_box.dart +++ b/lib/ui/components/info_box/info_box.dart @@ -4,7 +4,7 @@ class InfoBox extends StatelessWidget { const InfoBox({ required this.text, this.isWarning = false, - final super.key, + super.key, }); final String text; diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index c49ceccf..25fb3612 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -16,7 +16,7 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; class JobsContent extends StatelessWidget { - const JobsContent({final super.key}); + const JobsContent({super.key}); @override Widget build(final BuildContext context) { @@ -89,7 +89,8 @@ class JobsContent extends StatelessWidget { const SizedBox(width: 10), ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).colorScheme.errorContainer, + backgroundColor: + Theme.of(context).colorScheme.errorContainer, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), ), diff --git a/lib/ui/components/jobs_content/server_job_card.dart b/lib/ui/components/jobs_content/server_job_card.dart index 46e21166..a772e3c6 100644 --- a/lib/ui/components/jobs_content/server_job_card.dart +++ b/lib/ui/components/jobs_content/server_job_card.dart @@ -4,8 +4,8 @@ import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_in class ServerJobCard extends StatelessWidget { const ServerJobCard({ - required final this.serverJob, - final super.key, + required this.serverJob, + super.key, }); final ServerJob serverJob; diff --git a/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart b/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart index c31315bd..3d8d7a84 100644 --- a/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart +++ b/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart @@ -7,7 +7,7 @@ class ListTileOnSurfaceVariant extends StatelessWidget { this.leadingIcon, this.onTap, this.disableSubtitleOverflow = false, - final super.key, + super.key, }); final String title; diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index faa23381..1faf586c 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; class NotReadyCard extends StatelessWidget { - const NotReadyCard({final super.key}); + const NotReadyCard({super.key}); @override Widget build(final BuildContext context) => Container( diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/components/pre_styled_buttons/flash_fab.dart index b97f3bd6..f0087b9f 100644 --- a/lib/ui/components/pre_styled_buttons/flash_fab.dart +++ b/lib/ui/components/pre_styled_buttons/flash_fab.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; class BrandFab extends StatefulWidget { - const BrandFab({final super.key}); + const BrandFab({super.key}); @override State createState() => _BrandFabState(); diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index 9b851ce7..eae4161d 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -8,7 +8,7 @@ class ProgressBar extends StatefulWidget { const ProgressBar({ required this.steps, required this.activeIndex, - final super.key, + super.key, }); final int activeIndex; diff --git a/lib/ui/components/storage_list_items/server_storage_list_item.dart b/lib/ui/components/storage_list_items/server_storage_list_item.dart index 8c675685..52164d78 100644 --- a/lib/ui/components/storage_list_items/server_storage_list_item.dart +++ b/lib/ui/components/storage_list_items/server_storage_list_item.dart @@ -6,9 +6,9 @@ import 'package:selfprivacy/logic/models/disk_status.dart'; class ServerStorageListItem extends StatelessWidget { const ServerStorageListItem({ required this.volume, - final this.showIcon = true, - final this.dense = false, - final super.key, + this.showIcon = true, + this.dense = false, + super.key, }); final DiskVolume volume; @@ -52,7 +52,7 @@ class ConsumptionListItem extends StatelessWidget { this.rightSideText, this.icon, this.dense = false, - final super.key, + super.key, }); final String title; diff --git a/lib/ui/components/storage_list_items/service_migration_list_item.dart b/lib/ui/components/storage_list_items/service_migration_list_item.dart index 847d2cf6..8eee284c 100644 --- a/lib/ui/components/storage_list_items/service_migration_list_item.dart +++ b/lib/ui/components/storage_list_items/service_migration_list_item.dart @@ -9,7 +9,7 @@ class ServiceMigrationListItem extends StatelessWidget { required this.diskStatus, required this.selectedVolume, required this.onChange, - final super.key, + super.key, }); final Service service; @@ -54,7 +54,7 @@ class ServiceMigrationListItem extends StatelessWidget { class ServiceConsumptionTitle extends StatelessWidget { const ServiceConsumptionTitle({ required this.service, - final super.key, + super.key, }); final Service service; diff --git a/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart b/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart index 30216709..ffdb4e34 100644 --- a/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart +++ b/lib/ui/components/storage_list_items/service_storage_consumption_list_item.dart @@ -8,7 +8,7 @@ class ServiceStorageConsumptionListItem extends StatelessWidget { required this.storageConsumptionText, required this.color, required this.icon, - final super.key, + super.key, }); final String title; diff --git a/lib/ui/components/switch_block/switch_bloc.dart b/lib/ui/components/switch_block/switch_bloc.dart index cce3b742..85ac2c68 100644 --- a/lib/ui/components/switch_block/switch_bloc.dart +++ b/lib/ui/components/switch_block/switch_bloc.dart @@ -8,7 +8,7 @@ class SwitcherBlock extends StatelessWidget { required this.child, required this.isActive, required this.onChange, - final super.key, + super.key, }); final Widget child; diff --git a/lib/ui/helpers/widget_size.dart b/lib/ui/helpers/widget_size.dart index 11fa7b4f..2b9eb962 100644 --- a/lib/ui/helpers/widget_size.dart +++ b/lib/ui/helpers/widget_size.dart @@ -5,7 +5,7 @@ class WidgetSize extends StatefulWidget { const WidgetSize({ required this.onChange, required this.child, - final super.key, + super.key, }); final Widget child; final Function onChange; @@ -27,12 +27,11 @@ class _WidgetSizeState extends State { var widgetKey = GlobalKey(); Size? oldSize; - void postFrameCallback(_) { + void postFrameCallback(final _) { final context = widgetKey.currentContext; if (context == null) { return; } - ; final newSize = context.size; if (oldSize == newSize) { diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 8936f59e..e982a3d4 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -16,7 +16,7 @@ import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; GlobalKey navigatorKey = GlobalKey(); class BackupDetails extends StatefulWidget { - const BackupDetails({final super.key}); + const BackupDetails({super.key}); @override State createState() => _BackupDetailsState(); diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index bc608339..31010fd4 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -11,7 +11,7 @@ import 'package:selfprivacy/ui/pages/devices/new_device.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class DevicesScreen extends StatefulWidget { - const DevicesScreen({final super.key}); + const DevicesScreen({super.key}); @override State createState() => _DevicesScreenState(); diff --git a/lib/ui/pages/devices/new_device.dart b/lib/ui/pages/devices/new_device.dart index e8173db0..d85ac145 100644 --- a/lib/ui/pages/devices/new_device.dart +++ b/lib/ui/pages/devices/new_device.dart @@ -7,7 +7,7 @@ import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class NewDeviceScreen extends StatelessWidget { - const NewDeviceScreen({final super.key}); + const NewDeviceScreen({super.key}); @override Widget build(final BuildContext context) => BrandHeroScreen( diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index a1d6c29c..8bf264d6 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; class DnsDetailsPage extends StatefulWidget { - const DnsDetailsPage({final super.key}); + const DnsDetailsPage({super.key}); @override State createState() => _DnsDetailsPageState(); diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index 9b545678..697e7811 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -7,7 +7,7 @@ import 'package:package_info/package_info.dart'; import 'package:easy_localization/easy_localization.dart'; class AboutApplicationPage extends StatelessWidget { - const AboutApplicationPage({final super.key}); + const AboutApplicationPage({super.key}); @override Widget build(final BuildContext context) => SafeArea( diff --git a/lib/ui/pages/more/about_us.dart b/lib/ui/pages/more/about_us.dart index 4061c2bb..1a1279d7 100644 --- a/lib/ui/pages/more/about_us.dart +++ b/lib/ui/pages/more/about_us.dart @@ -5,7 +5,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class AboutUsPage extends StatelessWidget { - const AboutUsPage({final super.key}); + const AboutUsPage({super.key}); @override Widget build(final BuildContext context) => SafeArea( diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart index abbfd0ee..4287e985 100644 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ b/lib/ui/pages/more/app_settings/app_setting.dart @@ -12,7 +12,7 @@ import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:easy_localization/easy_localization.dart'; class AppSettingsPage extends StatefulWidget { - const AppSettingsPage({final super.key}); + const AppSettingsPage({super.key}); @override State createState() => _AppSettingsPageState(); @@ -80,7 +80,7 @@ class _AppSettingsPageState extends State { const SizedBox(width: 5), ElevatedButton( style: ElevatedButton.styleFrom( - primary: BrandColors.red1, + backgroundColor: BrandColors.red1, ), child: Text( 'basis.reset'.tr(), @@ -145,7 +145,7 @@ class _AppSettingsPageState extends State { const SizedBox(width: 5), ElevatedButton( style: ElevatedButton.styleFrom( - primary: BrandColors.red1, + backgroundColor: BrandColors.red1, ), onPressed: isDisabled ? null diff --git a/lib/ui/pages/more/console.dart b/lib/ui/pages/more/console.dart index 81c387f1..6ad31ea5 100644 --- a/lib/ui/pages/more/console.dart +++ b/lib/ui/pages/more/console.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/logic/models/message.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; class Console extends StatefulWidget { - const Console({final super.key}); + const Console({super.key}); @override State createState() => _ConsoleState(); diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 5d487717..2e75ad26 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -23,7 +23,7 @@ import 'package:selfprivacy/ui/pages/more/console.dart'; import 'package:selfprivacy/ui/pages/more/about_application.dart'; class MorePage extends StatelessWidget { - const MorePage({final super.key}); + const MorePage({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/onboarding/onboarding.dart b/lib/ui/pages/onboarding/onboarding.dart index dc5c8763..36478a1c 100644 --- a/lib/ui/pages/onboarding/onboarding.dart +++ b/lib/ui/pages/onboarding/onboarding.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; class OnboardingPage extends StatefulWidget { - const OnboardingPage({required this.nextPage, final super.key}); + const OnboardingPage({required this.nextPage, super.key}); final Widget nextPage; @override diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index 0de06295..ee01085e 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -18,7 +18,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; GlobalKey navigatorKey = GlobalKey(); class ProvidersPage extends StatefulWidget { - const ProvidersPage({final super.key}); + const ProvidersPage({super.key}); @override State createState() => _ProvidersPageState(); @@ -119,11 +119,11 @@ class _ProvidersPageState extends State { class _Card extends StatelessWidget { const _Card({ - required final this.state, - required final this.icon, - required final this.title, - required final this.subtitle, - final this.onTap, + required this.state, + required this.icon, + required this.title, + required this.subtitle, + this.onTap, }); final Function()? onTap; diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index 2254879d..0330a5a0 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -14,7 +14,7 @@ import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class RecoveryKey extends StatefulWidget { - const RecoveryKey({final super.key}); + const RecoveryKey({super.key}); @override State createState() => _RecoveryKeyState(); @@ -61,7 +61,7 @@ class _RecoveryKeyState extends State { } class RecoveryKeyContent extends StatefulWidget { - const RecoveryKeyContent({final super.key}); + const RecoveryKeyContent({super.key}); @override State createState() => _RecoveryKeyContentState(); @@ -107,7 +107,7 @@ class _RecoveryKeyContentState extends State { } class RecoveryKeyStatusCard extends StatelessWidget { - const RecoveryKeyStatusCard({required this.isValid, final super.key}); + const RecoveryKeyStatusCard({required this.isValid, super.key}); final bool isValid; @@ -144,7 +144,7 @@ class RecoveryKeyStatusCard extends StatelessWidget { } class RecoveryKeyInformation extends StatelessWidget { - const RecoveryKeyInformation({required this.state, final super.key}); + const RecoveryKeyInformation({required this.state, super.key}); final RecoveryKeyState state; @@ -201,7 +201,7 @@ class RecoveryKeyInformation extends StatelessWidget { } class RecoveryKeyConfiguration extends StatefulWidget { - const RecoveryKeyConfiguration({final super.key}); + const RecoveryKeyConfiguration({super.key}); @override State createState() => _RecoveryKeyConfigurationState(); diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index 60169e5a..22e07119 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -5,7 +5,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/info_box/info_box.dart'; class RecoveryKeyReceiving extends StatelessWidget { - const RecoveryKeyReceiving({required this.recoveryKey, final super.key}); + const RecoveryKeyReceiving({required this.recoveryKey, super.key}); final String recoveryKey; diff --git a/lib/ui/pages/root_route.dart b/lib/ui/pages/root_route.dart index d68e4a0e..9b62dae0 100644 --- a/lib/ui/pages/root_route.dart +++ b/lib/ui/pages/root_route.dart @@ -9,7 +9,7 @@ import 'package:selfprivacy/ui/pages/users/users.dart'; import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; class RootPage extends StatefulWidget { - const RootPage({final super.key}); + const RootPage({super.key}); @override State createState() => _RootPageState(); diff --git a/lib/ui/pages/server_details/charts/chart.dart b/lib/ui/pages/server_details/charts/chart.dart index 3a3eb5a7..fb46eb71 100644 --- a/lib/ui/pages/server_details/charts/chart.dart +++ b/lib/ui/pages/server_details/charts/chart.dart @@ -164,7 +164,7 @@ class Legend extends StatelessWidget { const Legend({ required this.color, required this.text, - final super.key, + super.key, }); final String text; diff --git a/lib/ui/pages/server_details/charts/cpu_chart.dart b/lib/ui/pages/server_details/charts/cpu_chart.dart index 14e30dcc..9b437b16 100644 --- a/lib/ui/pages/server_details/charts/cpu_chart.dart +++ b/lib/ui/pages/server_details/charts/cpu_chart.dart @@ -10,7 +10,7 @@ class CpuChart extends StatelessWidget { required this.data, required this.period, required this.start, - final super.key, + super.key, }); final List data; diff --git a/lib/ui/pages/server_details/charts/network_charts.dart b/lib/ui/pages/server_details/charts/network_charts.dart index 43a092f2..c71ae7b1 100644 --- a/lib/ui/pages/server_details/charts/network_charts.dart +++ b/lib/ui/pages/server_details/charts/network_charts.dart @@ -13,7 +13,7 @@ class NetworkChart extends StatelessWidget { required this.listData, required this.period, required this.start, - final super.key, + super.key, }); final List> listData; diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 894c9a28..e0d82b6d 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -34,7 +34,7 @@ part 'time_zone/time_zone.dart'; var navigatorKey = GlobalKey(); class ServerDetailsScreen extends StatefulWidget { - const ServerDetailsScreen({final super.key}); + const ServerDetailsScreen({super.key}); @override State createState() => _ServerDetailsScreenState(); diff --git a/lib/ui/pages/server_details/time_zone/time_zone.dart b/lib/ui/pages/server_details/time_zone/time_zone.dart index 28407d7d..a93b8f23 100644 --- a/lib/ui/pages/server_details/time_zone/time_zone.dart +++ b/lib/ui/pages/server_details/time_zone/time_zone.dart @@ -7,7 +7,7 @@ final List locations = timeZoneDatabase.locations.values.toList() ); class SelectTimezone extends StatefulWidget { - const SelectTimezone({final super.key}); + const SelectTimezone({super.key}); @override State createState() => _SelectTimezoneState(); @@ -117,7 +117,9 @@ class _SelectTimezoneState extends State { ); MapEntry locationToListTile( - final int key, final Location location) { + final int key, + final Location location, + ) { final duration = Duration(milliseconds: location.currentTimeZone.offset); final area = location.currentTimeZone.abbreviation .replaceAll(RegExp(r'[\d+()-]'), ''); diff --git a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart index cfe3fcb5..704e4846 100644 --- a/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart +++ b/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart @@ -9,9 +9,7 @@ import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class MigrationProcessPage extends StatefulWidget { - const MigrationProcessPage({ - final super.key, - }); + const MigrationProcessPage({super.key}); @override State createState() => _MigrationProcessPageState(); diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index 750bbf80..ff36a2b9 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -21,7 +21,7 @@ class ServicesMigrationPage extends StatefulWidget { required this.services, required this.diskStatus, required this.isMigration, - final super.key, + super.key, }); final DiskStatus diskStatus; diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index fd4491f7..d9889336 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -14,7 +14,7 @@ class ExtendingVolumePage extends StatefulWidget { const ExtendingVolumePage({ required this.diskVolumeToResize, required this.diskStatus, - final super.key, + super.key, }); final DiskVolume diskVolumeToResize; diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 16b027ac..2a5206e2 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -12,7 +12,10 @@ import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ServerStoragePage extends StatefulWidget { - const ServerStoragePage({required this.diskStatus, final super.key}); + const ServerStoragePage({ + required this.diskStatus, + super.key, + }); final DiskStatus diskStatus; @@ -75,7 +78,7 @@ class ServerStorageSection extends StatelessWidget { required this.volume, required this.diskStatus, required this.services, - final super.key, + super.key, }); final DiskVolume volume; @@ -120,7 +123,7 @@ class ServerConsumptionListTile extends StatelessWidget { const ServerConsumptionListTile({ required this.service, required this.volume, - final super.key, + super.key, }); final Service service; diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index 33a23b9b..ae0c2369 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -10,8 +10,8 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; class StorageCard extends StatelessWidget { const StorageCard({ - required final this.diskStatus, - final super.key, + required this.diskStatus, + super.key, }); final DiskStatus diskStatus; diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 35741016..d923a5b0 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -1,7 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_volumes/server_volume_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; @@ -14,7 +13,7 @@ import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:url_launcher/url_launcher.dart'; class ServicePage extends StatefulWidget { - const ServicePage({required this.serviceId, final super.key}); + const ServicePage({required this.serviceId, super.key}); final String serviceId; @@ -147,7 +146,7 @@ class _ServicePageState extends State { class ServiceStatusCard extends StatelessWidget { const ServiceStatusCard({ required this.status, - final super.key, + super.key, }); final ServiceStatus status; diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 89a7348a..c4226250 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -3,7 +3,6 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:selfprivacy/config/brand_theme.dart'; -import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; @@ -31,7 +30,7 @@ const switchableServices = [ ]; class ServicesPage extends StatefulWidget { - const ServicesPage({final super.key}); + const ServicesPage({super.key}); @override State createState() => _ServicesPageState(); diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index c8e070c0..c65d17ae 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -21,9 +21,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recovery_routing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class InitializingPage extends StatelessWidget { - const InitializingPage({ - final super.key, - }); + const InitializingPage({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index e32cac5d..a3f366ad 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -9,7 +9,7 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; class RecoverByNewDeviceKeyInstruction extends StatelessWidget { - const RecoverByNewDeviceKeyInstruction({final super.key}); + const RecoverByNewDeviceKeyInstruction({super.key}); @override Widget build(final BuildContext context) => BrandHeroScreen( @@ -30,7 +30,7 @@ class RecoverByNewDeviceKeyInstruction extends StatelessWidget { } class RecoverByNewDeviceKeyInput extends StatelessWidget { - const RecoverByNewDeviceKeyInput({final super.key}); + const RecoverByNewDeviceKeyInput({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index 10a6c279..667f6cce 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -12,7 +12,7 @@ class RecoverByOldTokenInstruction extends StatelessWidget { @override const RecoverByOldTokenInstruction({ required this.instructionFilename, - final super.key, + super.key, }); @override @@ -49,7 +49,7 @@ class RecoverByOldTokenInstruction extends StatelessWidget { } class RecoverByOldToken extends StatelessWidget { - const RecoverByOldToken({final super.key}); + const RecoverByOldToken({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index e17a9436..45152e30 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class RecoverByRecoveryKey extends StatelessWidget { - const RecoverByRecoveryKey({final super.key}); + const RecoverByRecoveryKey({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index cbd40ff0..0b7e7a9e 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmBackblaze extends StatelessWidget { - const RecoveryConfirmBackblaze({final super.key}); + const RecoveryConfirmBackblaze({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart index 46db75b7..4b766e56 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_cloudflare.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryConfirmCloudflare extends StatelessWidget { - const RecoveryConfirmCloudflare({final super.key}); + const RecoveryConfirmCloudflare({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index d8510650..430e0894 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; class RecoveryConfirmServer extends StatefulWidget { - const RecoveryConfirmServer({final super.key}); + const RecoveryConfirmServer({super.key}); @override State createState() => _RecoveryConfirmServerState(); @@ -265,7 +265,7 @@ class IsValidStringDisplay extends StatelessWidget { required this.isValid, required this.textIfValid, required this.textIfInvalid, - final super.key, + super.key, }); final bool isValid; diff --git a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart index 84be9808..76951395 100644 --- a/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_hentzner_connected.dart @@ -11,7 +11,7 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; class RecoveryHetznerConnected extends StatelessWidget { - const RecoveryHetznerConnected({final super.key}); + const RecoveryHetznerConnected({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index d34b896d..68129d57 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -9,7 +9,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart' import 'package:selfprivacy/utils/route_transitions/basic.dart'; class RecoveryMethodSelect extends StatelessWidget { - const RecoveryMethodSelect({final super.key}); + const RecoveryMethodSelect({super.key}); @override Widget build(final BuildContext context) => BrandHeroScreen( @@ -56,7 +56,7 @@ class RecoveryMethodSelect extends StatelessWidget { } class RecoveryFallbackMethodSelect extends StatelessWidget { - const RecoveryFallbackMethodSelect({final super.key}); + const RecoveryFallbackMethodSelect({super.key}); @override Widget build(final BuildContext context) => diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 028b8618..c2b777fc 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -18,7 +18,7 @@ import 'package:selfprivacy/ui/pages/setup/recovering/recovery_method_select.dar import 'package:selfprivacy/utils/route_transitions/basic.dart'; class RecoveryRouting extends StatelessWidget { - const RecoveryRouting({final super.key}); + const RecoveryRouting({super.key}); @override Widget build(final BuildContext context) { @@ -77,7 +77,7 @@ class RecoveryRouting extends StatelessWidget { } class SelectDomainToRecover extends StatelessWidget { - const SelectDomainToRecover({final super.key}); + const SelectDomainToRecover({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/users/add_user_fab.dart b/lib/ui/pages/users/add_user_fab.dart index a78f056d..7e87e51d 100644 --- a/lib/ui/pages/users/add_user_fab.dart +++ b/lib/ui/pages/users/add_user_fab.dart @@ -1,7 +1,7 @@ part of 'users.dart'; class AddUserFab extends StatelessWidget { - const AddUserFab({final super.key}); + const AddUserFab({super.key}); @override Widget build(final BuildContext context) => FloatingActionButton.small( diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 69215dda..7c393296 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -1,7 +1,7 @@ part of 'users.dart'; class NewUser extends StatelessWidget { - const NewUser({final super.key}); + const NewUser({super.key}); @override Widget build(final BuildContext context) { diff --git a/lib/ui/pages/users/reset_password.dart b/lib/ui/pages/users/reset_password.dart index 841a9353..87f95902 100644 --- a/lib/ui/pages/users/reset_password.dart +++ b/lib/ui/pages/users/reset_password.dart @@ -3,7 +3,7 @@ part of 'users.dart'; class ResetPassword extends StatelessWidget { const ResetPassword({ required this.user, - final super.key, + super.key, }); final User user; diff --git a/lib/ui/pages/users/user_details.dart b/lib/ui/pages/users/user_details.dart index e3cfc21f..3ae5b86d 100644 --- a/lib/ui/pages/users/user_details.dart +++ b/lib/ui/pages/users/user_details.dart @@ -3,7 +3,7 @@ part of 'users.dart'; class UserDetails extends StatelessWidget { const UserDetails({ required this.login, - final super.key, + super.key, }); final String login; @@ -249,7 +249,7 @@ class _SshKeysCard extends StatelessWidget { } class NewSshKey extends StatelessWidget { - const NewSshKey(this.user, {final super.key}); + const NewSshKey(this.user, {super.key}); final User user; @override diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index 40443a9c..caf6d441 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -34,7 +34,7 @@ part 'add_user_fab.dart'; part 'reset_password.dart'; class UsersPage extends StatelessWidget { - const UsersPage({final super.key}); + const UsersPage({super.key}); @override Widget build(final BuildContext context) {