z_tools 0.0.6 copy "z_tools: ^0.0.6" to clipboard
z_tools: ^0.0.6 copied to clipboard

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.

z_tools #

介绍 #

集成了一些通用的 flutter 工程使用的工具。包括计算 widget size, 一些有用的扩展,像 Map.forceConvertMap, List.tryGetString.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.

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');
    },
  );
}

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)}');
    },
),
2
likes
120
points
55
downloads

Publisher

unverified uploader

Weekly Downloads

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.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

collection, flutter, intl

More

Packages that depend on z_tools