build static method

List<Widget> build()

Returns the Widgets of this AvatarsSection.

Implementation

static List<Widget> build() {
  ({String headline, Widget widget}) avatars(
    String title,
    AvatarRadius radius,
  ) {
    return (
      headline:
          'AvatarWidget(radius: ${radius.toDouble().toStringAsFixed(0)})',
      widget: Wrap(
        spacing: 8,
        runSpacing: 8,
        children: [
          AvatarWidget(title: title, radius: radius),
          AvatarWidget(
            radius: radius,
            child: Image.memory(CatImage.bytes, fit: BoxFit.cover),
          ),
        ],
      ),
    );
  }

  return [
    Headlines(
      children:
          AvatarRadius.values.reversed
              .mapIndexed((i, e) => avatars(i.toString().padLeft(2, '0'), e))
              .toList(),
    ),
  ];
}