From a4a36a49597e8a8c21dd6a96cd706be656058a6b Mon Sep 17 00:00:00 2001 From: Frank Merkel <138444693+frankmer@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:43:16 +0200 Subject: [PATCH] fix all imports --- lib/api/token_container_api_endpoint.dart | 5 ----- .../state_listeners/state_notifier_provider_listener.dart | 1 + lib/mains/main_netknights.dart | 2 +- lib/model/extensions/enums/introduction_extension.dart | 2 +- lib/model/tokens/hotp_token.dart | 2 +- lib/model/tokens/totp_token.dart | 4 +++- .../scheme_processors/container_credentials_processor.dart | 6 +++--- lib/repo/secure_container_credentials_repository.dart | 2 +- .../generated_providers/token_notifier.dart | 3 +-- lib/utils/utils.dart | 1 - .../labeled_dropdown_button.dart | 1 + lib/views/container_view/container_view.dart | 2 +- lib/views/import_tokens_view/pages/import_start_page.dart | 2 -- .../main_view_widgets/main_view_navigation_bar.dart | 2 +- .../main_view/main_view_widgets/main_view_tokens_list.dart | 1 + .../default_token_actions/default_lock_action.dart | 2 +- .../main_view_widgets/token_widgets/token_widget_base.dart | 2 +- lib/widgets/app_wrapper.dart | 4 ---- lib/widgets/default_refresh_indicator.dart | 3 +-- 19 files changed, 19 insertions(+), 28 deletions(-) diff --git a/lib/api/token_container_api_endpoint.dart b/lib/api/token_container_api_endpoint.dart index 6ef736ca4..3dc288962 100644 --- a/lib/api/token_container_api_endpoint.dart +++ b/lib/api/token_container_api_endpoint.dart @@ -20,28 +20,23 @@ * limitations under the License. */ import 'dart:convert'; -import 'dart:math'; import 'dart:typed_data'; import 'package:collection/collection.dart'; import 'package:cryptography/cryptography.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:http/http.dart'; -import 'package:privacyidea_authenticator/model/extensions/enums/ec_key_algorithm_extension.dart'; import 'package:privacyidea_authenticator/processors/scheme_processors/token_import_scheme_processors/otp_auth_processor.dart'; import 'package:privacyidea_authenticator/utils/ecc_utils.dart'; import 'package:privacyidea_authenticator/utils/privacyidea_io_client.dart'; -import '../model/enums/ec_key_algorithm.dart'; import '../model/riverpod_states/token_state.dart'; -import '../model/token_import/token_origin_data.dart'; import '../model/token_template.dart'; import '../model/tokens/container_credentials.dart'; import '../model/tokens/token.dart'; import '../utils/globals.dart'; import '../utils/identifiers.dart'; import '../utils/logger.dart'; - import '../widgets/dialog_widgets/enter_passphrase_dialog.dart'; part 'token_container_api_endpoint.freezed.dart'; diff --git a/lib/interfaces/riverpod/state_listeners/state_notifier_provider_listener.dart b/lib/interfaces/riverpod/state_listeners/state_notifier_provider_listener.dart index b81bbedba..fd6e8a5a4 100644 --- a/lib/interfaces/riverpod/state_listeners/state_notifier_provider_listener.dart +++ b/lib/interfaces/riverpod/state_listeners/state_notifier_provider_listener.dart @@ -19,6 +19,7 @@ */ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; + import '../../../utils/logger.dart'; abstract class StateNotifierProviderListener, S> { diff --git a/lib/mains/main_netknights.dart b/lib/mains/main_netknights.dart index 95b60495b..8d104e280 100644 --- a/lib/mains/main_netknights.dart +++ b/lib/mains/main_netknights.dart @@ -32,8 +32,8 @@ import '../utils/customization/application_customization.dart'; import '../utils/globals.dart'; import '../utils/home_widget_utils.dart'; import '../utils/logger.dart'; -import '../utils/riverpod/riverpod_providers/generated_providers/settings_notifier.dart'; import '../utils/riverpod/riverpod_providers/generated_providers/app_constraints_notifier.dart'; +import '../utils/riverpod/riverpod_providers/generated_providers/settings_notifier.dart'; import '../views/add_token_manually_view/add_token_manually_view.dart'; import '../views/container_view/container_view.dart'; import '../views/feedback_view/feedback_view.dart'; diff --git a/lib/model/extensions/enums/introduction_extension.dart b/lib/model/extensions/enums/introduction_extension.dart index 856d9abbe..d78f824ad 100644 --- a/lib/model/extensions/enums/introduction_extension.dart +++ b/lib/model/extensions/enums/introduction_extension.dart @@ -1,11 +1,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../../riverpod_states/settings_state.dart'; import '../../../l10n/app_localizations.dart'; import '../../../utils/riverpod/riverpod_providers/generated_providers/settings_notifier.dart'; import '../../../utils/riverpod/riverpod_providers/generated_providers/token_notifier.dart'; import '../../enums/introduction.dart'; import '../../riverpod_states/introduction_state.dart'; +import '../../riverpod_states/settings_state.dart'; extension IntroductionX on Introduction { /// Checks if the condition for the given state is fulfilled. diff --git a/lib/model/tokens/hotp_token.dart b/lib/model/tokens/hotp_token.dart index b9d201ebd..ea84ec8bf 100644 --- a/lib/model/tokens/hotp_token.dart +++ b/lib/model/tokens/hotp_token.dart @@ -20,7 +20,6 @@ import 'package:json_annotation/json_annotation.dart'; import 'package:privacyidea_authenticator/utils/type_matchers.dart'; -import '../token_template.dart'; import 'package:uuid/uuid.dart'; import '../../utils/identifiers.dart'; @@ -28,6 +27,7 @@ import '../enums/algorithms.dart'; import '../enums/token_types.dart'; import '../extensions/enums/algorithms_extension.dart'; import '../token_import/token_origin_data.dart'; +import '../token_template.dart'; import 'otp_token.dart'; import 'token.dart'; diff --git a/lib/model/tokens/totp_token.dart b/lib/model/tokens/totp_token.dart index c1e197d22..8299085d3 100644 --- a/lib/model/tokens/totp_token.dart +++ b/lib/model/tokens/totp_token.dart @@ -20,16 +20,18 @@ import 'package:json_annotation/json_annotation.dart'; import 'package:uuid/uuid.dart'; + import '../../utils/identifiers.dart'; import '../../utils/logger.dart'; import '../../utils/type_matchers.dart'; import '../enums/algorithms.dart'; import '../enums/token_types.dart'; import '../extensions/enums/algorithms_extension.dart'; -import '../token_template.dart'; import '../token_import/token_origin_data.dart'; +import '../token_template.dart'; import 'otp_token.dart'; import 'token.dart'; + part 'totp_token.g.dart'; @JsonSerializable() diff --git a/lib/processors/scheme_processors/container_credentials_processor.dart b/lib/processors/scheme_processors/container_credentials_processor.dart index 8345f933f..e4b52827f 100644 --- a/lib/processors/scheme_processors/container_credentials_processor.dart +++ b/lib/processors/scheme_processors/container_credentials_processor.dart @@ -21,12 +21,12 @@ import 'package:privacyidea_authenticator/l10n/app_localizations.dart'; import 'package:privacyidea_authenticator/utils/errors.dart'; import 'package:privacyidea_authenticator/utils/globals.dart'; import 'package:privacyidea_authenticator/utils/riverpod/riverpod_providers/generated_providers/credential_notifier.dart'; + import '../../model/processor_result.dart'; +import '../../model/tokens/container_credentials.dart'; import '../../utils/identifiers.dart'; -import 'scheme_processor_interface.dart'; import '../../utils/logger.dart'; - -import '../../model/tokens/container_credentials.dart'; +import 'scheme_processor_interface.dart'; class ContainerCredentialsProcessor extends SchemeProcessor { static const resultHandlerType = TypeValidatorRequired(); diff --git a/lib/repo/secure_container_credentials_repository.dart b/lib/repo/secure_container_credentials_repository.dart index 6203718cb..83efc11f1 100644 --- a/lib/repo/secure_container_credentials_repository.dart +++ b/lib/repo/secure_container_credentials_repository.dart @@ -2,8 +2,8 @@ import 'dart:convert'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:mutex/mutex.dart'; -import '../interfaces/repo/container_credentials_repository.dart'; +import '../interfaces/repo/container_credentials_repository.dart'; import '../model/riverpod_states/credentials_state.dart'; import '../model/tokens/container_credentials.dart'; import '../utils/logger.dart'; diff --git a/lib/utils/riverpod/riverpod_providers/generated_providers/token_notifier.dart b/lib/utils/riverpod/riverpod_providers/generated_providers/token_notifier.dart index 326c422ca..32537fc67 100644 --- a/lib/utils/riverpod/riverpod_providers/generated_providers/token_notifier.dart +++ b/lib/utils/riverpod/riverpod_providers/generated_providers/token_notifier.dart @@ -41,7 +41,6 @@ import '../../../../model/enums/token_import_type.dart'; import '../../../../model/enums/token_origin_source_type.dart'; import '../../../../model/processor_result.dart'; import '../../../../model/riverpod_states/token_state.dart'; -import '../../../../model/token_template.dart'; import '../../../../model/tokens/hotp_token.dart'; import '../../../../model/tokens/otp_token.dart'; import '../../../../model/tokens/push_token.dart'; @@ -57,8 +56,8 @@ import '../../../privacyidea_io_client.dart'; import '../../../rsa_utils.dart'; import '../../../utils.dart'; import '../../../view_utils.dart'; -import 'settings_notifier.dart'; import '../state_providers/status_message_provider.dart'; +import 'settings_notifier.dart'; part 'token_notifier.g.dart'; diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 6d5fa5dc1..7a5dde1db 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -30,7 +30,6 @@ import 'package:package_info_plus/package_info_plus.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:privacyidea_authenticator/mains/main_netknights.dart'; import 'package:privacyidea_authenticator/model/extensions/sortable_list.dart'; -import 'package:privacyidea_authenticator/processors/scheme_processors/token_import_scheme_processors/token_import_scheme_processor_interface.dart'; import 'package:privacyidea_authenticator/utils/identifiers.dart'; import 'package:privacyidea_authenticator/utils/logger.dart'; import 'package:privacyidea_authenticator/utils/riverpod/riverpod_providers/generated_providers/sortable_notifier.dart'; diff --git a/lib/views/add_token_manually_view/add_token_manually_view_widgets/labeled_dropdown_button.dart b/lib/views/add_token_manually_view/add_token_manually_view_widgets/labeled_dropdown_button.dart index bd662e8e1..b7d685100 100644 --- a/lib/views/add_token_manually_view/add_token_manually_view_widgets/labeled_dropdown_button.dart +++ b/lib/views/add_token_manually_view/add_token_manually_view_widgets/labeled_dropdown_button.dart @@ -18,6 +18,7 @@ * limitations under the License. */ import 'package:flutter/material.dart'; + import '../../../utils/logger.dart'; import '../../../widgets/deactivateable.dart'; import 'add_token_manually_row.dart'; diff --git a/lib/views/container_view/container_view.dart b/lib/views/container_view/container_view.dart index 72e780661..3b8fb2881 100644 --- a/lib/views/container_view/container_view.dart +++ b/lib/views/container_view/container_view.dart @@ -29,8 +29,8 @@ import '../../l10n/app_localizations.dart'; import '../../model/tokens/container_credentials.dart'; import '../../utils/customization/theme_extentions/action_theme.dart'; import '../../utils/riverpod/riverpod_providers/generated_providers/token_notifier.dart'; -import '../main_view/main_view_widgets/token_widgets/slideable_action.dart'; import '../../widgets/pi_slideable.dart'; +import '../main_view/main_view_widgets/token_widgets/slideable_action.dart'; import '../view_interface.dart'; const String groupTag = 'container-actions'; diff --git a/lib/views/import_tokens_view/pages/import_start_page.dart b/lib/views/import_tokens_view/pages/import_start_page.dart index 92c5d9570..cd4a10752 100644 --- a/lib/views/import_tokens_view/pages/import_start_page.dart +++ b/lib/views/import_tokens_view/pages/import_start_page.dart @@ -39,9 +39,7 @@ import '../../../model/tokens/token.dart'; import '../../../processors/mixins/token_import_processor.dart'; import '../../../processors/scheme_processors/token_import_scheme_processors/token_import_scheme_processor_interface.dart'; import '../../../processors/token_import_file_processor/token_import_file_processor_interface.dart'; -import '../../../utils/globals.dart'; import '../../../utils/logger.dart'; -import '../../../utils/riverpod/riverpod_providers/generated_providers/progress_state_provider.dart'; import '../../qr_scanner_view/qr_scanner_view.dart'; import '../import_tokens_view.dart'; import '../widgets/dialogs/qr_not_found_dialog.dart'; diff --git a/lib/views/main_view/main_view_widgets/main_view_navigation_bar.dart b/lib/views/main_view/main_view_widgets/main_view_navigation_bar.dart index 115785088..8857202df 100644 --- a/lib/views/main_view/main_view_widgets/main_view_navigation_bar.dart +++ b/lib/views/main_view/main_view_widgets/main_view_navigation_bar.dart @@ -22,8 +22,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../l10n/app_localizations.dart'; import '../../../model/enums/introduction.dart'; -import '../../../utils/riverpod/riverpod_providers/generated_providers/introduction_provider.dart'; import '../../../utils/riverpod/riverpod_providers/generated_providers/app_constraints_notifier.dart'; +import '../../../utils/riverpod/riverpod_providers/generated_providers/introduction_provider.dart'; import '../../../widgets/focused_item_as_overlay.dart'; import '../../add_token_manually_view/add_token_manually_view.dart'; import '../../settings_view/settings_view.dart'; diff --git a/lib/views/main_view/main_view_widgets/main_view_tokens_list.dart b/lib/views/main_view/main_view_widgets/main_view_tokens_list.dart index 8ad4a640a..25df941b5 100644 --- a/lib/views/main_view/main_view_widgets/main_view_tokens_list.dart +++ b/lib/views/main_view/main_view_widgets/main_view_tokens_list.dart @@ -21,6 +21,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; + import '../../../model/mixins/sortable_mixin.dart'; import '../../../model/riverpod_states/settings_state.dart'; import '../../../model/token_folder.dart'; diff --git a/lib/views/main_view/main_view_widgets/token_widgets/default_token_actions/default_lock_action.dart b/lib/views/main_view/main_view_widgets/token_widgets/default_token_actions/default_lock_action.dart index b228d36e0..1317f7a6e 100644 --- a/lib/views/main_view/main_view_widgets/token_widgets/default_token_actions/default_lock_action.dart +++ b/lib/views/main_view/main_view_widgets/token_widgets/default_token_actions/default_lock_action.dart @@ -24,8 +24,8 @@ import 'package:flutter_slidable/flutter_slidable.dart'; import '../../../../../l10n/app_localizations.dart'; import '../../../../../model/enums/introduction.dart'; import '../../../../../model/tokens/token.dart'; -import '../../../../../utils/globals.dart'; import '../../../../../utils/customization/theme_extentions/action_theme.dart'; +import '../../../../../utils/globals.dart'; import '../../../../../utils/lock_auth.dart'; import '../../../../../utils/logger.dart'; import '../../../../../utils/riverpod/riverpod_providers/generated_providers/introduction_provider.dart'; diff --git a/lib/views/main_view/main_view_widgets/token_widgets/token_widget_base.dart b/lib/views/main_view/main_view_widgets/token_widgets/token_widget_base.dart index 2448603f0..47acf5102 100644 --- a/lib/views/main_view/main_view_widgets/token_widgets/token_widget_base.dart +++ b/lib/views/main_view/main_view_widgets/token_widgets/token_widget_base.dart @@ -28,11 +28,11 @@ import '../../../../utils/globals.dart'; import '../../../../utils/logger.dart'; import '../../../../utils/riverpod/riverpod_providers/state_providers/dragging_sortable_provider.dart'; import '../../../../utils/utils.dart'; +import '../../../../widgets/pi_slideable.dart'; import 'default_token_actions/default_delete_action.dart'; import 'default_token_actions/default_edit_action.dart'; import 'default_token_actions/default_lock_action.dart'; import 'slideable_action.dart'; -import '../../../../widgets/pi_slideable.dart'; import 'token_widget.dart'; class TokenWidgetBase extends ConsumerWidget { diff --git a/lib/widgets/app_wrapper.dart b/lib/widgets/app_wrapper.dart index 01ee66c14..1b3f2cefc 100644 --- a/lib/widgets/app_wrapper.dart +++ b/lib/widgets/app_wrapper.dart @@ -5,20 +5,16 @@ import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../interfaces/riverpod/state_listeners/notifier_provider_listener.dart'; -import '../model/token_template.dart'; import '../utils/home_widget_utils.dart'; import '../utils/logger.dart'; import '../utils/riverpod/riverpod_providers/generated_providers/credential_notifier.dart'; import '../utils/riverpod/riverpod_providers/generated_providers/deeplink_notifier.dart'; import '../utils/riverpod/riverpod_providers/generated_providers/push_request_provider.dart'; -import '../utils/riverpod/riverpod_providers/generated_providers/token_container_notifier.dart'; import '../utils/riverpod/riverpod_providers/generated_providers/token_folder_notifier.dart'; import '../utils/riverpod/riverpod_providers/generated_providers/token_notifier.dart'; import '../utils/riverpod/state_listeners/home_widget_deep_link_listener.dart'; import '../utils/riverpod/state_listeners/home_widget_token_state_listener.dart'; import '../utils/riverpod/state_listeners/navigation_deep_link_listener.dart'; -import '../utils/riverpod/state_listeners/token_container_token_state_listener.dart'; import 'app_wrappers/single_touch_recognizer.dart'; import 'app_wrappers/state_observer.dart'; diff --git a/lib/widgets/default_refresh_indicator.dart b/lib/widgets/default_refresh_indicator.dart index 8d7695038..c246e867d 100644 --- a/lib/widgets/default_refresh_indicator.dart +++ b/lib/widgets/default_refresh_indicator.dart @@ -1,12 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../utils/riverpod/riverpod_providers/generated_providers/token_container_notifier.dart'; -import 'deactivateable_refresh_indicator.dart'; import '../utils/logger.dart'; import '../utils/push_provider.dart'; import '../utils/riverpod/riverpod_providers/generated_providers/credential_notifier.dart'; import '../views/main_view/main_view_widgets/loading_indicator.dart'; +import 'deactivateable_refresh_indicator.dart'; class DefaultRefreshIndicator extends ConsumerStatefulWidget { final Widget child;