Sonnat Project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
389 B

2 years ago
  1. import 'package:sonnat/core/utils/app_constants.dart';
  2. extension NumberExtension on num {
  3. double get sw {
  4. if (this == 1) {
  5. return double.maxFinite;
  6. }
  7. return toDouble() * AppConstants.instance.appWidth;
  8. }
  9. double get sh => toDouble() * AppConstants.instance.appHeight;
  10. double get w => toDouble();
  11. double get h => toDouble();
  12. double get sp => toDouble();
  13. }