Tailwind class

Singleton holding library-wide configuration.

Configurable:

Cached by init:

  • screenW, screenH — populated from MediaQuery at init time. Used by the hFull/wFull/sScreen/sFull-family getters.

Important: init requires a BuildContext that is inside the MaterialApp widget tree. The context is NOT retained — values are extracted immediately and cached to fields.

Constructors

Tailwind()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
imageFactory BaseImageFactory?
getter/setter pair
inputConfig InputConfig
App-wide default appearance for Input. Defaults to an empty config (no defaults, current behavior). Install via configInput. Per-instance Input props always win over these.
getter/setter pair
primary Color
Returns the active primary color. Resolution: primaryColor (populated by init or set directly) ?? Colors.amber.
no setter
primaryColor Color?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenH double
Cached screen height in logical pixels. Populated by init. Returns 0.0 if init hasn't been called yet.
getter/setter pair
screenW double
Cached screen width in logical pixels. Populated by init. Returns 0.0 if init hasn't been called yet.
getter/setter pair
sizeAdapter SizeAdapter
The active size adapter. Defaults to identity (no scaling). Replace via configSizeAdapter.
getter/setter pair

Methods

addImageConfig(ImageLoaderConfigInterface imageConfig) → void
configImageFactory(BaseImageFactory imageFactory) → void
configInput(InputConfig config) → void
Install app-wide default appearance for Input. Typical call site: app startup. Per-instance Input props override these defaults.
configSizeAdapter(SizeAdapter adapter) → void
Install a custom size adapter. Typical call site: app startup.
init(BuildContext context, [Color? fallbackPrimary]) → void
One-shot setup. Pulls needed values out of context immediately and caches them; does NOT retain the context reference.
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

instance Tailwind
no setter