How do I stretch an icon to fill the parent element?
1 answer
I believe you can use the box installed with advanced
https://docs.flutter.io/flutter/widgets/Expanded-class.html
https://groups.google.com/forum/#!msg/flutter-dev/lsgdU1yl7xc/0pYS2qrzBQAJ
https://docs.flutter.io/flutter/widgets/FittedBox-class.html
https://docs.flutter.io/flutter/painting/BoxFit-class.html
new Expanded(
child: new FittedBox(
fit: BoxFit.fill,
child: new Icon(Icons.home),
),
),
Please note that in documents that are Expanded, must be wrapped in a Colium, row or flex widget.
+4
source to share