children 1.1.1

Flutter Android iOS web

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
110
pub points
34%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

gerhut@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on children