z_tools

Creator: coderz1093

Last updated:

0 purchases

z_tools Image
z_tools Images
Add to Cart

Description:

z tools

z_tools #
介绍 #
集成了一些通用的 flutter 工程使用的工具。包括计算 widget size, 一些有用的扩展,像 Map.forceConvertMap, List.tryGet 和 String.isSafeEmpty.
还包括 base64 编解码。
Integrates some common tools used by flutter projects. Including computing widget size, some useful extensions like `Map.forceConvertMap`, `List.tryGet` and `String.isSafeEmpty`.
It also includes base64 codec.
copied to clipboard
calculate widget size #
change main file #
void main() async {
runZoned(
() => runApp(
CalculateWidgetAppContainer(
child: Center(
child: LocalizedApp(delegate, MyApp()),
),
),
),
onError: (Object obj, StackTrace stack) {
print('global exception: obj = $obj;\nstack = $stack');
},
);
}
copied to clipboard
use in function #
_Cell(
title: 'cal: Column-min',
callback: () async {
Widget widget1 = Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 100,
height: 30,
color: Colors.blue,
),
Container(
height: 20.0,
width: 30,
),
Text('111'),
],
);
// size = Size(100.0, 66.0)
print('size = ${await getWidgetSize(widget1)}');
},
),
copied to clipboard

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.