U class abstract

App-wide settings and data: base URL, localized strings (U.s), user, app settings, dynamic tabs. U.s.save, U.baseUrl

Constructors

U()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

apiKey ↔ String
API key set by initU(apiKey:).
getter/setter pair
appSettings ↔ UAppSettingsResponse
App settings loaded from the server; set it after loading.
getter/setter pair
baseUrl ↔ String
API base URL set by initU(baseUrl:).
getter/setter pair
categories ↔ List<UCategoryResponse>
Categories loaded from the server.
getter/setter pair
contents ↔ List<UContentResponse>
Content items (about us, banners…) loaded from the server.
getter/setter pair
defaultPhoneCountry → UCountry
UCountry of defaultPhoneCountryCode.
no setter
defaultPhoneCountryCode ↔ String
ISO code of the default country for phone fields, e.g. "IR".
getter/setter pair
s → AppLocalizations
Localized strings (fa/en) from u's l10n. Text(U.s.save)
no setter
snackBarDuration ↔ int
Default snackbar duration in seconds.
getter/setter pair
tabController ↔ TabController?
Controller of tabs.
getter/setter pair
tabs → URxList<UTabData>
Open tabs of a desktop/admin tab layout (UDefaultTabBar).
final
user ↔ UUserResponse
Logged-in user; set it after login.
getter/setter pair

Static Methods

addOrSwitchTab(String title, Widget page) → void
Switches to the tab named title, or opens it. U.addOrSwitchTab("Users", const UsersPage())
addTab(String title, Widget page) → void
Opens a new tab with page.
removeTab(int index) → void
Closes the tab at index.
replaceTab(String title, Widget page) → void
Replaces the tab named title with page, or opens it.
updateTabController() → void
Rebuilds the tab controller after tabs change.

Constants

vazir → const TextStyle
Vazir Persian font bundled with u. Text("سلام", style: U.vazir)