Ensure widget is updated when endpoint changes

This commit is contained in:
vishnukvmd 2024-04-03 17:34:45 +05:30
parent ee33a3229f
commit 9d7a342aa9
2 changed files with 6 additions and 4 deletions

View file

@ -165,7 +165,9 @@ class _LandingPageWidgetState extends State<LandingPageWidget> {
),
),
),
const DeveloperSettingsWidget(),
// const DeveloperSettingsWidget() does not refresh when the endpoint is changed
// ignore: prefer_const_constructors
DeveloperSettingsWidget(),
const Padding(
padding: EdgeInsets.all(20),
),

View file

@ -14,9 +14,9 @@ class DeveloperSettingsWidget extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(bottom: 20),
child: Text(
S.of(context).customEndpoint(
"${endpointURI.host}:${endpointURI.port}",
),
S
.of(context)
.customEndpoint("${endpointURI.host}:${endpointURI.port}"),
style: Theme.of(context).textTheme.bodySmall,
),
);