[skip ci] remove / move unneeded observers

This commit is contained in:
Matthew Fosse 2024-06-21 14:17:39 -07:00
parent 45e1a4d223
commit f2d575dc34

View file

@ -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,
),
],
);
}),
],
),
),
),
),