Skip to content

Commit

Permalink
Use qr code generator screen in the receive screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedHanafy725 committed Sep 26, 2024
1 parent 312ac0b commit d8b873f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/lib/screens/wallets/receive.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:threebotlogin/models/wallet.dart';
import 'package:threebotlogin/screens/qr_code_screen.dart';

enum ChainType {
Stellar,
Expand Down Expand Up @@ -148,7 +149,21 @@ class _WalletReceiveScreenState extends State<WalletReceiveScreen> {
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10),
child: ElevatedButton(
onPressed: () {
//TODO: Show qr code
//TODO: Validate inputs first
final quaryParams = {'amount': amountController.text};
if (chainType == ChainType.Stellar) {
quaryParams['message'] = memoController.text;
}
final uri = Uri(
scheme: 'TFT',
path: toController.text,
queryParameters: quaryParams);
final codeMessage = uri.toString();
showDialog(
context: context,
builder: (context) =>
GenerateQRCodeScreen(message: codeMessage),
);
},
style: ElevatedButton.styleFrom(),
child: SizedBox(
Expand Down

0 comments on commit d8b873f

Please sign in to comment.