null_widget 1.0.0
null_widget: ^1.0.0 copied to clipboard

Flutter Android iOS Linux macOS web Windows

Tiny widget which is good to be used as a placeholder

null_widget #

lesnitsky.dev GitHub stars Twitter Follow

Tiny widget which is good to be used as a placeholder

Installation #

pubspec.yaml:

dependencies:
  null_widget: ^1.0.0

Example #

class MyWidget extends StatelessWidget {
  final String id;
  final String title;
  final String subtitle;

  @override
  Widget build(BuildContext) {
    return Column(
      children: [
        id.isEmpty ? const NullWidget() : Text('id $id'),
        guard(() => Text(title)),
        guard(() => Text(subtitle), Text('No subtitle')),
      ],
    );
  }
}

License #

MIT

2
likes
80
pub points
23%
popularity

Tiny widget which is good to be used as a placeholder

Repository (GitHub)
View/report issues

Uploader

andrei.lesnitsky@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, guard

More

Packages that depend on null_widget