children 1.1.1 copy "children: ^1.1.1" to clipboard
children: ^1.1.1 copied to clipboard

Filter out all non-widgets from an iterable, used in `children` parameter of multi-child layout widgets.

children #

Codemagic build status

Filter out all non-widgets from an iterable, used in children parameter of multi-child layout widgets.

Usage #

import 'package:flutter/widgets.dart';

import 'package:children/children.dart';

class Post extends StatelessWidget {
  final String title;
  final String contents;
  final bool isExpanded;

  Post({Key key, this.title, this.contents, this.isExpanded = false})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: children([
        Text(title),
        isExpanded ? Text(contents) : null,
      ]),
    );
  }
}

License #

MIT

0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Filter out all non-widgets from an iterable, used in `children` parameter of multi-child layout widgets.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on children