PlatformHandler class
A class for the platform handler.
This class is used to create a class for the platform handler.
- Inheritance
-
- Object
- ChangeNotifier
- PlatformHandler
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Override hasListeners to check if there are any listeners.
no setterinherited
-
properties
→ Map<
String, dynamic> -
A notifying map view for reading and writing property values by name.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
Function listener, {Object? target, bool once = false, bool immediate = false}) → void -
Register a listener for a specific property
target can be an element or elements list like [ property1, property2 ]
inherited
-
dispose(
) → void -
Override dispose to discards any resources used by the object. After
this is called, the object is not in a usable state and should be discarded
(calls to
addListenerwill throw after the object is disposed).inherited -
fromMap(
Map< String, dynamic> props) → void -
Initializes stored values from
propswithout notifying listeners.inherited -
invokeListMethod<
T> (String method, [dynamic arguments, PlatformNotification? notification]) → Future< List< T> ?> -
Invokes a native platform method that returns a list.
override
-
invokeMethod<
T> (String method, [dynamic arguments, PlatformNotification? notification]) → Future< T?> -
Invokes a native platform method with optional notification wrapping.
override
-
n2fCallDispatcher(
MethodCall call) → Future -
Dispatches native-to-Flutter callbacks to matching subscribers.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
[String? target]) → void -
Notify listeners for a specific element
inherited
-
registerChannel(
String channelName, {Future handler(MethodCall call)?}) → void -
Registers the method channel used for Flutter-native calls.
override
-
removeListener(
Function listener) → void -
Remove a listener
inherited
-
subscribe(
List< PlatformNotification> notifications) → void -
Subscribes platform notifications to their registered methods.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String target) → dynamic -
Returns the stored value for
target.inherited -
operator []=(
String target, dynamic value) → void -
Stores
valuefortargetand notifies listeners fortarget.inherited