FlutterError
@interface FlutterError : NSObject
Error object representing an unsuccessful outcome of invoking a method
on a FlutterMethodChannel
, or an error event on a FlutterEventChannel
.
-
Creates a
FlutterError
with the specified error code, message, and details.Declaration
Objective-C
+ (nonnull instancetype)errorWithCode:(nonnull NSString *)code message:(NSString *_Nullable)message details:(id _Nullable)details;
Parameters
code
An error code string for programmatic use.
message
A human-readable error message.
details
Custom error details.
-
The error code.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull code;
-
The error message.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *message;
-
The error details.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) id details;