some_widget_extensions 0.0.1 copy "some_widget_extensions: ^0.0.1" to clipboard
some_widget_extensions: ^0.0.1 copied to clipboard

Convenience extension methods to be used on widgets

Some Widget Extensions #

Some Widget Extensions is a collection of convenience extension methods to be used on widgets. It conserves Flutter's API making it as familiar as possible.

Inspiration #

Partially inspired by xtended. Mostly inspired by the idea circulating in Tech Twitter circles surrounding the comparison of Flutter and SwiftUI.

The idea is to use extensions instead of nesting widgets in widgets; using some_widget_extensions you're achieving the same, but with a different syntax.

For example, instead of wrapping MyWidget into a Container "the traditional way":

Container(
    width: 123.0,
    height: 456.0,
    padding: EdgeInsetsPadding.all(16.0),
    child: const MyWidget(),
)

you can simply do:

MyWidget()
    .container(
        width: 123.0,
        height: 456.0,
        padding: EdgeInsetsPadding.all(16.0),
    )

Obviously you can chain these extensions, if you need to.

Contributions #

The package is under constant development, more extensions will be added. Feel free to contribute. You can do that by opening an issue on GitHub, or by contacting me directly on X (formerly known as Twitter).

1
likes
0
points
155
downloads

Publisher

verified publisherbizjak.dev

Weekly Downloads

Convenience extension methods to be used on widgets

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on some_widget_extensions