Skip to content

Commit

Permalink
linter update
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Jul 4, 2024
1 parent cabbd96 commit 1fdb029
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 24 deletions.
2 changes: 0 additions & 2 deletions lib/dashboard/drawer/reset_wallet/view/reset_wallet_menu.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'package:altme/app/app.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/dashboard/drawer/reset_wallet/helper_functions/reset_wallet.dart';
import 'package:altme/l10n/l10n.dart';

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/logger/logger.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:bloc/bloc.dart';
import 'package:decimal/decimal.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/dashboard/src/view/dashboard_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/enterprise/cubit/enterprise_cubit.dart';
import 'package:altme/kyc_verification/kyc_verification.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:altme/wallet/wallet.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

Expand Down
1 change: 0 additions & 1 deletion lib/pin_code/view/delete_my_wallet_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:altme/app/shared/constants/image_strings.dart';
import 'package:altme/app/shared/constants/sizes.dart';
import 'package:altme/app/shared/widget/widget.dart';
import 'package:altme/dashboard/dashboard.dart';
Expand Down
1 change: 1 addition & 0 deletions test/app/shared/alert_message/alert_message_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ void main() {
stateMessage: StateMessage(
messageHandler: ResponseMessage(
message: ResponseString
// ignore: lines_longer_than_80_chars
.RESPONSE_STRING_AN_ERROR_OCCURRED_WHILE_CONNECTING_TO_THE_SERVER,
),
injectedMessage: null,
Expand Down
4 changes: 2 additions & 2 deletions test/app/shared/date/date_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ void main() {
});

test(
'formatDateForCredentialCard returns formatted date for credential card',
() {
'formatDateForCredentialCard returns '
'formatted date for credential card', () {
const timestamp = '1643738400';
expect(UiDate.formatDateForCredentialCard(timestamp), '2022-02-01');
});
Expand Down
9 changes: 5 additions & 4 deletions test/app/view/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ void main() {
);

expect(
App(
themeRepository: themeRepository,
).flavorMode,
FlavorMode.production);
App(
themeRepository: themeRepository,
).flavorMode,
FlavorMode.production,
);
});

// testWidgets('renders SplashPage', (tester) async {
Expand Down
3 changes: 2 additions & 1 deletion test/dashboard/drawer/src/view/drawer_page_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ void main() {
expect(find.text('Self-Sovereign Identity (DID)'), findsOneWidget);
expect(
find.text(
'Manage your Decentralized ID and backup or restore your credentials'),
'Manage your Decentralized ID and backup or restore your credentials',
),
findsOneWidget,
);

Expand Down
24 changes: 12 additions & 12 deletions test/lang/cubit/lang_cubit_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ void main() {
test('emits new state with recorded language locale', () async {
when(() => mockSecureStorageProvider.get(SecureStorageKeys.language))
.thenAnswer((_) async => 'es');
when(() =>
mockSecureStorageProvider.set(SecureStorageKeys.language, any()))
.thenAnswer((_) async {});
when(
() => mockSecureStorageProvider.set(SecureStorageKeys.language, any()),
).thenAnswer((_) async {});

await langCubit.checkLocale();
expect(
Expand All @@ -52,9 +52,9 @@ void main() {
test('returns LanguageType.phone when no recorded language', () async {
when(() => mockSecureStorageProvider.get(SecureStorageKeys.language))
.thenAnswer((_) async => null);
when(() =>
mockSecureStorageProvider.set(SecureStorageKeys.language, any()))
.thenAnswer((_) async {});
when(
() => mockSecureStorageProvider.set(SecureStorageKeys.language, any()),
).thenAnswer((_) async {});

final languageType = await langCubit.getRecordedLanguage();
expect(languageType, LanguageType.phone);
Expand All @@ -80,15 +80,15 @@ void main() {

test('calls secureStorageProvider.set with correct key and value',
() async {
when(() =>
mockSecureStorageProvider.set(SecureStorageKeys.language, any()))
.thenAnswer((_) async {});
when(
() => mockSecureStorageProvider.set(SecureStorageKeys.language, any()),
).thenAnswer((_) async {});

await langCubit.recordLanguage('fr');

verify(() =>
mockSecureStorageProvider.set(SecureStorageKeys.language, 'fr'))
.called(1);
verify(
() => mockSecureStorageProvider.set(SecureStorageKeys.language, 'fr'),
).called(1);
});
});
}

0 comments on commit 1fdb029

Please sign in to comment.