Widget build()

in tool/icon_generator/lib/main.dart [68:141]


  Widget build(BuildContext context) {
    // We use this color as it works well in both light and dark themes.
    const Color color = const Color(0xFF777777);

    Stack cupertinoSmallStack = new Stack(
      children: cupertinoIcons.map<Widget>((cupertino.IconTuple icon) {
        return RepaintBoundary(
          child: Icon(
            icon.data,
            size: 16.0,
            color: color,
            key: icon.smallKey,
          ),
        );
      }).toList(),
    );

    Stack cupertinoLargeStack = new Stack(
      children: cupertinoIcons.map<Widget>((cupertino.IconTuple icon) {
        return RepaintBoundary(
          child: Icon(
            icon.data,
            size: 32.0,
            color: color,
            key: icon.largeKey,
          ),
        );
      }).toList(),
    );

    Stack materialSmallStack = new Stack(
      children: materialIcons.map<Widget>((material.IconTuple icon) {
        return RepaintBoundary(
          child: Icon(
            icon.data,
            size: 16.0,
            color: color,
            key: icon.smallKey,
          ),
        );
      }).toList(),
    );

    Stack materialLargeStack = new Stack(
      children: materialIcons.map<Widget>((material.IconTuple icon) {
        return RepaintBoundary(
          child: Icon(
            icon.data,
            size: 32.0,
            color: color,
            key: icon.largeKey,
          ),
        );
      }).toList(),
    );

    return MaterialApp(
      title: 'Flutter Demo',
      home: Center(
        child: new Column(
          children: <Widget>[
            new Row(children: <Widget>[
              cupertinoSmallStack,
              materialSmallStack,
            ]),
            new Row(children: <Widget>[
              cupertinoLargeStack,
              materialLargeStack,
            ]),
          ],
        ),
      ),
    );
  }