This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree 4 files changed +9
-8
lines changed
shell/platform/darwin/ios
4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ source_set("flutter_framework_source") {
66
66
" framework/Source/FlutterPlatformViews_Internal.h" ,
67
67
" framework/Source/FlutterPlatformViews_Internal.mm" ,
68
68
" framework/Source/FlutterPluginAppLifeCycleDelegate.mm" ,
69
+ " framework/Source/FlutterRestorationPlugin.h" ,
70
+ " framework/Source/FlutterRestorationPlugin.mm" ,
69
71
" framework/Source/FlutterTextInputDelegate.h" ,
70
72
" framework/Source/FlutterTextInputPlugin.h" ,
71
73
" framework/Source/FlutterTextInputPlugin.mm" ,
Original file line number Diff line number Diff line change 14
14
15
15
- (instancetype )init NS_UNAVAILABLE;
16
16
+ (instancetype )new NS_UNAVAILABLE;
17
- - (instancetype )initWithChannel : (fml::WeakPtr< FlutterMethodChannel> )channel restorationEnabled : (BOOL )waitForData NS_DESIGNATED_INITIALIZER;
17
+ - (instancetype )initWithChannel : (FlutterMethodChannel* )channel restorationEnabled : (BOOL )waitForData NS_DESIGNATED_INITIALIZER;
18
18
19
19
- (NSData *)restorationData ;
20
20
- (void )restorationData : (NSData *)data ;
Original file line number Diff line number Diff line change @@ -18,17 +18,16 @@ @implementation FlutterRestorationPlugin {
18
18
}
19
19
20
20
- (instancetype )init {
21
- @throw ([NSException exceptionWithName: @" FlutterRestorationPlugin must initWithEngine "
21
+ @throw ([NSException exceptionWithName: @" FlutterRestorationPlugin must initWithChannel:restorationEnabled: "
22
22
reason: nil
23
23
userInfo: nil ]);
24
- /Users/goderbauer/dev/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterRestorationPlugin.h
25
24
}
26
25
27
- - (instancetype )initWithChannel : (fml::WeakPtr< FlutterMethodChannel> )channel restorationEnabled : (BOOL )restorationEnabled {
26
+ - (instancetype )initWithChannel : (FlutterMethodChannel* )channel restorationEnabled : (BOOL )restorationEnabled {
28
27
FML_DCHECK (channel) << " channel must be set" ;
29
28
self = [super init ];
30
29
if (self) {
31
- [channel. get () setMethodCallHandler: ^(FlutterMethodCall* call, FlutterResult result) {
30
+ [channel setMethodCallHandler: ^(FlutterMethodCall* call, FlutterResult result) {
32
31
[self handleMethodCall: call result: result];
33
32
}];
34
33
_restorationEnabled = restorationEnabled;
@@ -57,7 +56,7 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
57
56
}
58
57
}
59
58
60
- _ (NSData *)restorationData {
59
+ - (NSData *)restorationData {
61
60
return _restorationData;
62
61
}
63
62
Original file line number Diff line number Diff line change @@ -1438,14 +1438,14 @@ - (BOOL)isPresentingViewController {
1438
1438
#pragma mark - State Restoration
1439
1439
1440
1440
- (void )encodeRestorableStateWithCoder : (NSCoder *)coder {
1441
- NSLog (@" FlutterViewController: encodeRestorableStateWithCoder" );
1442
1441
NSData * restorationData = [[_engine.get () restorationPlugin ] restorationData ];
1442
+ NSLog (@" FlutterViewController: encodeRestorableStateWithCoder %@ " , restorationData);
1443
1443
[coder encodeDataObject: restorationData];
1444
1444
}
1445
1445
1446
1446
- (void )decodeRestorableStateWithCoder : (NSCoder *)coder {
1447
- NSLog (@" FlutterViewController: decodeRestorableStateWithCoder" );
1448
1447
NSData * restorationData = [coder decodeDataObject ];
1448
+ NSLog (@" FlutterViewController: decodeRestorableStateWithCoder %@ " , restorationData);
1449
1449
[[_engine.get () restorationPlugin ] restorationData: restorationData];
1450
1450
}
1451
1451
You can’t perform that action at this time.
0 commit comments