FlutterSafetyMobilePlatform class
An abstract class that extends PlatformInterface to define the
platform-specific implementation for the Flutter Safety plugin.
This class serves as the base for all platform-specific implementations and ensures that the correct platform interface is used.
- Inheritance
-
- Object
- PlatformInterface
- FlutterSafetyBasePlatform
- FlutterSafetyMobilePlatform
Constructors
- FlutterSafetyMobilePlatform()
-
Factory constructor to return the singleton instance of the class.
If the instance doesn't exist, it creates a new one.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel ↔ MethodChannel
-
A MethodChannel that is used for communication between Flutter and the
native platform. This field is marked as
lateandfinal, meaning it will be initialized later and cannot be reassigned. The@visibleForTestingannotation indicates that this field is intended to be visible only for testing purposes.latefinalinherited - name → String
-
The name associated with the platform.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
closeCamera(
) → Future< void> - Closes the camera by invoking the 'closeActivity' method on the method channel.
-
defaultPermissionUI(
BuildContext context, Future requestPermission(BuildContext)) → Widget -
A default UI widget for handling permission requests.
inherited
-
getValueFromSecureStorage(
{required String key}) → Future< String?> - Retrieves a value from secure storage for the given key.
-
identifyWidget(
{required dynamic onSafetyDetection(dynamic), dynamic onBoundingBox(dynamic)?, dynamic onDetectionComplete(dynamic)?, dynamic fps(dynamic)?, dynamic error(dynamic)?, dynamic cameraStatus(dynamic)?, dynamic loading(dynamic)?, dynamic disposed(dynamic)?, dynamic filterUpdated(dynamic)?, dynamic cameraSwitch(dynamic)?, required Widget customPermissionBuilder(dynamic), required Center onLoadingWidget, Widget? faceMaskOverlay, required Stack builder(Widget, FlutterSafetyPlatformCameraController), Map< String, dynamic> ? filterParams, String? cameraSelected, bool? autoFinishDetectionActivity = true}) → Widget - Creates a widget for identifying faces with various customization options.
-
invokeNativeMethod(
String methodName, [dynamic arguments]) → Future< Either< String, dynamic> > -
Invokes a native method through the method channel and handles the response.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
platformViewLink(
{dynamic onSafetyDetection(dynamic)?, dynamic onDetectionComplete(dynamic)?, dynamic onBoundingBox(dynamic)?, dynamic fps(dynamic)?, dynamic error(dynamic)?, dynamic cameraStatus(dynamic)?, dynamic loading(dynamic)?, dynamic disposed(dynamic)?, dynamic filterUpdated(dynamic)?, dynamic cameraSwitch(dynamic)?, Widget? onLoadingWidget, Widget? faceMaskOverlay, required Widget builder(Widget, FlutterSafetyPlatformCameraController), Widget customPermissionBuilder(Future (BuildContext))?, Map< String, dynamic> creationParams = const {}, required String viewType}) → Widget -
Creates a platform view link widget with various callback functions for handling
different events and optional widgets for loading and face mask overlay.
inherited
-
registerCallback(
String method, dynamic callback(dynamic)) → void -
Registers a callback for a specific method.
inherited
-
safetyIdentifyActivity(
{dynamic onSafetyDetection(dynamic)?, Map< String, dynamic> ? filterParams}) → Future<void> -
setValueToSecureStorage(
{required String key, required String value}) → Future< void> - Writes a key-value pair to secure storage.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → FlutterSafetyMobilePlatform
-
A singleton getter that returns the instance of FlutterSafetyMobilePlatform.
no setter