Skip to content

Commit

Permalink
Optimize imports and reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemyerebasmaz committed Oct 26, 2023
1 parent 2a56114 commit 93c9fab
Show file tree
Hide file tree
Showing 63 changed files with 64 additions and 67 deletions.
2 changes: 1 addition & 1 deletion lib/background/breez_message_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'dart:io';

import 'package:c_breez/background/breez_service_initializer.dart';
import 'package:c_breez/main.dart';
import 'package:logging/logging.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:logging/logging.dart';
import 'package:workmanager/workmanager.dart';

final _log = Logger("BreezMessageHandler");
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/account/credentials_manager.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'dart:io';

import 'package:breez_sdk/bridge_generated.dart' as sdk;
import 'package:c_breez/config.dart';
import 'package:c_breez/services/injector.dart';
import 'package:c_breez/services/keychain.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:c_breez/config.dart';

class CredentialsManager {
final _log = Logger("CredentialsManager");
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/backup/backup_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:breez_sdk/breez_sdk.dart';
import 'package:breez_sdk/bridge_generated.dart' as sdk;
import 'package:c_breez/bloc/backup/backup_state.dart';
import 'package:logging/logging.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:logging/logging.dart';

class BackupBloc extends Cubit<BackupState?> {
final _log = Logger("BackupBloc");
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/buy_bitcoin/moonpay/moonpay_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:c_breez/bloc/buy_bitcoin/moonpay/moonpay_state.dart';
import 'package:c_breez/config.dart';
import 'package:c_breez/utils/exceptions.dart';
import 'package:c_breez/utils/preferences.dart';
import 'package:logging/logging.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("MoonPayBloc");

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/connectivity/connectivity_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import 'dart:async';
import 'dart:io';

import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:logging/logging.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

import 'connectivity_state.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/csv_exporter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:c_breez/bloc/account/payment_filters.dart';
import 'package:c_breez/models/payment_minutiae.dart';
import 'package:c_breez/utils/date.dart';
import 'package:csv/csv.dart';
import 'package:logging/logging.dart';
import 'package:intl/intl.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';

final _log = Logger("CsvExporter");
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/fee_options/fee_options_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'package:breez_translations/breez_translations_locales.dart';
import 'package:c_breez/bloc/fee_options/fee_option.dart';
import 'package:c_breez/bloc/fee_options/fee_options_state.dart';
import 'package:c_breez/utils/exceptions.dart';
import 'package:logging/logging.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("FeeOptionsBloc");

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/network/network_settings_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:c_breez/config.dart';
import 'package:c_breez/services/injector.dart';
import 'package:c_breez/utils/blockchain_explorer_utils.dart';
import 'package:c_breez/utils/preferences.dart';
import 'package:logging/logging.dart';
import 'package:http/http.dart' as http;
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:logging/logging.dart';

class NetworkSettingsBloc extends Cubit<NetworkSettingsState> with HydratedMixin {
final Preferences _preferences;
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/payment_options/payment_options_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:c_breez/bloc/payment_options/payment_options_state.dart';
import 'package:c_breez/utils/preferences.dart';
import 'package:logging/logging.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("PaymentOptionsBloc");

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/refund/refund_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'dart:async';
import 'package:breez_sdk/breez_sdk.dart';
import 'package:breez_sdk/bridge_generated.dart';
import 'package:c_breez/bloc/refund/refund_state.dart';
import 'package:logging/logging.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("RefundBloc");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'package:breez_sdk/breez_sdk.dart';
import 'package:breez_translations/breez_translations_locales.dart';
import 'package:c_breez/bloc/rev_swap_in_progress/rev_swap_in_progress_state.dart';
import 'package:c_breez/utils/exceptions.dart';
import 'package:logging/logging.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("RevSwapsInProgressBloc");

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/reverse_swap/reverse_swap_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:breez_sdk/bridge_generated.dart';
import 'package:breez_translations/breez_translations_locales.dart';
import 'package:c_breez/bloc/reverse_swap/reverse_swap_state.dart';
import 'package:c_breez/utils/exceptions.dart';
import 'package:logging/logging.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("ReverseSwapBloc");

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/security/security_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import 'dart:async';
import 'dart:io';

import 'package:c_breez/bloc/security/security_state.dart';
import 'package:logging/logging.dart';
import 'package:flutter/services.dart';
import 'package:flutter_fgbg/flutter_fgbg.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:local_auth/local_auth.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth_ios/types/auth_messages_ios.dart';
import 'package:logging/logging.dart';

class SecurityBloc extends Cubit<SecurityState> with HydratedMixin {
final _log = Logger("LocalAuthenticationService");
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/swap_in_progress/swap_in_progress_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:breez_sdk/bridge_generated.dart';
import 'package:breez_translations/breez_translations_locales.dart';
import 'package:c_breez/bloc/swap_in_progress/swap_in_progress_state.dart';
import 'package:c_breez/utils/exceptions.dart';
import 'package:logging/logging.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("SwapInProgressBloc");

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/sweep/sweep_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:breez_sdk/bridge_generated.dart';
import 'package:breez_translations/breez_translations_locales.dart';
import 'package:c_breez/bloc/sweep/sweep_state.dart';
import 'package:c_breez/utils/exceptions.dart';
import 'package:logging/logging.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("SweepBloc");

Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/user_profile/user_profile_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:c_breez/bloc/user_profile/user_profile_state.dart';
import 'package:c_breez/models/user_profile.dart';
import 'package:c_breez/services/breez_server.dart';
import 'package:c_breez/services/notifications.dart';
import 'package:logging/logging.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';

const PROFILE_DATA_FOLDER_PATH = "profile";
Expand Down
2 changes: 1 addition & 1 deletion lib/handlers/connectivity_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import 'package:c_breez/handlers/handler.dart';
import 'package:c_breez/handlers/handler_context_provider.dart';
import 'package:c_breez/theme/theme_provider.dart' as theme;
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("ConnectivityHandler");

Expand Down
2 changes: 1 addition & 1 deletion lib/handlers/payment_result_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import 'package:c_breez/bloc/account/payment_result.dart';
import 'package:c_breez/handlers/handler.dart';
import 'package:c_breez/handlers/handler_context_provider.dart';
import 'package:c_breez/widgets/flushbar.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';
import 'package:rxdart/rxdart.dart';

final _log = Logger("PaymentResultHandler");
Expand Down
2 changes: 1 addition & 1 deletion lib/models/payment_minutiae.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'dart:typed_data';
import 'package:breez_sdk/bridge_generated.dart';
import 'package:breez_translations/generated/breez_translations.dart';
import 'package:c_breez/utils/extensions/breez_pos_message_extractor.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';

final _log = Logger("PaymentDetails");

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/buy_bitcoin/moonpay/moonpay_webview.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:c_breez/bloc/buy_bitcoin/moonpay/moonpay_bloc.dart';
import 'package:c_breez/bloc/buy_bitcoin/moonpay/moonpay_state.dart';
import 'package:c_breez/routes/buy_bitcoin/moonpay/moonpay_loading.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:logging/logging.dart';

final _log = Logger("MoonpayWebView");

Expand Down
4 changes: 2 additions & 2 deletions lib/routes/create_invoice/create_invoice_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import 'package:c_breez/widgets/keyboard_done_action.dart';
import 'package:c_breez/widgets/receivable_btc_box.dart';
import 'package:c_breez/widgets/single_button_bottom_bar.dart';
import 'package:c_breez/widgets/transparent_page_route.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("CreateInvoicePage");

Expand All @@ -36,7 +36,7 @@ class CreateInvoicePage extends StatefulWidget {
super.key,
this.requestData,
this.onFinish,
}) : assert(
}) : assert(
requestData == null || (onFinish != null),
"If you are using LNURL withdraw, you must provide an onFinish callback.",
);
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/create_invoice/qr_code_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import 'package:c_breez/routes/create_invoice/widgets/loading_or_error.dart';
import 'package:c_breez/services/injector.dart';
import 'package:c_breez/utils/exceptions.dart';
import 'package:c_breez/widgets/flushbar.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';
import 'package:share_plus/share_plus.dart';

final _log = Logger("QrCodeDialog");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import 'package:c_breez/bloc/currency/currency_bloc.dart';
import 'package:c_breez/bloc/currency/currency_state.dart';
import 'package:c_breez/theme/theme_extensions.dart';
import 'package:c_breez/widgets/warning_box.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final log = Logger("ExpiryAndFeeMessage");

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/dev/command_line_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'dart:io';
import 'package:c_breez/routes/dev/widget/command_list.dart';
import 'package:c_breez/services/injector.dart';
import 'package:c_breez/theme/theme_provider.dart' as theme;
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:share_plus/share_plus.dart';

Expand Down
1 change: 0 additions & 1 deletion lib/routes/dev/developers_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'package:c_breez/widgets/route.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
import 'package:share_plus/share_plus.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/home/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import 'package:c_breez/routes/home/widgets/payments_filter/payments_filter_sliv
import 'package:c_breez/routes/home/widgets/payments_list/payments_list.dart';
import 'package:c_breez/routes/home/widgets/status_text.dart';
import 'package:c_breez/theme/theme_provider.dart' as theme;
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

const _kFilterMaxSize = 64.0;
const _kPaymentListItemHeight = 72.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:c_breez/bloc/input/input_source.dart';
import 'package:c_breez/theme/theme_provider.dart' as theme;
import 'package:c_breez/widgets/flushbar.dart';
import 'package:c_breez/widgets/loader.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("EnterPaymentInfoDialog");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import 'package:c_breez/bloc/currency/currency_bloc.dart';
import 'package:c_breez/theme/theme_provider.dart';
import 'package:c_breez/widgets/flushbar.dart';
import 'package:c_breez/widgets/loader.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';
import 'package:share_plus/share_plus.dart';

class PaymentmentFilterExporter extends StatelessWidget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import 'package:c_breez/routes/home/widgets/payments_list/dialog/payment_details
import 'package:c_breez/routes/home/widgets/payments_list/dialog/payment_details_dialog_preimage.dart';
import 'package:c_breez/routes/home/widgets/payments_list/dialog/payment_details_dialog_success_action.dart';
import 'package:c_breez/routes/home/widgets/payments_list/dialog/payment_details_dialog_title.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';

final AutoSizeGroup _labelGroup = AutoSizeGroup();
final AutoSizeGroup _valueGroup = AutoSizeGroup();
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/home/widgets/qr_action_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import 'package:c_breez/bloc/lsp/lsp_bloc.dart';
import 'package:c_breez/bloc/lsp/lsp_state.dart';
import 'package:c_breez/theme/theme_provider.dart' as theme;
import 'package:c_breez/widgets/flushbar.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/svg.dart';
import 'package:logging/logging.dart';

final _log = Logger("QrActionButton");

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/lnurl/auth/lnurl_auth_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:c_breez/routes/lnurl/auth/login_text.dart';
import 'package:c_breez/routes/lnurl/widgets/lnurl_page_result.dart';
import 'package:c_breez/widgets/error_dialog.dart';
import 'package:c_breez/widgets/loader.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("HandleLNURLAuthRequest");

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/lnurl/payment/lnurl_payment_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:c_breez/bloc/currency/currency_bloc.dart';
import 'package:c_breez/models/currency.dart';
import 'package:c_breez/routes/lnurl/payment/lnurl_payment_info.dart';
import 'package:c_breez/utils/fiat_conversion.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("LNURLPaymentDialog");

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/lnurl/payment/lnurl_payment_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import 'package:c_breez/routes/lnurl/payment/success_action/success_action_dialo
import 'package:c_breez/routes/lnurl/widgets/lnurl_page_result.dart';
import 'package:c_breez/widgets/payment_dialogs/processing_payment_dialog.dart';
import 'package:c_breez/widgets/route.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("HandleLNURLPayRequest");

Expand Down
5 changes: 2 additions & 3 deletions lib/routes/lnurl/payment/lnurl_payment_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import 'package:c_breez/utils/payment_validator.dart';
import 'package:c_breez/widgets/amount_form_field/amount_form_field.dart';
import 'package:c_breez/widgets/back_button.dart' as back_button;
import 'package:c_breez/widgets/single_button_bottom_bar.dart';
import 'package:flutter/gestures.dart';
// import 'package:email_validator/email_validator.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
// import 'package:email_validator/email_validator.dart';
import 'package:logging/logging.dart';

final _log = Logger("LNURLPaymentPage");

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/lnurl/withdraw/lnurl_withdraw_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:c_breez/routes/lnurl/widgets/lnurl_page_result.dart';
import 'package:c_breez/theme/theme_provider.dart' as theme;
import 'package:c_breez/utils/exceptions.dart';
import 'package:c_breez/widgets/loading_animated_text.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';

final _log = Logger("LNURLWithdrawDialog");

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/lnurl/withdraw/lnurl_withdraw_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:c_breez/routes/create_invoice/widgets/successful_payment.dart';
import 'package:c_breez/routes/lnurl/widgets/lnurl_page_result.dart';
import 'package:c_breez/widgets/error_dialog.dart';
import 'package:c_breez/widgets/transparent_page_route.dart';
import 'package:logging/logging.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';

final _log = Logger("HandleLNURLWithdrawPageResult");

Expand Down
Loading

0 comments on commit 93c9fab

Please sign in to comment.