Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
io.flutter.embedding.engine.systemchannels.LifecycleChannel Class Reference

Public Member Functions

 LifecycleChannel (@NonNull DartExecutor dartExecutor)
 
 LifecycleChannel (@NonNull BasicMessageChannel< String > channel)
 
void aWindowIsFocused ()
 
void noWindowsAreFocused ()
 
void appIsResumed ()
 
void appIsInactive ()
 
void appIsPaused ()
 
void appIsDetached ()
 

Detailed Description

A BasicMessageChannel that communicates lifecycle events to the framework.

The activity listens to the Android lifecycle events, in addition to the focus events for windows, and this channel combines that information to decide if the application is the inactive, resumed, paused, or detached state.

Definition at line 22 of file LifecycleChannel.java.

Constructor & Destructor Documentation

◆ LifecycleChannel() [1/2]

io.flutter.embedding.engine.systemchannels.LifecycleChannel.LifecycleChannel ( @NonNull DartExecutor  dartExecutor)
inline

Definition at line 45 of file LifecycleChannel.java.

45 {
46 this(new BasicMessageChannel<String>(dartExecutor, CHANNEL_NAME, StringCodec.INSTANCE));
47 }

◆ LifecycleChannel() [2/2]

io.flutter.embedding.engine.systemchannels.LifecycleChannel.LifecycleChannel ( @NonNull BasicMessageChannel< String >  channel)
inline

Definition at line 50 of file LifecycleChannel.java.

50 {
51 this.channel = channel;
52 }

Member Function Documentation

◆ appIsDetached()

void io.flutter.embedding.engine.systemchannels.LifecycleChannel.appIsDetached ( )
inline

Definition at line 135 of file LifecycleChannel.java.

135 {
136 sendState(AppLifecycleState.DETACHED, lastFocus);
137 }

◆ appIsInactive()

void io.flutter.embedding.engine.systemchannels.LifecycleChannel.appIsInactive ( )
inline

Definition at line 127 of file LifecycleChannel.java.

127 {
128 sendState(AppLifecycleState.INACTIVE, lastFocus);
129 }

◆ appIsPaused()

void io.flutter.embedding.engine.systemchannels.LifecycleChannel.appIsPaused ( )
inline

Definition at line 131 of file LifecycleChannel.java.

131 {
132 sendState(AppLifecycleState.PAUSED, lastFocus);
133 }

◆ appIsResumed()

void io.flutter.embedding.engine.systemchannels.LifecycleChannel.appIsResumed ( )
inline

Definition at line 123 of file LifecycleChannel.java.

123 {
124 sendState(AppLifecycleState.RESUMED, lastFocus);
125 }

◆ aWindowIsFocused()

void io.flutter.embedding.engine.systemchannels.LifecycleChannel.aWindowIsFocused ( )
inline

Definition at line 114 of file LifecycleChannel.java.

114 {
115 sendState(lastAndroidState, true);
116 }

◆ noWindowsAreFocused()

void io.flutter.embedding.engine.systemchannels.LifecycleChannel.noWindowsAreFocused ( )
inline

Definition at line 119 of file LifecycleChannel.java.

119 {
120 sendState(lastAndroidState, false);
121 }

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