BaseMethodChannelMock class abstract
Base class for method channel mocks that provides common functionality and standardizes the way we create method channel mocks.
Constructors
- BaseMethodChannelMock({required MethodChannel methodChannel, TestDefaultBinaryMessenger? binaryMessenger})
- Constructor that sets up the mock handlers
Properties
- binaryMessenger → TestDefaultBinaryMessenger
-
The binary messenger used for testing
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The method channel instance
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearAllPermanentResponses(
) → void - Clear all permanent responses
-
clearAllQueuedResponses(
) → void - Clear all queued responses
-
clearPermanentResponse(
String method) → void - Clear permanent response for a specific method
-
clearQueuedResponses(
String method) → void - Clear queued responses for a specific method
-
dispose(
) → Future< void> - Disposes of the mock channel handlers
-
handleMethodCall(
MethodCall call) → Future - Abstract method that subclasses must implement to handle method calls
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queueResponse(
String method, dynamic response) → void - Queue a response for a specific method
-
setPermanentResponse(
String method, dynamic response) → void - Set a permanent response for a specific method
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited