feat(ui): add app logo to qr code (#2072)

fix(ui): use high instead of low error correction for QR codes
This commit is contained in:
cyan 2025-06-17 00:32:11 +02:00 committed by GitHub
parent 85d3e727e2
commit 17d99e5451
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

BIN
assets/images/qr-cake.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/wallet_type_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:qr_flutter/qr_flutter.dart' as qr; import 'package:qr_flutter/qr_flutter.dart' as qr;
@ -8,7 +9,7 @@ class QrImage extends StatelessWidget {
this.backgroundColor = Colors.white, this.backgroundColor = Colors.white,
this.size = 100.0, this.size = 100.0,
this.version, this.version,
this.errorCorrectionLevel = qr.QrErrorCorrectLevel.L, this.errorCorrectionLevel = qr.QrErrorCorrectLevel.H,
}); });
final double size; final double size;
@ -28,6 +29,7 @@ class QrImage extends StatelessWidget {
foregroundColor: foregroundColor, foregroundColor: foregroundColor,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
embeddedImage: AssetImage('assets/images/qr-cake.png'),
); );
} }
} }