The consequence, while unlikely in the short term, is that someone could develop an implementation using implements instead of extends, and everything would work initially but changes to the platform interface would break that implementation.
Recommended fix
Use a static final Object _token = Object(); instead of static const Object _token = Object(); in StreetViewFlutterPlatform.
Optional steps to prevent regressions.
Update street_view_platform_interface to depend on plugin_platform_interface: ^2.1.1
Call verify instead of verifyExtends in the instance setter of StreetViewFlutterPlatform.
This could break other implementations if there are any, so make sure to make it a major update to street_view_platform_interface. (Probably better to get it out of the way early while there aren't any other implementations.)
This plugin should not use a
const Object()
as the platform interface token. There was an error in the documentation forplugin_platform_interface
; see https://github.com/flutter/flutter/issues/96178.The consequence, while unlikely in the short term, is that someone could develop an implementation using
implements
instead ofextends
, and everything would work initially but changes to the platform interface would break that implementation.Recommended fix
Use a
static final Object _token = Object();
instead ofstatic const Object _token = Object();
inStreetViewFlutterPlatform
.Optional steps to prevent regressions.
street_view_platform_interface
to depend onplugin_platform_interface: ^2.1.1
verify
instead ofverifyExtends
in theinstance
setter ofStreetViewFlutterPlatform
.This could break other implementations if there are any, so make sure to make it a major update to
street_view_platform_interface
. (Probably better to get it out of the way early while there aren't any other implementations.)/cc @stuartmorgan