Skip to content

Commit

Permalink
chore: add qr folder (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-tbd authored Aug 15, 2024
1 parent ba16924 commit 2d61c65
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/features/account/account_page.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:didpay/features/did/did_qr_tabs.dart';
import 'package:didpay/features/feature_flags/feature_flag.dart';
import 'package:didpay/features/feature_flags/feature_flags_notifier.dart';
import 'package:didpay/features/pfis/pfi.dart';
import 'package:didpay/features/pfis/pfis_add_page.dart';
import 'package:didpay/features/pfis/pfis_notifier.dart';
import 'package:didpay/features/qr/qr_tabs.dart';
import 'package:didpay/features/vcs/vcs_notifier.dart';
import 'package:didpay/l10n/app_localizations.dart';
import 'package:didpay/shared/modal/modal_manage_item.dart';
Expand Down Expand Up @@ -97,7 +97,7 @@ class AccountPage extends HookConsumerWidget {
icon: const Icon(Icons.qr_code, size: Grid.sm),
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => DidQrTabs(dap: dap),
builder: (_) => QrTabs(dap: dap),
fullscreenDialog: true,
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/features/dap/dap_qr_tile.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:didpay/features/device/device_info_service.dart';
import 'package:didpay/features/did/did_qr_tabs.dart';
import 'package:didpay/features/qr/qr_tabs.dart';
import 'package:didpay/l10n/app_localizations.dart';
import 'package:didpay/shared/snackbar/snackbar_service.dart';
import 'package:didpay/shared/theme/grid.dart';
Expand Down Expand Up @@ -61,7 +61,7 @@ class DapQrTile extends HookConsumerWidget {
) async {
final qrValue = await Navigator.of(context).push<String>(
MaterialPageRoute(
builder: (context) => DidQrTabs(dap: Loc.of(context).placeholderDap),
builder: (context) => QrTabs(dap: Loc.of(context).placeholderDap),
),
);

Expand Down
4 changes: 2 additions & 2 deletions lib/features/did/did_form.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:didpay/features/did/did_qr_tile.dart';
import 'package:didpay/features/qr/qr_tile.dart';
import 'package:didpay/l10n/app_localizations.dart';
import 'package:didpay/shared/next_button.dart';
import 'package:didpay/shared/theme/grid.dart';
Expand Down Expand Up @@ -49,7 +49,7 @@ class DidForm extends HookConsumerWidget {
),
),
),
DidQrTile(didTextController: textController),
QrTile(didTextController: textController),
NextButton(
onPressed: () async => onSubmit(textController.text),
title: buttonTitle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import 'package:flutter/services.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart';

class DidQrCodePage extends HookConsumerWidget {
class QrCodePage extends HookConsumerWidget {
final String dap;
const DidQrCodePage({required this.dap, super.key});
const QrCodePage({required this.dap, super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:mobile_scanner/mobile_scanner.dart';

class DidQrScanPage extends HookWidget {
const DidQrScanPage({super.key});
class QrScanPage extends HookWidget {
const QrScanPage({super.key});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import 'package:didpay/features/did/did_qr_code_page.dart';
import 'package:didpay/features/did/did_qr_scan_page.dart';
import 'package:didpay/features/qr/qr_code_page.dart';
import 'package:didpay/features/qr/qr_scan_page.dart';
import 'package:didpay/l10n/app_localizations.dart';
import 'package:didpay/shared/theme/grid.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';

class DidQrTabs extends HookWidget {
class QrTabs extends HookWidget {
final String dap;

const DidQrTabs({required this.dap, super.key});
const QrTabs({required this.dap, super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -27,8 +27,8 @@ class DidQrTabs extends HookWidget {
controller: tabController,
physics: const NeverScrollableScrollPhysics(),
children: [
const DidQrScanPage(),
DidQrCodePage(dap: dap),
const QrScanPage(),
QrCodePage(dap: dap),
],
),
Positioned(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:didpay/features/device/device_info_service.dart';
import 'package:didpay/features/did/did_qr_tabs.dart';
import 'package:didpay/features/qr/qr_tabs.dart';
import 'package:didpay/l10n/app_localizations.dart';
import 'package:didpay/shared/snackbar/snackbar_service.dart';
import 'package:didpay/shared/theme/grid.dart';
Expand All @@ -8,10 +8,10 @@ import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:web5/web5.dart';

class DidQrTile extends HookConsumerWidget {
class QrTile extends HookConsumerWidget {
final TextEditingController didTextController;

const DidQrTile({
const QrTile({
required this.didTextController,
super.key,
});
Expand Down Expand Up @@ -62,7 +62,7 @@ class DidQrTile extends HookConsumerWidget {
) async {
final qrValue = await Navigator.of(context).push<String>(
MaterialPageRoute(
builder: (context) => DidQrTabs(dap: Loc.of(context).placeholderDap),
builder: (context) => QrTabs(dap: Loc.of(context).placeholderDap),
),
);

Expand Down
4 changes: 2 additions & 2 deletions test/features/account/account_page_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:didpay/features/account/account_page.dart';
import 'package:didpay/features/did/did_qr_tabs.dart';
import 'package:didpay/features/feature_flags/feature_flags_notifier.dart';
import 'package:didpay/features/pfis/pfis_notifier.dart';
import 'package:didpay/features/qr/qr_tabs.dart';
import 'package:didpay/features/vcs/vcs_notifier.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
Expand Down Expand Up @@ -70,7 +70,7 @@ void main() {

await tester.tap(find.widgetWithIcon(IconButton, Icons.qr_code));
await tester.pumpAndSettle();
expect(find.byType(DidQrTabs), findsOneWidget);
expect(find.byType(QrTabs), findsOneWidget);
});
});
}

0 comments on commit 2d61c65

Please sign in to comment.