Skip to content

Commit

Permalink
fix: Remove linter problems
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Jun 5, 2024
1 parent 2a7e782 commit 5c8bcef
Show file tree
Hide file tree
Showing 45 changed files with 953 additions and 552 deletions.
2 changes: 1 addition & 1 deletion lib/app/shared/extension/extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export 'bigint_extension.dart';
export 'double_extension.dart';
export 'iterable_extension.dart';
export 'string_extension.dart';
export 'unit8List_extension.dart';
export 'unit8list_extension.dart';
8 changes: 4 additions & 4 deletions lib/app/shared/widget/button/my_elevated_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ ButtonStyle elevatedStyleFrom({
GestureTapCallback? onPressed,
}) {
return ButtonStyle(
elevation: MaterialStateProperty.all(elevation),
padding: MaterialStateProperty.all(
elevation: WidgetStateProperty.all(elevation),
padding: WidgetStateProperty.all(
EdgeInsets.symmetric(vertical: verticalSpacing),
),
backgroundColor: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(
onPressed == null
? Theme.of(context).colorScheme.disabledBgColor
: backgroundColor ?? Theme.of(context).colorScheme.primary,
),
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(borderRadius),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/app/shared/widget/checkbox_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CheckboxItem extends StatelessWidget {
children: [
Checkbox(
value: value,
fillColor: MaterialStateProperty.all(
fillColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.primary,
),
shape: const RoundedRectangleBorder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CryptoAccountItem extends StatelessWidget {
horizontalTitleGap: 0,
leading: Checkbox(
value: isSelected,
fillColor: MaterialStateProperty.all(
fillColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.inversePrimary,
),
checkColor: Theme.of(context).colorScheme.primary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AdvanceSettingsRadioItem extends StatelessWidget {
horizontalTitleGap: 0,
leading: Checkbox(
value: isSelected,
fillColor: MaterialStateProperty.all(
fillColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.inversePrimary,
),
checkColor: Theme.of(context).colorScheme.primary,
Expand Down
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,10 +1,8 @@
import 'package:altme/app/app.dart';
import 'package:altme/credentials/credentials.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:altme/theme/theme.dart';
import 'package:altme/wallet/wallet.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
Expand Up @@ -32,7 +32,7 @@ class SelectBoxAccountItem extends StatelessWidget {
horizontalTitleGap: 0,
leading: Checkbox(
value: isSelected,
fillColor: MaterialStateProperty.all(
fillColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.primary,
),
checkColor: Theme.of(context).colorScheme.onPrimary,
Expand Down
7 changes: 5 additions & 2 deletions lib/dashboard/qr_code/qr_code_scan/view/qr_camera_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ class QrCameraView extends StatefulWidget {
});

final String title;
final Function(InputImage inputImage) onImage;
final dynamic Function(InputImage inputImage) onImage;
final VoidCallback? onCameraFeedReady;
final VoidCallback? onDetectorViewModeChanged;
final Function(CameraLensDirection direction)? onCameraLensDirectionChanged;
final dynamic Function(CameraLensDirection direction)?
onCameraLensDirectionChanged;
final CameraLensDirection initialCameraLensDirection;

@override
Expand All @@ -34,7 +35,9 @@ class _QrCameraViewState extends State<QrCameraView> {
static List<CameraDescription> _cameras = [];
CameraController? _controller;
int _cameraIndex = -1;
// ignore: unused_field
double _currentZoomLevel = 1;
// ignore: unused_field
double _minAvailableZoom = 1;
// ignore: unused_field
double _maxAvailableZoom = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SelectNetworkFeeItem extends StatelessWidget {
horizontalTitleGap: 0,
leading: Checkbox(
value: isSelected,
fillColor: MaterialStateProperty.all(
fillColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.inversePrimary,
),
checkColor: Theme.of(context).colorScheme.primary,
Expand Down
7 changes: 3 additions & 4 deletions 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/splash/cubit/splash_cubit.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

Expand Down Expand Up @@ -162,12 +161,12 @@ class _DashboardViewState extends State<DashboardView> {
.helpCenterOptions
.displayChatSupport;

return WillPopScope(
onWillPop: () async {
return PopScope(
canPop: false,
onPopInvoked: (_) async {
if (scaffoldKey.currentState!.isDrawerOpen) {
Navigator.of(context).pop();
}
return false;
},
child: BasePage(
scrollView: false,
Expand Down
7 changes: 3 additions & 4 deletions lib/dashboard/user_pin/view/user_pin_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class UserPinPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (context) =>
PinCodeViewCubit(),
create: (context) => PinCodeViewCubit(),
child: UserPinView(
onCancel: onCancel,
onProceed: onProceed,
Expand Down Expand Up @@ -81,8 +80,8 @@ class _UserPinViewState extends State<UserPinView> {
final l10n = context.l10n;
return BlocBuilder<ProfileCubit, ProfileState>(
builder: (context, state) {
return WillPopScope(
onWillPop: () async => false,
return PopScope(
canPop: false,
child: BasePage(
backgroundColor: Theme.of(context).colorScheme.background,
scrollView: false,
Expand Down
2 changes: 1 addition & 1 deletion lib/onboarding/wallet_ready/view/wallet_ready_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class _WalletReadyViewState extends State<WalletReadyView> {
scale: 1.3,
child: Checkbox(
value: state.isAgreeWithTerms,
fillColor: MaterialStateProperty.all(
fillColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.primary,
),
materialTapTargetSize:
Expand Down
12 changes: 7 additions & 5 deletions lib/pin_code/cubit/pin_code_view_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PinCodeViewCubit extends Cubit<PinCodeViewState> {
final loginAttemptCount = state.loginAttemptCount + 1;
final loginAttemptsRemaining =
totalPermitedLoginAttempt - state.loginAttemptCount - 1;
bool allowAction = true;
const allowAction = true;
// if (loginAttemptCount >= totalPermitedLoginAttempt) {
// allowAction = false;
// _startLockTimer();
Expand Down Expand Up @@ -124,10 +124,12 @@ class PinCodeViewCubit extends Cubit<PinCodeViewState> {
return;
}
}
emit(state.copyWith(
isPinCodeValid: true,
enteredPasscode: passCode,
));
emit(
state.copyWith(
isPinCodeValid: true,
enteredPasscode: passCode,
),
);

// on new pincode
// void _onPasscodeEntered(String enteredPasscode) {
Expand Down
22 changes: 11 additions & 11 deletions lib/pin_code/view/confirm_pin_code_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ class _ConfirmPinCodeViewState extends State<ConfirmPinCodeView> {
backgroundColor: Theme.of(context).colorScheme.background,
body: PinCodeWidget(
title: l10n.confirmYourPinCode,
header: widget.isFromOnboarding
? MStepper(
step: 1,
totalStep: byPassScreen ? 2 : 3,
)
: null,
deleteButton: Text(
l10n.delete,
style: Theme.of(context).textTheme.labelLarge,
),
cancelButton: Text(
header: widget.isFromOnboarding
? MStepper(
step: 1,
totalStep: byPassScreen ? 2 : 3,
)
: null,
deleteButton: Text(
l10n.delete,
style: Theme.of(context).textTheme.labelLarge,
),
cancelButton: Text(
l10n.cancel,
style: Theme.of(context).textTheme.labelLarge,
),
Expand Down
2 changes: 0 additions & 2 deletions lib/pin_code/view/delete_my_wallet_page.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
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/credentials/cubit/credentials_cubit.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';

class DeleteMyWalletPage extends StatelessWidget {
const DeleteMyWalletPage({super.key});
Expand Down
5 changes: 2 additions & 3 deletions lib/pin_code/view/pin_code_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import 'package:altme/app/app.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:altme/pin_code/pin_code.dart';
Expand Down Expand Up @@ -82,8 +81,8 @@ class _PinCodeViewState extends State<PinCodeView> {
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return WillPopScope(
onWillPop: () async => !widget.restrictToBack,
return PopScope(
canPop: !widget.restrictToBack,
child: BasePage(
backgroundColor: Theme.of(context).colorScheme.background,
title: '',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// ignore_for_file: prefer_const_constructors
import 'dart:convert';

import 'package:secure_jwt_signer/secure_jwt_signer.dart';
import 'package:test/test.dart';

void main() {
group('SecureJwtSigner', () {
test('can be instantiated', () {
expect(SecureJwtSigner(), isNotNull);
expect(const SecureJwtSigner(), isNotNull);
});
});
}
Loading

0 comments on commit 5c8bcef

Please sign in to comment.