Skip to content
Snippets Groups Projects
Commit 0e41419b authored by vjrj's avatar vjrj
Browse files

Fix for #25 and #26

parent a186bfb0
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ class CardTerminalScreen extends StatelessWidget { ...@@ -20,7 +20,7 @@ class CardTerminalScreen extends StatelessWidget {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: smallScreen(context) ? 210 : 250, height: smallScreen(context) ? 212 : 252,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
gradient: const LinearGradient( gradient: const LinearGradient(
...@@ -57,33 +57,46 @@ class CardTerminalScreen extends StatelessWidget { ...@@ -57,33 +57,46 @@ class CardTerminalScreen extends StatelessWidget {
offlineWidget: CardTerminalStatus(online: false), offlineWidget: CardTerminalStatus(online: false),
child: CardTerminalStatus(online: true)), child: CardTerminalStatus(online: true)),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text(amount, child: Flexible(
textAlign: TextAlign.right, child: Text(
style: TextStyle( amount,
fontFamily: 'LCDMono', textAlign: TextAlign.right,
color: Colors.white, style: TextStyle(
fontSize: 28, fontFamily: 'LCDMono',
shadows: <Shadow>[ color: Colors.white,
Shadow( fontSize: amount.length < 5
offset: const Offset(1, 1), ? 28
blurRadius: 3, : amount.length < 10
color: Colors.black.withOpacity(0.4), ? 20
), : amount.length < 15
], ? 14
))) : 12,
shadows: <Shadow>[
Shadow(
offset: const Offset(1, 1),
blurRadius: 3,
color: Colors.black.withOpacity(0.4),
),
],
//softWrap: true, // Agrega esta línea para permitir que el texto se envuelva a la siguiente línea
),
),
),
),
])), ])),
Expanded( Expanded(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
if (!amount.contains('+')) if (!amount.contains('+'))
QrImage( QrImage(
data: getQrUri( data: getQrUri(
SharedPreferencesHelper().getPubKey(), amount), pubKey: SharedPreferencesHelper().getPubKey(),
size: locale: context.locale.toLanguageTag(),
smallScreen(context) ? 100.0 : 140.0 amount: amount),
//: (smallScreen(context) ? 120.0 : 160.0), size: smallScreen(context) ? 100.0 : 140.0
//: (smallScreen(context) ? 120.0 : 160.0),
) )
])), ])),
Container( Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
...@@ -103,27 +116,24 @@ class CardTerminalScreen extends StatelessWidget { ...@@ -103,27 +116,24 @@ class CardTerminalScreen extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(
child: TextField( horizontal: 10, vertical: 5),
maxLines: amount.isNotEmpty ? 2 : 2, child: Text.rich(
style: const TextStyle( TextSpan(
fontFamily: 'Roboto Mono', children: <TextSpan>[
color: Colors.white, TextSpan(
fontSize: 14, text: amount.isNotEmpty
), ? tr('show_qr_to_client_amount')
decoration: InputDecoration( : tr('show_qr_to_client'),
border: InputBorder.none, style: TextStyle(
hintText: amount.isNotEmpty fontFamily: 'Roboto Mono',
? tr('show_qr_to_client_amount') color: Colors.grey,
: tr('show_qr_to_client'), fontSize: smallScreen(context) ? 11 : 14,
hintStyle: TextStyle( ),
fontFamily: 'Roboto Mono', ),
color: Colors.grey, ],
fontSize: smallScreen(context) ? 11 : 14,
), ),
), )),
),
),
) )
], ],
), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment