Skip to content

Commit

Permalink
Merge pull request #641 from breez/619-bad-ui-when-sending
Browse files Browse the repository at this point in the history
remove SingleChildScrollView to behave like breezmobile
  • Loading branch information
ubbabeck authored Oct 4, 2023
2 parents 17c1ede + 35d91ad commit f10bb94
Showing 1 changed file with 50 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ class EnterPaymentInfoDialogState extends State<EnterPaymentInfoDialog> {
final texts = context.texts();

return AlertDialog(
titlePadding: const EdgeInsets.fromLTRB(24.0, 16.0, 0.0, 8),
titlePadding: const EdgeInsets.fromLTRB(24.0, 22.0, 0.0, 16.0),
title: Text(texts.payment_info_dialog_title),
contentPadding: const EdgeInsets.symmetric(horizontal: 24, vertical: 4),
actionsPadding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4),
contentPadding: const EdgeInsets.fromLTRB(24.0, 8.0, 24.0, 24.0),
content: _buildPaymentInfoForm(context),
actions: _buildActions(context),
);
Expand Down Expand Up @@ -75,61 +74,59 @@ class EnterPaymentInfoDialogState extends State<EnterPaymentInfoDialog> {
width: MediaQuery.of(context).size.width,
child: Form(
key: _formKey,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextFormField(
decoration: InputDecoration(
labelText: texts.payment_info_dialog_hint,
suffixIcon: IconButton(
padding: const EdgeInsets.only(top: 21.0),
alignment: Alignment.bottomRight,
icon: Image(
image: const AssetImage("src/icon/qr_scan.png"),
color: themeData.primaryIconTheme.color,
width: 24.0,
height: 24.0,
),
tooltip: texts.payment_info_dialog_barcode,
onPressed: () => _scanBarcode(context),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextFormField(
decoration: InputDecoration(
labelText: texts.payment_info_dialog_hint,
suffixIcon: IconButton(
padding: const EdgeInsets.only(top: 21.0),
alignment: Alignment.bottomRight,
icon: Image(
image: const AssetImage("src/icon/qr_scan.png"),
color: themeData.primaryIconTheme.color,
width: 24.0,
height: 24.0,
),
tooltip: texts.payment_info_dialog_barcode,
onPressed: () => _scanBarcode(context),
),
focusNode: _paymentInfoFocusNode,
controller: _paymentInfoController,
style: TextStyle(
color: themeData.primaryTextTheme.headlineMedium!.color,
),
validator: (value) {
if (_validatorErrorMessage.isNotEmpty) {
return _validatorErrorMessage;
}
return null;
},
),
_scannerErrorMessage.isNotEmpty
? Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
_scannerErrorMessage,
style: theme.validatorStyle,
),
)
: const SizedBox(),
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
texts.payment_info_dialog_hint_expanded,
style: theme.FieldTextStyle.labelStyle.copyWith(
fontSize: 13.0,
color:
themeData.isLightTheme ? theme.BreezColors.grey[500] : theme.BreezColors.white[200],
),
focusNode: _paymentInfoFocusNode,
controller: _paymentInfoController,
style: TextStyle(
color: themeData.primaryTextTheme.headlineMedium!.color,
),
validator: (value) {
if (_validatorErrorMessage.isNotEmpty) {
return _validatorErrorMessage;
}
return null;
},
),
_scannerErrorMessage.isNotEmpty
? Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
_scannerErrorMessage,
style: theme.validatorStyle,
),
)
: const SizedBox(),
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
texts.payment_info_dialog_hint_expanded,
style: theme.FieldTextStyle.labelStyle.copyWith(
fontSize: 13.0,
color:
themeData.isLightTheme ? theme.BreezColors.grey[500] : theme.BreezColors.white[200],
),
),
],
),
),
],
),
),
),
Expand Down

0 comments on commit f10bb94

Please sign in to comment.