Skip to content

Commit

Permalink
Revise mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
bartonip committed Nov 2, 2021
1 parent 6eab344 commit 161b805
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/flutter_fgbg.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,23 @@ enum FGBGType {

willEnterForeground,

willStart,
willTerminate,

willSwitchContext,
}

Map<String, FGBGType> messageToFGBGMapping = {
// iOS Mappings
"didBecomeActive": FGBGType.willStart,
"didBecomeActive": FGBGType.enteredForeground,
"didEnterBackground": FGBGType.enteredBackground,
"willEnterForeground": FGBGType.willEnterForeground,
"willResignActive": FGBGType.willSwitchContext,
"willTerminate": FGBGType.willTerminate,

// Android Mappings
"ON_CREATE": FGBGType.willStart,
"ON_RESUME": FGBGType.enteredForeground,
"ON_STOP": FGBGType.enteredBackground,
"ON_RESUME": FGBGType.willEnterForeground,
"ON_CREATE": FGBGType.willEnterForeground,
"ON_PAUSE": FGBGType.willSwitchContext,
"ON_DESTROY": FGBGType.willTerminate,
};
Expand Down

0 comments on commit 161b805

Please sign in to comment.