size_percent_extension.dart 253 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 import '../../get.dart'; //Converts a double value to a percentage extension PercentSized on double { // height: 50.0.hp = 50% double get hp => (Get.height * (this / 100)); // width: 30.0.hp = 30% double get wp => (Get.width * (this / 100)); }