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