FlutterError
Objective-C
@interface FlutterError : NSObject
Swift
class FlutterError : NSObject
Error object representing an unsuccessful outcome of invoking a method
on a FlutterMethodChannel, or an error event on a FlutterEventChannel.
-
Creates a
FlutterErrorwith the specified error code, message, and details.Declaration
Objective-C
+ (nonnull instancetype)errorWithCode:(nonnull NSString *)code message:(NSString *_Nullable)message details:(id _Nullable)details;Swift
convenience init(code: String, message: String?, details: Any?)Parameters
codeAn error code string for programmatic use.
messageA human-readable error message.
detailsCustom error details.
-
The error code.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull code;Swift
var code: String { get } -
The error message.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *message;Swift
var message: String? { get } -
The error details.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) id details;Swift
var details: Any? { get }
View on GitHub
Install in Dash
FlutterError Class Reference