Niku Row
Style property builder for building "Row".
Example usage:
As Widget
NikuRow([
Text("1"),
Text("2"),
])
..mainStart();
As Property
Row(
children: [
Text("1"),
Text("2"),
]
)
.asNiku()
..mainStart();
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/row.dart';
niku
Switch to use parent property builder.
Example Usage:
NikuRow()
.niku();
Equivalent to
Niku(
Row(),
);
mainAxisAlignment
Set main axis alignment.
Example Usage:
NikuRow()
..mainAxisAlignment(MainAxisAlignment.center);
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.center,
);
mainAxis
Shorten syntax of mainAxisAlignment
Set main axis alignment.
Example Usage:
NikuRow()
..mainAxis(MainAxisAlignment.center);
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.center,
);
mainStart
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.start
.
Example Usage:
NikuRow()
..mainStart();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.start,
);
justifyStart
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.start
.
As a reference to CSS flexbox, justify-content
.
Example Usage:
NikuRow()
..justifyStart();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.start,
);
mainCenter
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.center
.
Example Usage:
NikuRow()
..mainCenter();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.center,
);
justifyCenter
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.center
.
As a reference to CSS flexbox, justify-content
.
Example Usage:
NikuRow()
..justifyCenter();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.center,
);
mainEnd
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.end
.
Example Usage:
NikuRow()
..mainEnd();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.end,
);
justifyEnd
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.end
.
As a reference to CSS flexbox, justify-content
.
Example Usage:
NikuRow()
..justifyEnd();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.end,
);
spaceAround
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.spaceAround
.
Example Usage:
NikuRow()
..spaceAround();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
);
spaceBetween
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.spaceBetween
.
Example Usage:
NikuRow()
..spaceBetween();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
);
spaceEnd
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.spaceEnd
.
Example Usage:
NikuRow()
..spaceEnd();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.spaceEnd,
);
spaceEvenly
Shorten syntax of mainAxisAlignment
Set main axis alignment using MainAxisAlignment.spaceEvenly
.
Example Usage:
NikuRow()
..spaceEvenly();
Equivalent to
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
);
crossAxisAlignment
Set cross axis alignment.
Example Usage:
NikuRow()
..crossAxisAlignment(CrossAxisAlignment.center);
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.center,
);
crossAxis
Shorten syntax of crossAxisAlignment
Set cross axis alignment.
Example Usage:
NikuRow()
..crossAxis(CrossAxisAlignment.center);
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.center,
);
crossStart
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.start
.
Example Usage:
NikuRow()
..crossStart();
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.start,
);
itemsStart
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.start
.
As a reference to CSS flexbox, align-items
.
Example Usage:
NikuRow()
..crossStart();
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.start,
);
crossCenter
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.center
.
Example Usage:
NikuRow()
..crossCenter();
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.center,
);
itemsCenter
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.center
.
As a reference to CSS flexbox, align-items
.
Example Usage:
NikuRow()
..crossCenter();
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.center,
);
crossEnd
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.end
.
Example Usage:
NikuRow()
..crossEnd();
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.end,
);
itemsEnd
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.end
.
As a reference to CSS flexbox, align-items
.
Example Usage:
NikuRow()
..crossEnd();
baseline
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.baseline
.
Example Usage:
NikuRow()
..baseline();
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
);
stretch
Shorten syntax of crossAxisAlignment
Set cross axis alignment using CrossAxisAlignment.stretch
.
Example Usage:
NikuRow()
..stretch();
Equivalent to
Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
);
textDirection
Set whether text is left-to-right or right-to-left direction.
Example Usage:
NikuRow()
..textDirection(TextDirection.ltr);
Equivalent to
Row(
textDirection: input,
);
ltr
Shorten syntax of textDirection
Set whether text is left-to-right or right-to-left direction.
Using TextDirection.ltr
.
Example Usage:
NikuRow()
..ltr();
Equivalent to
Row(
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:
NikuRow()
..rtl();
Equivalent to
Row(
textDirection: TextDirection.rtl,
);
verticalDirection
A direction in which boxes flow vertically.
Example Usage:
NikuRow()
..verticalDirection(VerticalDirection.up);
Equivalent to
Row(
verticalDirection: input,
);
up
Shorten syntax of verticalDirection
A direction in which boxes flow vertically.
Using VerticalDirection.up
.
Example Usage:
NikuRow()
..verticalDirection(VerticalDirection.up);
Equivalent to
Row(
verticalDirection: VerticalDirection.up,
);
down
Shorten syntax of verticalDirection
A direction in which boxes flow vertically.
Using VerticalDirection.down
.
Example Usage:
NikuRow()
..verticalDirection(VerticalDirection.down);
Equivalent to
Row(
verticalDirection: VerticalDirection.down,
);
textBaseline
The common baseline that should be aligned between this text span and its parent text span, or, for the root text spans, with the line box.
Example Usage:
NikuRow()
..textBaseline(TextBaseline.alphabetic);
Equivalent to
Row(
textBaseline: input,
);
alphabetic
Shorten syntax of textBaseline
The common baseline that should be aligned between this text span and its parent text span, or, for the root text spans, with the line box.
Using TextBaseline.alphabetic
Example Usage:
NikuRow()
..alphabetic();
Equivalent to
Row(
textBaseline: TextBaseline.alphabetic,
);
ideographic
Shorten syntax of textBaseline
The common baseline that should be aligned between this text span and its parent text span, or, for the root text spans, with the line box.
Using TextBaseline.alphabetic
Example Usage:
NikuRow()
..ideographic();
Equivalent to
Row(
textBaseline: TextBaseline.ideographic,
);
child
Append child.
Example Usage:
NikuRow()
..child(
Text("Child")
);
Equivalent to
Row(
children: [
# Others children,
input,
]
);
append
Append child.
Example Usage:
NikuRow()
..child(
Text("Child")
);
Equivalent to
Row(
children: [
# Others children,
input,
]
);
appendChild
Append child.
Example Usage:
NikuRow()
..appendChild(
Text("Child")
);
Equivalent to
Row(
children: [
# Others children,
input,
]
);
children
Append children.
Example Usage:
NikuRow()
..children([
Text("Child")
]);
Equivalent to
Row(
children: [
# Others children,
...input,
]
);
appendChildren
Append children.
Example Usage:
NikuRow()
..appendChildren([
Text("Child")
]);
Equivalent to
Row(
children: [
# Others children,
...input,
]
);
prepend
Prepend child.
Example Usage:
NikuRow()
..child(
Text("Child")
);
Equivalent to
Row(
children: [
input,
# Others children,
]
);
prependChild
Prepend child.
Example Usage:
NikuRow()
..prependChild(
Text("Child")
);
Equivalent to
Row(
children: [
input,
# Others children,
]
);
children
Prepend children.
Example Usage:
NikuRow()
..children([
Text("Child")
]);
Equivalent to
Row(
children: [
...input,
# Others children,
]
);
prependChildren
Prepend children.
Example Usage:
NikuRow()
..prependChildren([
Text("Child")
]);
Equivalent to
Row(
children: [
...input,
# Others children,
]
);
insert
Insert child at specific index.
Example Usage:
NikuRow()
..insert(2, Text("Child"));
Equivalent to
Row(
children: [
# Others children,
input,
# Others children,
]
);
insertAll
Insert children at specific index.
Example Usage:
NikuRow()
..insertAll(2, [
Text("Child"),
Text("Child"),
]);
Equivalent to
Row(
children: [
# Others children,
...input,
# Others children,
]
);