mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
improved scan screen [cw-1507] (#3281)
* (wip) new scan screen * improved scan screen * fixes for ui * switch to modal sheet * add urqr (cupcake) progress indicator * fixes * Update lib/new-ui/pages/scan_page.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -87,7 +87,7 @@ class AnimatedURPage extends BasePage {
|
||||
try {
|
||||
switch (urQrType) {
|
||||
case "ur:xmr-txunsigned": // ur:xmr-txsigned
|
||||
final ur = await presentQRScanner(context);
|
||||
final ur = await presentQRScanner(context, showManualInput: false);
|
||||
if (ur == null) return;
|
||||
final result =
|
||||
await monero!.commitTransactionUR(animatedURmodel.wallet, ur);
|
||||
@@ -96,7 +96,7 @@ class AnimatedURPage extends BasePage {
|
||||
}
|
||||
break;
|
||||
case "ur:xmr-output": // xmr-keyimage
|
||||
final ur = await presentQRScanner(context);
|
||||
final ur = await presentQRScanner(context, showManualInput: false);
|
||||
if (ur == null) return;
|
||||
final result =
|
||||
await monero!.importKeyImagesUR(animatedURmodel.wallet, ur);
|
||||
@@ -105,7 +105,7 @@ class AnimatedURPage extends BasePage {
|
||||
}
|
||||
break;
|
||||
case "ur:psbt": // psbt
|
||||
final ur = await presentQRScanner(context);
|
||||
final ur = await presentQRScanner(context, showManualInput: false);
|
||||
if (ur == null) return;
|
||||
await bitcoin!
|
||||
.commitPsbtUR(animatedURmodel.wallet, ur.trim().split("\n"));
|
||||
|
||||
@@ -26,6 +26,7 @@ class ListItemRegularRowWidget extends StatelessWidget {
|
||||
this.copyableText,
|
||||
this.leadingIconErrorWidget,
|
||||
this.leadingIconSize,
|
||||
this.iconColor
|
||||
});
|
||||
|
||||
final String keyValue;
|
||||
@@ -46,6 +47,7 @@ class ListItemRegularRowWidget extends StatelessWidget {
|
||||
final String? copyableText;
|
||||
final Widget? leadingIconErrorWidget;
|
||||
final double? leadingIconSize;
|
||||
final Color? iconColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -85,6 +87,9 @@ class ListItemRegularRowWidget extends StatelessWidget {
|
||||
width: leadingIconSize ?? 24,
|
||||
height: leadingIconSize ?? 24,
|
||||
errorWidget: leadingIconErrorWidget,
|
||||
colorFilter: iconColor == null
|
||||
? null
|
||||
: ColorFilter.mode(iconColor!, BlendMode.srcIn),
|
||||
)),
|
||||
Flexible(
|
||||
child: Column(
|
||||
|
||||
@@ -109,6 +109,7 @@ class NewListSections extends StatelessWidget {
|
||||
bottomWidget: item.bottomWidget,
|
||||
leadingIconErrorWidget: item.leadingIconErrorWidget,
|
||||
leadingIconSize: item.leadingIconSize,
|
||||
iconColor: item.iconColor,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user