Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

Flutter how to get percentage of device height

You can use the FractionalSizedBox to size a widget based on percentages

https://api.flutter.dev/flutter/widgets/FractionallySizedBox-class.html

FractionallySizedBox(
                widthFactor: 1,
                heightFactor: 0.31,
                child: Container(
                 	...
                ),
              ),
 
PREVIOUS NEXT
Tagged: #Flutter #percentage #device #height
ADD COMMENT
Topic
Name
2+2 =