YOLOPlatform class abstract
The interface that implementations of the Ultralytics YOLO plugin must implement.
This class uses the PlatformInterface
pattern to ensure that platform-specific
implementations properly extend this class rather than implementing it.
Platform implementations should extend this class rather than implement it as yolo
does not consider newly added methods to be breaking changes. Extending this class
(using extends
) ensures that the subclass will get the default implementation, while
platform implementations that implements
this interface will be broken by newly added
YOLOPlatform methods.
The plugin uses method channels for communication between Flutter and native code. Each platform (iOS, Android) provides its own implementation of the YOLO inference engine.
- Inheritance
-
- Object
- PlatformInterface
- YOLOPlatform
- Implementers
Constructors
- YOLOPlatform.new()
- Constructs a YOLOPlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPlatformVersion(
) → Future< String?> - Returns the current platform version.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setModel(
int viewId, String modelPath, String task) → Future< void> - Sets the model for an existing YOLO view.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ YOLOPlatform
-
The default instance of YOLOPlatform to use.
getter/setter pair