Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
FakeLifecycleProvider Class Reference
Inheritance diagram for FakeLifecycleProvider:
<FlutterAppLifecycleProvider>

Instance Methods

(BOOL- hasDelegate:
 
(void) - addApplicationLifecycleDelegate: [implementation]
 
(void) - removeApplicationLifecycleDelegate: [implementation]
 

Properties

NSPointerArray * registeredDelegates
 

Detailed Description

Definition at line 71 of file FlutterEngineTest.mm.

Method Documentation

◆ addApplicationLifecycleDelegate:

- (void) addApplicationLifecycleDelegate: (nonnull NSObject< FlutterAppLifecycleDelegate > *)  delegate
implementation

Adds an object implementing |FlutterAppLifecycleDelegate| to the list of delegates to be informed of application lifecycle events.

Reimplemented from <FlutterAppLifecycleProvider>.

Definition at line 73 of file FlutterEngineTest.mm.

92 :(nonnull NSObject<FlutterAppLifecycleDelegate>*)delegate {
93 _delegates.push_back((__bridge void*)delegate);
94}
NSPointerArray * _delegates

◆ hasDelegate:

- (BOOL) hasDelegate: (nonnull NSObject<FlutterAppLifecycleDelegate>*)  delegate

Definition at line 73 of file FlutterEngineTest.mm.

104 :(nonnull NSObject<FlutterAppLifecycleDelegate>*)delegate {
105 return std::find(_delegates.begin(), _delegates.end(), (__bridge void*)delegate) !=
106 _delegates.end();
107}

◆ removeApplicationLifecycleDelegate:

- (void) removeApplicationLifecycleDelegate: (nonnull NSObject< FlutterAppLifecycleDelegate > *)  delegate
implementation

Removes an object implementing |FlutterAppLifecycleDelegate| to the list of delegates to be informed of application lifecycle events.

Reimplemented from <FlutterAppLifecycleProvider>.

Definition at line 73 of file FlutterEngineTest.mm.

96 :
97 (nonnull NSObject<FlutterAppLifecycleDelegate>*)delegate {
98 auto delegateIndex = std::find(_delegates.begin(), _delegates.end(), (__bridge void*)delegate);
99 NSAssert(delegateIndex != _delegates.end(),
100 @"Attempting to unregister a delegate that was not registered.");
101 _delegates.erase(delegateIndex);
102}

Property Documentation

◆ registeredDelegates

- (NSPointerArray*) registeredDelegates
readnonatomicstrong

Definition at line 73 of file FlutterEngineTest.mm.


The documentation for this class was generated from the following file: