nativemind_vpn library
VPN client widgets made by hand (Gleb Sosnin, Wishyut; VPNclient-app 2025), the VPN editions as data, country
flags and app marks, and the earlier library widgets moved from nativemind_widgets/network.dart (the ones the
handmade widgets replace are deprecated). Use it with nativemind_core (theme, NmConfigs).
Classes
- NmActionButton
- NmAddSubscriptionCard
- The "+" card at the end of a subscription strip.
- NmAppListItem
- NmAppsList
- NmAppsListState
- NmConnectButton
- Big round connect button with the session timer above and a sliding status label below. Disconnected: muted plate; connecting / disconnecting: the brand fill pulses; connected: full brand fill.
- NmConnectionStats
- Download / upload / ping tiles.
- NmCountryFlag
- Round country flag (auto = lightning badge). The bundled flags carry their own padding and soft shadow; size is the visible disc.
- NmCurrentLocationCard
- "Your location" card: current server, tap to change.
- NmCustomString
- NmLocationWidget
- NmMainBtn
- NmMainBtnState
- NmNetwork
-
Access to the network library's strings (English fallback): the strings of the 0.x network widgets moved from
nativemind_widgets (
NmCountryFlag,NmPingBadge, the subscription cards and the deprecated ones). - NmNetworkL10n
-
Callers can lookup localized strings with an instance of NmNetworkL10n
returned by
NmNetworkL10n.of(context). - NmPingBadge
- Latency: "48 ms" with a three-step quality mark (≤ good ms good, ≤ mid ms fair, else poor).
- NmResetSettingsDialog
- NmSearchDialog
- NmServerListItem
- NmServerLocation
- A server location (country + optional city / node name).
- NmServerLocationList
- Server picker: the selected location first, then the others (grouped by NmServerLocation.group when set), with an optional search box.
- NmServerLocationTile
- Server row: flag, name, ping.
- NmServersList
- NmServersListState
- NmServerSubscriptionCard
- A server subscription (a provider's server list) in a horizontal strip: name, server count and expiry; the active one is selected.
- NmSettingInfoCard
- NmSnackbarUtils
- NmSplitTunnelAppList
- Split tunneling: mode switch (off / bypass listed / only listed) and a searchable app list with checkboxes.
- NmStatBar
- NmStatBarState
- NmSupportServiceCard
- NmTunnelApp
- An app in the split-tunnel list.
- NmUrlLauncherUtils
- NmVpnCustomIcons
- NmVpnEditions
- Edition ids and the configuration of the VPN editions.
- NmVpnL10n
-
Strings of the handmade VPN widgets (
NmVpnL10n.of(context).connected). Getter names are Wishyut's keys; the texts are hisassets/lang/<code>.json(en, ru, th, zh), loaded by delegate throughNmLocalizationService. - NmVpnPressable
-
Tap target that rebuilds its child with
pressedwhile a pointer is down (or when pressed forces it). - NmVpnSvgIcon
-
Draws an NmVpnSvgIcons glyph (flag or app mark) from this package. Core's
NmIconlooks for SVGs in one package only (nativemind_widgets), so the VPN glyphs use this widget. - NmVpnSvgIcons
-
Bundled SVG glyphs of nativemind_vpn (country flags, app marks), grouped by folder under
assets/svg/. Draw them withNmVpnSvgIcon(they live in this package, not whereNmIconlooks for SVGs).
Enums
- NmConnectionState
- Tunnel connection state.
- NmConnectionStatus
- NmSplitTunnelMode
- Split tunneling mode.
Extensions
- NmConnectionStateText on NmConnectionState
- Localized label and busy flag of a NmConnectionState.
- NmServerLocationHandmadeMap on NmServerLocation
-
NmServerLocation → a row of
NmServersList/NmSearchDialog(type 2) /NmLocationWidget.selectedServer. - NmTunnelAppHandmadeMap on NmTunnelApp
-
NmTunnelApp → a row of
NmAppsList/NmSearchDialog(type 1). - NmVpnEdition on NmConfig
- Typed access to the VPN keys of an edition.
- NmVpnScheme on ColorScheme
- VPN tokens over a ColorScheme (light: Gleb Sosnin's hard-coded values; dark: NativeMind DS).
Constants
- nmConnectionTgUrl → const String
- nmElevation0 → const double
- nmFontFamilySFPro → const String
- nmFontSize14 → const double
- nmFontSize15 → const double
- nmFontSize17 → const double
- nmFontSize24 → const double
- nmFontSize40 → const double
- nmSupportTgUrl → const String
Properties
- nmActiveAppIcon → SvgPicture
-
final
- nmActiveHomeIcon → SvgPicture
-
final
- nmActiveServerIcon → SvgPicture
-
final
- nmAppIcon → SvgPicture
-
final
- nmDarkTheme → ThemeData
-
final
- nmDeFlag → SvgPicture
-
final
- nmHomeIcon → SvgPicture
-
final
- nmLightTheme → ThemeData
-
final
- nmMainGradient → LinearGradient
-
final
- nmServerIcon → SvgPicture
-
final
- nmSettingsIcon → SvgPicture
-
final
- nmSpeedIcon → SvgPicture
-
final
- nmVpnAssetPackage ↔ String?
-
Package of the nativemind_vpn assets. Set it to null only in this package's own tests, where its assets are keyed
without the
packages/nativemind_vpn/prefix.getter/setter pair
Functions
-
nmAllAppsHandmadeMap(
BuildContext context, {bool isActive = false}) → Map< String, dynamic> -
The first row of
NmAppsList: the "all applications" switch. -
nmFlagIcon(
String? countryCode) → NmIconData? - Flag glyph for an ISO 3166-1 alpha-2 code (null = auto), if bundled.
-
nmTunnelAppIcon(
String name) → NmIconData? -
App mark by a simple name (
telegram,youtube,x…), if bundled. WasnmAppIconin nativemind_widgets 0.5: renamed because Gleb Sosnin's tab iconnmAppIcon(handmade) takes the name. -
nmVpnAsset(
String path) → String -
Asset key of
path(relative to the package root), e.g.assets/svg/flags/de.svg→packages/nativemind_vpn/assets/svg/flags/de.svg. Use it for theicon/imagevalues of the handmade lists.