diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart index acdde3c9e..241790477 100644 --- a/lib/src/utils/utils.dart +++ b/lib/src/utils/utils.dart @@ -23,20 +23,6 @@ class Utils { /// Converts radians to degrees double degrees(double radians) => radians * _radians2Degrees; - /// Returns a default size based on the screen size - /// that is a 70% scaled square based on the screen. - Size getDefaultSize(Size screenSize) { - Size resultSize; - if (screenSize.width < screenSize.height) { - resultSize = Size(screenSize.width, screenSize.width); - } else if (screenSize.height < screenSize.width) { - resultSize = Size(screenSize.height, screenSize.height); - } else { - resultSize = Size(screenSize.width, screenSize.height); - } - return resultSize * 0.7; - } - /// Forward the view base on its degree double translateRotatedPosition(double size, double degree) { return (size / 4) * math.sin(radians(degree.abs())); diff --git a/test/utils/utils_test.dart b/test/utils/utils_test.dart index 85d9e750c..bbe4867bb 100644 --- a/test/utils/utils_test.dart +++ b/test/utils/utils_test.dart @@ -36,40 +36,6 @@ void main() { expect(Utils().degrees(1.2), closeTo(68.7549, tolerance)); }); - test('test default size', () { - expect( - Utils().getDefaultSize(const Size(1080, 1920)).width, - closeTo(756, tolerance), - ); - expect( - Utils().getDefaultSize(const Size(1080, 1920)).height, - closeTo(756, tolerance), - ); - - expect( - Utils().getDefaultSize(const Size(728, 1080)).width, - closeTo(509.6, tolerance), - ); - expect( - Utils().getDefaultSize(const Size(728, 1080)).height, - closeTo(509.6, tolerance), - ); - - expect( - Utils().getDefaultSize(const Size(2560, 1600)).width, - closeTo(1120, tolerance), - ); - expect( - Utils().getDefaultSize(const Size(2560, 1600)).height, - closeTo(1120, tolerance), - ); - - expect( - Utils().getDefaultSize(const Size(1000, 1000)).width, - closeTo(700, tolerance), - ); - }); - test('translate rotated position', () { expect(Utils().translateRotatedPosition(100, 90), 25); expect(Utils().translateRotatedPosition(100, 0), 0);