div

Creator: coderz1093

Last updated:

0 purchases

div Image
div Images

Languages

Categories

Add to Cart

Description:

div

Div widget #
This widget is just a wrapper for the container Widget with an gesture detector and row, col (column) constructors.
it also use the first argument as a child or children
Usage #
basic usage: #
Div(
Text('Hello div'),
),
copied to clipboard
it has all container widget properties
Div(
Text('Hello div'),
color: Colors.red,
padding: EdgeInsets.all(12),
// and more ...
),
copied to clipboard
Row #
Div.row([
Text('Hello div'),
Text('Hello div'),
],),
copied to clipboard
Column #
Div.col([
Text('Hello div'),
Text('Hello div'),
],),
copied to clipboard
with Gesture detector #
Div(
Text('Hello div'),
onTap: () {
print('tap');
},
),
copied to clipboard
Why? #
to me think using first argument as a child or children can minimize the code and make it more readable, because when ur tree go to be more complex, it will be hard to read.
Example:
Div.col([
Text('Hello 0'),
Div(
Text('Hello 1'),
color: Colors.teal
),
Div.row([
Text('Text'),
]),
Div(
Text('Hello with onTap'),
onTap: () {
print('tap');
},
),
]),
copied to clipboard
Next? #
...

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.