TwContainer class
A builder-style widget that mimics Tailwind-like utilities for containers
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TwContainer
- Mixed-in types
Constructors
- TwContainer.new({Key? key, required Widget child, TwStyle style = const TwStyle()})
-
const
Properties
- child → Widget
-
final
- copyWith → TwContainer Function(TwStyle newStyle)
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → TwStyle
-
no setteroverride
Methods
-
applyMargin(
BuildContext context, Widget child) → Widget -
Applies margin to a widget using the resolved EdgeInsets
inherited
-
applyPadding(
BuildContext context, Widget child) → Widget -
Applies padding to a widget using the resolved EdgeInsets
inherited
-
applyRounded(
BuildContext context, Widget child) → Widget -
Applies rounded styling to a widget using the resolved BorderRadius
inherited
-
bg(
String key) → TwContainer - Set background color using named token (alias for color)
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
color(
String key) → TwContainer -
Set text color using named token
inherited
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
m(
int step) → TwContainer -
Set uniform margin using token scale
inherited
-
mb(
int step) → TwContainer -
Set bottom margin using token scale
inherited
-
ml(
int step) → TwContainer -
Set left margin using token scale
inherited
-
mr(
int step) → TwContainer -
Set right margin using token scale
inherited
-
mt(
int step) → TwContainer -
Set top margin using token scale
inherited
-
mx(
int step) → TwContainer -
Set horizontal margin (left + right) using token scale
inherited
-
my(
int step) → TwContainer -
Set vertical margin (top + bottom) using token scale
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
p(
int step) → TwContainer -
Set uniform padding using token scale
inherited
-
pb(
int step) → TwContainer -
Set bottom padding using token scale
inherited
-
pl(
int step) → TwContainer -
Set left padding using token scale
inherited
-
pr(
int step) → TwContainer -
Set right padding using token scale
inherited
-
pt(
int step) → TwContainer -
Set top padding using token scale
inherited
-
px(
int step) → TwContainer -
Set horizontal padding (left + right) using token scale
inherited
-
py(
int step) → TwContainer -
Set vertical padding (top + bottom) using token scale
inherited
-
resolveMargin(
BuildContext context) → EdgeInsets -
Resolves margin from TwStyle and TwTheme into EdgeInsets
inherited
-
resolvePadding(
BuildContext context) → EdgeInsets -
Resolves padding from TwStyle and TwTheme into EdgeInsets
inherited
-
resolveRounded(
BuildContext context) → BorderRadius -
Resolves rounded styling from TwStyle and TwConfig into BorderRadius
inherited
-
rounded(
[String size = '']) → TwContainer -
Set uniform rounded styling using Tailwind scale
inherited
-
roundedB(
[String size = '']) → TwContainer -
Set bottom rounded styling (bottom-left + bottom-right) using Tailwind scale
inherited
-
roundedBl(
[String size = '']) → TwContainer -
Set bottom-left rounded styling using Tailwind scale
inherited
-
roundedBr(
[String size = '']) → TwContainer -
Set bottom-right rounded styling using Tailwind scale
inherited
-
roundedL(
[String size = '']) → TwContainer -
Set left rounded styling (top-left + bottom-left) using Tailwind scale
inherited
-
roundedR(
[String size = '']) → TwContainer -
Set right rounded styling (top-right + bottom-right) using Tailwind scale
inherited
-
roundedT(
[String size = '']) → TwContainer -
Set top rounded styling (top-left + top-right) using Tailwind scale
inherited
-
roundedTl(
[String size = '']) → TwContainer -
Set top-left rounded styling using Tailwind scale
inherited
-
roundedTr(
[String size = '']) → TwContainer -
Set top-right rounded styling using Tailwind scale
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited