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

import 'package:sonnat/core/utils/app_constants.dart';
extension NumberExtension on num {
double get sw {
if (this == 1) {
return double.maxFinite;
}
return toDouble() * AppConstants.instance.appWidth;
}
double get sh => toDouble() * AppConstants.instance.appHeight;
double get w => toDouble();
double get h => toDouble();
double get sp => toDouble();
}