flutter - How to stretch an icon to fill parent? -


i need icon dynamically stretch fill parent container.

i don't think possible directly on icon (since has size property), there solution i'm overlooking?

i believe can use fitted box expanded

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 in docs expanded has wrapped in colium, row or flex widget.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -