mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 03:06:35 +00:00
[skip ci] remove / move unneeded observers
This commit is contained in:
parent
45e1a4d223
commit
f2d575dc34
1 changed files with 78 additions and 82 deletions
|
@ -117,8 +117,7 @@ class LightningInvoicePage extends BasePage {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
child: Observer(builder: (_) {
|
child: Padding(
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.fromLTRB(24, 120, 24, 0),
|
padding: EdgeInsets.fromLTRB(24, 120, 24, 0),
|
||||||
child: LightningInvoiceForm(
|
child: LightningInvoiceForm(
|
||||||
descriptionController: _descriptionController,
|
descriptionController: _descriptionController,
|
||||||
|
@ -127,12 +126,10 @@ class LightningInvoicePage extends BasePage {
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
lightningInvoicePageViewModel: lightningInvoicePageViewModel,
|
lightningInvoicePageViewModel: lightningInvoicePageViewModel,
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
||||||
bottomSection: Observer(builder: (_) {
|
bottomSection: Column(
|
||||||
return Column(
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.only(top: 12, bottom: 12, right: 6),
|
padding: const EdgeInsets.only(top: 12, bottom: 12, right: 6),
|
||||||
|
@ -167,8 +164,7 @@ class LightningInvoicePage extends BasePage {
|
||||||
Container(child: Center(child: CircularProgressIndicator())));
|
Container(child: Center(child: CircularProgressIndicator())));
|
||||||
}
|
}
|
||||||
late String finalText;
|
late String finalText;
|
||||||
InvoiceSoftLimitsResult limits =
|
InvoiceSoftLimitsResult limits = snapshot.data as InvoiceSoftLimitsResult;
|
||||||
snapshot.data as InvoiceSoftLimitsResult;
|
|
||||||
if (limits.inboundLiquidity == 0) {
|
if (limits.inboundLiquidity == 0) {
|
||||||
finalText = S.of(context).lightning_invoice_min(
|
finalText = S.of(context).lightning_invoice_min(
|
||||||
limits.feePercent.toString(),
|
limits.feePercent.toString(),
|
||||||
|
@ -188,8 +184,7 @@ class LightningInvoicePage extends BasePage {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color:
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -198,7 +193,8 @@ class LightningInvoicePage extends BasePage {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
LoadingPrimaryButton(
|
Observer(builder: (_) {
|
||||||
|
return LoadingPrimaryButton(
|
||||||
text: S.of(context).create_invoice,
|
text: S.of(context).create_invoice,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
|
@ -211,10 +207,10 @@ class LightningInvoicePage extends BasePage {
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
isLoading: lightningInvoicePageViewModel.state is IsExecutingState,
|
isLoading: lightningInvoicePageViewModel.state is IsExecutingState,
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue