mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
Fixate QR background and foreground colors in all themes
This commit is contained in:
@@ -165,14 +165,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
||||
.color!
|
||||
)
|
||||
),
|
||||
child: QrImage(
|
||||
data: trade.inputAddress ?? fetchingLabel,
|
||||
backgroundColor: Colors.transparent,
|
||||
foregroundColor: Theme.of(context)
|
||||
.accentTextTheme!
|
||||
.subtitle2!
|
||||
.color!,
|
||||
),
|
||||
child: QrImage(data: trade.inputAddress ?? fetchingLabel),
|
||||
)))),
|
||||
Spacer(flex: 3)
|
||||
]),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
|
||||
class FullscreenQRPage extends BasePage {
|
||||
@@ -69,14 +68,10 @@ class FullscreenQRPage extends BasePage {
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1.0,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
padding: EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 3, color: Theme.of(context).accentTextTheme!.headline2!.backgroundColor!)),
|
||||
child: QrImage(
|
||||
data: qrData,
|
||||
backgroundColor: isLight ? Colors.transparent : Colors.black,
|
||||
foregroundColor: Theme.of(context).accentTextTheme!.headline2!.backgroundColor!,
|
||||
),
|
||||
child: QrImage(data: qrData),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -5,18 +5,14 @@ class QrImage extends StatelessWidget {
|
||||
QrImage({
|
||||
required this.data,
|
||||
this.size = 100.0,
|
||||
this.backgroundColor,
|
||||
this.foregroundColor = Colors.black,
|
||||
this.version = 9, // Previous value: 7 something happened after flutter upgrade monero wallets addresses are longer than ver. 7 ???
|
||||
this.errorCorrectionLevel = qr.QrErrorCorrectLevel.L,
|
||||
});
|
||||
|
||||
final Color? backgroundColor;
|
||||
final double size;
|
||||
final String data;
|
||||
final int version;
|
||||
final int errorCorrectionLevel;
|
||||
final Color foregroundColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -25,7 +21,8 @@ class QrImage extends StatelessWidget {
|
||||
errorCorrectionLevel: errorCorrectionLevel,
|
||||
version: version,
|
||||
size: size,
|
||||
foregroundColor: foregroundColor,
|
||||
foregroundColor: Colors.black,
|
||||
backgroundColor: Colors.white,
|
||||
padding: EdgeInsets.zero,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -89,11 +89,7 @@ class QRWidget extends StatelessWidget {
|
||||
color: Theme.of(context).accentTextTheme!.headline2!.backgroundColor!,
|
||||
),
|
||||
),
|
||||
child: QrImage(
|
||||
data: addressListViewModel.uri.toString(),
|
||||
backgroundColor: isLight ? Colors.transparent : Colors.black,
|
||||
foregroundColor: Theme.of(context).accentTextTheme!.headline2!.backgroundColor!,
|
||||
),
|
||||
child: QrImage(data: addressListViewModel.uri.toString()),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user