Niku Stack
Style property builder for building "Stack".
Example usage:
As Widget
NikuStack([
Text("1"),
Text("2"),
])
..topCenter();
As Property
Stack(
children: [
Text("1"),
Text("2"),
]
)
.asNiku()
..topCenter();
Availability
To use this widget, you can import from the following:
// All Widget
import 'package:niku/niku.dart';
// Extension
import 'package:niku/extension/widget.dart';
// With relatated widget
import 'package:niku/widget/axis.dart';
// Just widget
import 'package:niku/widget/stack.dart';
niku
Switch to use parent property builder.
Example Usage:
NikuStack()
.niku();
Equivalent to
Niku(
Stack(),
);
alignment
Apply alignment to stack.
Example Usage:
NikuStack()
..alignment(AlignmentDirectional.topStart);
Equivalent to
Stack(
alignment: input,
);
alignment
Shorten syntax of alignment
Apply alignment to stack.
Example Usage:
NikuStack()
..align(AlignmentDirectional.topStart);
Equivalent to
Stack(
alignment: input,
);
topStart
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.topStart.
Example Usage:
NikuStack()
..topStart();
Equivalent to
Stack(
alignment: input,
);
topCenter
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.topCenter.
Example Usage:
NikuStack()
..topCenter();
Equivalent to
Stack(
alignment: input,
);
topEnd
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.topEnd.
Example Usage:
NikuStack()
..topEnd();
Equivalent to
Stack(
alignment: input,
);
centerStart
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.centerStart.
Example Usage:
NikuStack()
..centerStart();
Equivalent to
Stack(
alignment: input,
);
center
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.center.
Example Usage:
NikuStack()
..centerCenter();
Equivalent to
Stack(
alignment: input,
);
centerEnd
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.centerEnd.
Example Usage:
NikuStack()
..centerEnd();
Equivalent to
Stack(
alignment: input,
);
bottomStart
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.bottomStart.
Example Usage:
NikuStack()
..bottomStart();
Equivalent to
Stack(
alignment: input,
);
bottomCenter
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.bottomCenter.
Example Usage:
NikuStack()
..bottomCenter();
Equivalent to
Stack(
alignment: input,
);
bottomEnd
Shorten syntax of alignment
Apply alignment to stack using AlignmentDirectional.bottomEnd.
Example Usage:
NikuStack()
..bottomEnd();
Equivalent to
Stack(
alignment: input,
);
textDirection
Set whether text is left-to-right or right-to-left direction.
Example Usage:
NikuStack()
..textDirection(TextDirection.ltr);
Equivalent to
Stack(
textDirection: input,
);
ltr
Shorten syntax of textDirection
Set whether text is left-to-right or right-to-left direction.
Using TextDirection.ltr.
Example Usage:
NikuStack()
..ltr();
Equivalent to
Stack(
textDirection: TextDirection.ltr,
);
rtl
Shorten syntax of textDirection
Set whether text is left-to-right or right-to-left direction.
Using TextDirection.rtl.
Example Usage:
NikuStack()
..rtl();
Equivalent to
Stack(
textDirection: TextDirection.rtl,
);
fit
Adjust fit using "StackFit" of stack.
Example Usage:
NikuStack()
..fit(StackFit.expand);
Equivalent to
Stack(
fit: input,
);
stackFit
Shorten syntax of fit
Adjust fit using "StackFit" of stack.
Example Usage:
NikuStack()
..stackFit(StackFit.expand);
Equivalent to
Stack(
fit: input,
);
expand
Shorten syntax of fit
Adjust fit using "StackFit" of stack using StackFit.expand
Example Usage:
NikuStack()
..expand();
Equivalent to
Stack(
fit: StackFit.expand,
);
loose
Shorten syntax of fit
Adjust fit using "StackFit" of stack using StackFit.loose
Example Usage:
NikuStack()
..loose();
Equivalent to
Stack(
fit: StackFit.loose,
);
passthrough
Shorten syntax of fit
Adjust fit using "StackFit" of stack using StackFit.passthrough
Example Usage:
NikuStack()
..expand();
Equivalent to
Stack(
fit: StackFit.passthrough,
);
clipBehavior
Set clip behavior of widget.
Example Usage:
NikuStack()
..clipBehavior(Clip.antiAlias);
Equivalent to
Stack(
clipBehavior: input,
);
clip
Shorten syntax of clipBehavior
Set clip behavior of widget.
Example Usage:
NikuStack()
..clip(Clip.antiAlias);
Equivalent to
Stack(
clipBehavior: input,
);
child
Append child.
Example Usage:
NikuStack()
..child(
Text("Child")
);
Equivalent to
Stack(
children: [
# Others children,
input,
]
);
append
Append child.
Example Usage:
NikuStack()
..child(
Text("Child")
);
Equivalent to
Stack(
children: [
# Others children,
input,
]
);
appendChild
Append child.
Example Usage:
NikuStack()
..appendChild(
Text("Child")
);
Equivalent to
Stack(
children: [
# Others children,
input,
]
);
children
Append children.
Example Usage:
NikuStack()
..children([
Text("Child")
]);
Equivalent to
Stack(
children: [
# Others children,
...input,
]
);
appendChildren
Append children.
Example Usage:
NikuStack()
..appendChildren([
Text("Child")
]);
Equivalent to
Stack(
children: [
# Others children,
...input,
]
);
prepend
Prepend child.
Example Usage:
NikuStack()
..child(
Text("Child")
);
Equivalent to
Stack(
children: [
input,
# Others children,
]
);
prependChild
Prepend child.
Example Usage:
NikuStack()
..prependChild(
Text("Child")
);
Equivalent to
Stack(
children: [
input,
# Others children,
]
);
children
Prepend children.
Example Usage:
NikuStack()
..children([
Text("Child")
]);
Equivalent to
Stack(
children: [
...input,
# Others children,
]
);
prependChildren
Prepend children.
Example Usage:
NikuStack()
..prependChildren([
Text("Child")
]);
Equivalent to
Stack(
children: [
...input,
# Others children,
]
);
insert
Insert child at specific index.
Example Usage:
NikuStack()
..insert(2, Text("Child"));
Equivalent to
Stack(
children: [
# Others children,
input,
# Others children,
]
);
insertAll
Insert children at specific index.
Example Usage:
NikuStack()
..insertAll(2, [
Text("Child"),
Text("Child"),
]);
Equivalent to
Stack(
children: [
# Others children,
...input,
# Others children,
]
);