mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-22 02:34:59 +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,
|
||||
child: Observer(builder: (_) {
|
||||
return Padding(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(24, 120, 24, 0),
|
||||
child: LightningInvoiceForm(
|
||||
descriptionController: _descriptionController,
|
||||
|
@ -127,12 +126,10 @@ class LightningInvoicePage extends BasePage {
|
|||
formKey: _formKey,
|
||||
lightningInvoicePageViewModel: lightningInvoicePageViewModel,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
||||
bottomSection: Observer(builder: (_) {
|
||||
return Column(
|
||||
bottomSection: Column(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 12, bottom: 12, right: 6),
|
||||
|
@ -167,8 +164,7 @@ class LightningInvoicePage extends BasePage {
|
|||
Container(child: Center(child: CircularProgressIndicator())));
|
||||
}
|
||||
late String finalText;
|
||||
InvoiceSoftLimitsResult limits =
|
||||
snapshot.data as InvoiceSoftLimitsResult;
|
||||
InvoiceSoftLimitsResult limits = snapshot.data as InvoiceSoftLimitsResult;
|
||||
if (limits.inboundLiquidity == 0) {
|
||||
finalText = S.of(context).lightning_invoice_min(
|
||||
limits.feePercent.toString(),
|
||||
|
@ -188,8 +184,7 @@ class LightningInvoicePage extends BasePage {
|
|||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color:
|
||||
Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: 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,
|
||||
onPressed: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
|
@ -211,10 +207,10 @@ class LightningInvoicePage extends BasePage {
|
|||
color: Theme.of(context).primaryColor,
|
||||
textColor: Colors.white,
|
||||
isLoading: lightningInvoicePageViewModel.state is IsExecutingState,
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue