flutter_dev_setup library

A developer setup screen: find dev servers on the local network, switch the API base URL at runtime, and keep the choice across launches.

Classes

DevServer
A server that answered the health check, or an address saved by hand.
DevServerDiscovery
Finds dev servers on the subnet this device is joined to.
DevServerEntry
A row in the server list, with the developer's own annotations.
DevServerScanner
The network side of the screen, behind an interface so it can be faked.
DevSetup
Entry points for app bootstrap.
DevSetupController
State and behaviour behind DevSetupScreen, free of any widget or navigation concerns so it can be driven directly in tests.
DevSetupScreen
Lets a developer pick which server the app talks to: the default, one found on the local network, or one saved by hand.
DevSetupStore
Everything the screen remembers, in SharedPreferences.
DevSetupStrings
Every piece of text the screen shows, overridable for localisation.
DevSetupTheme
Colours and text for the screen. Pass your app's tokens to blend it in.
DiscoveryConfig
How a dev server is recognised and how hard to look for one.
ForgetServer
NameDialogResult
RenameServer
An empty label clears the name.
ScanSummary

Functions

devShape(double radius, {BorderSide side = BorderSide.none}) → ContinuousRectangleBorder
Continuous corners cut about half as deep as circular ones at the same radius, so radii here run larger than their rounded-rect equivalents — but past half the element's own height the path self-intersects and grows tabs out of the sides. Every call site sets its radius against what it wraps.
explicitPortOf(String raw) → int?
The port written in raw, if any. Dart's Uri drops a port equal to the scheme's default, so http://box:80 and http://box parse identically — and a bare http host here means the dev port, not 80.
prettyHostname(String raw) → String
showAddServerDialog(BuildContext context, {required String initial, required DevSetupTheme theme, required DevSetupStrings strings}) → Future<String?>
Returns what was typed, already checked for a scheme and a host.
showServerNameDialog(BuildContext context, {required DevServerEntry entry, required DevSetupTheme theme, required DevSetupStrings strings}) → Future<NameDialogResult?>