Flutter iOS Embedder
FlutterRestorationPlugin Class Reference

#import <FlutterRestorationPlugin.h>

Inheritance diagram for FlutterRestorationPlugin:

Instance Methods

(instancetype) - NS_UNAVAILABLE
 
(instancetype) - initWithChannel:restorationEnabled:
 
(void) - markRestorationComplete
 
(void) - reset
 

Class Methods

(instancetype) + NS_UNAVAILABLE
 

Properties

NSData * restorationData
 

Detailed Description

Definition at line 12 of file FlutterRestorationPlugin.h.

Method Documentation

◆ initWithChannel:restorationEnabled:

- (instancetype) initWithChannel: (FlutterMethodChannel*)  channel
restorationEnabled: (BOOL)  NS_DESIGNATED_INITIALIZER 

Definition at line 23 of file FlutterRestorationPlugin.mm.

23  :(FlutterMethodChannel*)channel
24  restorationEnabled:(BOOL)restorationEnabled {
25  FML_DCHECK(channel) << "channel must be set";
26  self = [super init];
27  if (self) {
28  [channel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
29  [self handleMethodCall:call result:result];
30  }];
31  _restorationEnabled = restorationEnabled;
32  _waitForData = restorationEnabled;
33  }
34  return self;
35 }

References _restorationEnabled, and FlutterMethodChannel::setMethodCallHandler:.

◆ markRestorationComplete

- (void) markRestorationComplete

Definition at line 66 of file FlutterRestorationPlugin.mm.

66  {
67  _waitForData = NO;
68  if (self.pendingRequest != nil) {
69  NSAssert(_restorationEnabled, @"No request can be pending when restoration is disabled.");
70  self.pendingRequest([self dataForFramework]);
71  self.pendingRequest = nil;
72  }
73 }

References _restorationEnabled.

◆ NS_UNAVAILABLE [1/2]

+ (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE

◆ reset

- (void) reset

Definition at line 75 of file FlutterRestorationPlugin.mm.

75  {
76  self.pendingRequest = nil;
77  self.restorationData = nil;
78 }

Property Documentation

◆ restorationData

- (NSData*) restorationData
readwritenonatomiccopy

Definition at line 18 of file FlutterRestorationPlugin.h.


The documentation for this class was generated from the following files:
_restorationEnabled
BOOL _restorationEnabled
Definition: FlutterRestorationPlugin.mm:18
FlutterMethodChannel
Definition: FlutterChannels.h:220
-[FlutterMethodChannel setMethodCallHandler:]
void setMethodCallHandler:(FlutterMethodCallHandler _Nullable handler)