Open bambinoua opened 1 year ago
This problem occurs in actual use, mainly because Dart does not provide Size
.
Size
is defined in dart:ui
in flutter
, which is flutter
only.
import 'package:image_size_getter/image_size_getter.dart' as getter;
foo(getter.ImageInput input) {
getter.Size size = getter.ImageSizeGetter.getSize(input);
print(size);
}
import 'package:image_size_getter/image_size_getter.dart' hide Size;
foo(ImageInput input) {
final size = ImageSizeGetter.getSize(input);
print(size);
}
I'll modify the class name of Size
next major version.
Platforms
dart
Description
Now your
Size
interfere withdart:ui
Size
. It would be good to have your own class. For example:Why
It will not confuses the user because
Size
is just a base object withwidth
andheight
. You bring your own sense - it is image size (moreover with the additional boolean).