dlutter 1.0.0 copy "dlutter: ^1.0.0" to clipboard
dlutter: ^1.0.0 copied to clipboard

dlutter equal to dash in flutter

Make it ease to typing #

  • Think about this:
    InkWell(
        onTap: () {
          print('do something here');
        },
        child: const Padding(
          padding: EdgeInsets.symmetric(vertical: 10),
          child: SizedBox(
            width: double.infinity,
            child: Center(
              child: Text(
                'cancel',
                style: TextStyle(fontSize: 14, color: Colors.red),
              ),
            ),
          ),
        ),
      )
  • And how about this:
    'cancel'
            .toText(size: 14, color: Colors.red)
            .toCenter()
            .toSizedBox(double.infinity)
            .toPadding(10.toEdgePaddingVertical())
            .toInkWell(
        onTap: () {
            print('do something here');
        },
    )

Caution #

  • do not recommend to use this coding style for a huge page with expensive & complicated layout
  • should break a huge layout into small pieces and manipulating this coding style
  • refer to this discussion thread: function widget vs class widget
  • finally, enjoy and show your style!!!
1
likes
120
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

dlutter equal to dash in flutter

Documentation

API reference

License

MIT (license)

Dependencies

cached_network_image, flutter, flutter_svg

More

Packages that depend on dlutter