Skip to content

Commit

Permalink
Convert payee info dialog to fullscreen page UI
Browse files Browse the repository at this point in the history
Closes #215
  • Loading branch information
erdemyerebasmaz committed Oct 25, 2024
1 parent b2fd982 commit 9708b5c
Show file tree
Hide file tree
Showing 4 changed files with 197 additions and 260 deletions.
6 changes: 6 additions & 0 deletions lib/app/routes/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import 'package:l_breez/routes/refund/refund_page.dart';
import 'package:l_breez/routes/security/lock_screen.dart';
import 'package:l_breez/routes/security/secured_page.dart';
import 'package:l_breez/routes/security/security_page.dart';
import 'package:l_breez/routes/send_payment/enter_payment_info/enter_payment_info_page.dart';
import 'package:l_breez/routes/splash/splash_page.dart';
import 'package:l_breez/widgets/route.dart';
import 'package:logging/logging.dart';
Expand Down Expand Up @@ -116,6 +117,11 @@ Route? onGenerateRoute({
),
settings: settings,
);
case EnterPaymentInfoPage.routeName:
return FadeInRoute(
builder: (_) => const EnterPaymentInfoPage(),
settings: settings,
);
case SendChainSwapPage.routeName:
return FadeInRoute(
builder: (_) => BlocProvider(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:l_breez/cubit/account/account_cubit.dart';
import 'package:l_breez/routes/chainswap/send/send_chainswap_page.dart';
import 'package:l_breez/routes/home/widgets/bottom_actions_bar/bottom_action_item_image.dart';
import 'package:l_breez/routes/home/widgets/bottom_actions_bar/enter_payment_info_dialog.dart';
import 'package:l_breez/routes/send_payment/enter_payment_info/enter_payment_info_page.dart';
import 'package:l_breez/theme/theme.dart';

class SendOptionsBottomSheet extends StatefulWidget {
Expand Down Expand Up @@ -38,7 +38,11 @@ class _SendOptionsBottomSheetState extends State<SendOptionsBottomSheet> {
texts.bottom_action_bar_paste_invoice,
style: bottomSheetTextStyle,
),
onTap: () => _showEnterPaymentInfoDialog(context, widget.firstPaymentItemKey),
onTap: () {
final navigatorState = Navigator.of(context);
navigatorState.pop();
navigatorState.pushNamed(EnterPaymentInfoPage.routeName);
},
),
Divider(
height: 0.0,
Expand Down Expand Up @@ -66,19 +70,4 @@ class _SendOptionsBottomSheetState extends State<SendOptionsBottomSheet> {
},
);
}

Future<void> _showEnterPaymentInfoDialog(
BuildContext context,
GlobalKey<State<StatefulWidget>> firstPaymentItemKey,
) async {
Navigator.of(context).pop();
await showDialog(
useRootNavigator: false,
context: context,
barrierDismissible: false,
builder: (_) => EnterPaymentInfoDialog(
paymentItemKey: firstPaymentItemKey,
),
);
}
}
Loading

0 comments on commit 9708b5c

Please sign in to comment.