Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabled more lint #996

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ linter:
directives_ordering: false
sort_pub_dependencies: false
flutter_style_todos: false
no_default_cases: false
no_default_cases: true
use_named_constants: false
avoid_positional_boolean_parameters: false
comment_references: false
Expand Down
2 changes: 1 addition & 1 deletion flutterw
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
##
## Flutter start up script for UN*X
## Version: v1.3.1
## Date: 2022-12-22 21:01:55
## Date: 2023-02-08 19:57:46
##
## Use this flutter wrapper to bundle Flutter within your project to make
## sure everybody builds with the same version.
Expand Down
18 changes: 6 additions & 12 deletions lib/page-encointer/bazaar/menu/camera/image_picker_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,12 @@ class ImagePickerScaffold extends StatelessWidget {
);
case ConnectionState.done:
return const ImagePreview();
default:
if (snapshot.hasError) {
return Text(
'Pick image/video error: ${snapshot.error}}',
textAlign: TextAlign.center,
);
} else {
return Text(
I18n.of(context)!.translationsForLocale().bazaar.imageNotPicked,
textAlign: TextAlign.center,
);
}
//Here I'll need your help
case ConnectionState.active:
return Text(
I18n.of(context)!.translationsForLocale().bazaar.imageNotPicked,
textAlign: TextAlign.center,
);
}
},
)
Expand Down
3 changes: 0 additions & 3 deletions lib/page-encointer/ceremony_box/ceremony_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ Widget getMeetupInfoWidget(BuildContext context, AppStore store) {
);
}
}
default:
Log.d("'getMeetupInfoWidget' trapped in an unexpected default case", 'CeremonyBox');
return Container();
}
}

Expand Down
4 changes: 0 additions & 4 deletions lib/page/assets/transfer/payment_confirmation_page/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ class _PaymentConfirmationPageState extends State<PaymentConfirmationPage> with
),
),
);
default:
return const Text('Unknown transfer state');
}
}

Expand Down Expand Up @@ -253,8 +251,6 @@ class _PaymentConfirmationPageState extends State<PaymentConfirmationPage> with
style: h2Grey,
);
}
default:
return const Text('Unknown transfer state');
}
}

Expand Down
4 changes: 0 additions & 4 deletions lib/page/qr_scan/qr_scan_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class QrScanService {
return InvoiceQrCode.fromQrFields(data);
case QrCodeContext.voucher:
return VoucherQrCode.fromQrFields(data);
default:
throw const FormatException('[parseQrScan] Unhandled qr scan context');
}
}

Expand All @@ -50,8 +48,6 @@ class QrScanService {
return handleInvoiceQrCodeScan(context, scanContext, qrCode as InvoiceQrCode);
case QrCodeContext.voucher:
return handleVoucherQrCodeScan(context, scanContext, qrCode as VoucherQrCode);
default:
throw const FormatException('[handleQrScan] Unhandled qr scan context');
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions lib/service/deep_link/deep_link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,5 @@ Future<void> _navigationWithWrScanContext(BuildContext context, QrCode<dynamic>
ReapVoucherPage.route,
arguments: ReapVoucherParams(voucher: qrCode.data as VoucherData),
);
break;
default:
break;
}
}
6 changes: 3 additions & 3 deletions lib/service/tx/lib/src/submit_to_js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ void _onTxFinish(
}

String getTxStatusTranslation(TranslationsHome dic, TxStatus? status) {
if (status == null) {
return '';
}
switch (status) {
case TxStatus.Queued:
return dic.txQueued;
Expand All @@ -145,9 +148,6 @@ String getTxStatusTranslation(TranslationsHome dic, TxStatus? status) {
return dic.txInBlock;
case TxStatus.Error:
return dic.txError;
default:
Log.d('Illegal TxStatus supplied to translation: $status', 'getTxStatusTranslation');
return '';
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/store/encointer/encointer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,6 @@ abstract class _EncointerStore with Store {
return nextPhaseTimestamp! -
phaseDurations[CeremonyPhase.Attesting]! -
phaseDurations[CeremonyPhase.Assigning]!;
default:
return null;
}
}

Expand Down