# 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`.

- `+errorWithCode:message:details:`

  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;

  Swift

      convenience init(code: String, message: String?, details: Any?)

  #### Parameters

  `code` | An error code string for programmatic use.
  `message` | A human-readable error message.
  `details` | Custom error details.

- `code`

  The error code.

  #### Declaration

  Objective-C

      @property (nonatomic, readonly) NSString *_Nonnull code;

  Swift

      var code: String { get }

- `message`

  The error message.

  #### Declaration

  Objective-C

      @property (nonatomic, readonly, nullable) NSString *message;

  Swift

      var message: String? { get }

- `details`

  The error details.

  #### Declaration

  Objective-C

      @property (nonatomic, readonly, nullable) id details;

  Swift

      var details: Any? { get }

© 2023 Flutter. All rights reserved. (Last updated: 2023-05-23)

Generated by jazzy ♪♫ v0.14.3, a Realm project.