pinch_zoom
pinch_zoom copied to clipboard
Various minor issues
There is no analysis_options.yaml included in the project. Just by including this in the project with the default recommended Flutter lints we can see the following issues:
-
PinchZoom
constructor can be const -
PinchZoom
constructor does not expose aKey?
parameter - Recommended to not expose private
_PinchZoomState
in public APIPinchZoom
-
_endScrollTimer
can use a const Duration
There were two other improvements that I noticed could be made:
- The [resetDuration] parameter has been removed from the
PinchZoom
constructor but it is still referenced in the documentation comment here. - The
PinchZoom
class is missing adispose
method implementation even though_transformationController
and_overlayEntry
are disposable, and_endScrollTimer
is cancelable.