instance property
MapstedFlutterPlatform
get
instance
The current instance of MapstedFlutterPlatform.
This getter returns the instance of MapstedFlutterPlatform that is currently being used. By default, this is an instance of MethodChannelMapstedFlutter.
Example usage:
final platform = MapstedFlutterPlatform.instance;
Implementation
static MapstedFlutterPlatform get instance => _instance;
set
instance
(MapstedFlutterPlatform instance)
Sets the instance of MapstedFlutterPlatform.
This setter allows for setting a custom instance of MapstedFlutterPlatform. The provided instance must be verified against the interface token to ensure compliance with the platform interface.
Example usage:
MapstedFlutterPlatform.instance = CustomPlatformImplementation();
Implementation
static set instance(MapstedFlutterPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
_instance = instance;
}