Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 77 additions & 73 deletions lib/shared/widgets/add_lightning_invoice_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,89 +30,93 @@ class AddLightningInvoiceWidget extends StatefulWidget {
class _AddLightningInvoiceWidgetState extends State<AddLightningInvoiceWidget> {
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context)!.pleaseEnterLightningInvoiceFor(
widget.amount.toString(),
widget.fiatCode,
widget.fiatAmount,
widget.orderId,
),
style: const TextStyle(
color: AppTheme.textPrimary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 16),
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration(
color: AppTheme.backgroundInput,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.white.withValues(alpha: 0.1)),
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context)!.pleaseEnterLightningInvoiceFor(
widget.amount.toString(),
widget.fiatCode,
widget.fiatAmount,
widget.orderId,
),
style: const TextStyle(
color: AppTheme.textPrimary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
child: TextFormField(
key: const Key('invoiceTextField'),
controller: widget.controller,
style: const TextStyle(color: AppTheme.textPrimary),
decoration: InputDecoration(
labelText: S.of(context)!.lightningInvoice,
labelStyle: const TextStyle(color: AppTheme.textSecondary),
hintText: S.of(context)!.enterInvoiceHere,
hintStyle: const TextStyle(color: AppTheme.textSecondary),
border: InputBorder.none,
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
alignLabelWithHint: true,
const SizedBox(height: 16),
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration(
color: AppTheme.backgroundInput,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.white.withValues(alpha: 0.1)),
),
child: TextFormField(
key: const Key('invoiceTextField'),
controller: widget.controller,
style: const TextStyle(color: AppTheme.textPrimary),
decoration: InputDecoration(
labelText: S.of(context)!.lightningInvoice,
labelStyle: const TextStyle(color: AppTheme.textSecondary),
hintText: S.of(context)!.enterInvoiceHere,
hintStyle: const TextStyle(color: AppTheme.textSecondary),
border: InputBorder.none,
contentPadding:
const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
alignLabelWithHint: true,
),
maxLines: 6,
),
maxLines: 6,
),
),
const SizedBox(height: 16),
Row(
children: [
Expanded(
child: TextButton(
key: const Key('cancelInvoiceButton'),
onPressed: widget.onCancel,
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
const SizedBox(height: 16),
Row(
children: [
Expanded(
child: TextButton(
key: const Key('cancelInvoiceButton'),
onPressed: widget.onCancel,
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
textAlign: TextAlign.center,
),
),
),
const SizedBox(width: 12),
Expanded(
child: ElevatedButton(
key: const Key('submitInvoiceButton'),
onPressed: widget.onSubmit,
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
const SizedBox(width: 12),
Expanded(
child: ElevatedButton(
key: const Key('submitInvoiceButton'),
onPressed: widget.onSubmit,
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(
horizontal: 12, vertical: 12),
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
),
child: Text(
S.of(context)!.submit,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
child: Text(
S.of(context)!.submit,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
),
),
],
),
],
],
),
],
),
);
}
}
Loading