-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/db-common-cmake-collision
- Loading branch information
Showing
42 changed files
with
474 additions
and
58 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
packages/aft/test/version_bump/data/repo_snapshot/packages/aws_common/pubspec.yaml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...mp/data/repo_snapshot/packages/notifications/push/amplify_push_notifications/pubspec.yaml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 2.4.2 | ||
|
||
- Minor bug fixes and improvements | ||
|
||
## 2.4.1 | ||
|
||
### Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import 'dart:async'; | ||
|
||
import 'package:amplify_api_dart/amplify_api_dart.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
/// {@template amplify_api.flutter_life_cycle} | ||
/// Creates a stream of [ProcessStatus] mapped from [AppLifecycleListener](https://api.flutter.dev/flutter/widgets/AppLifecycleListener-class.html). | ||
/// {@endtemplate} | ||
@internal | ||
class FlutterLifeCycle extends ProcessLifeCycle { | ||
/// {@macro amplify_api.flutter_life_cycle} | ||
FlutterLifeCycle() { | ||
AppLifecycleListener( | ||
onStateChange: _onStateChange, | ||
); | ||
} | ||
|
||
final _stateController = | ||
StreamController<ProcessStatus>.broadcast(sync: true); | ||
|
||
@override | ||
Stream<ProcessStatus> get onStateChanged => _stateController.stream; | ||
|
||
void _onStateChange(AppLifecycleState state) { | ||
switch (state) { | ||
case AppLifecycleState.detached: | ||
_stateController.add(ProcessStatus.detached); | ||
case AppLifecycleState.paused: | ||
_stateController.add(ProcessStatus.paused); | ||
case AppLifecycleState.hidden: | ||
_stateController.add(ProcessStatus.hidden); | ||
case AppLifecycleState.inactive: | ||
_stateController.add(ProcessStatus.inactive); | ||
case AppLifecycleState.resumed: | ||
_stateController.add(ProcessStatus.resumed); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/api/amplify_api_dart/lib/src/graphql/web_socket/types/process_life_cycle.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/// Possible process life cycle states | ||
enum ProcessStatus { | ||
/// Engine is running without a view. | ||
detached, | ||
|
||
/// Application is not visible to the user or responding to user input. | ||
paused, | ||
|
||
/// All views of an application are hidden. | ||
hidden, | ||
|
||
/// A view of the application is visible, but none have input. | ||
inactive, | ||
|
||
/// Default running mode. | ||
resumed, | ||
} | ||
|
||
/// {@template amplify_api_dart.process_life_cycle} | ||
/// Used to create a stream representing the process life cycle state. | ||
/// | ||
/// The generated stream is empty. | ||
/// {@endtemplate} | ||
class ProcessLifeCycle { | ||
/// {@macro amplify_api_dart.process_life_cycle} | ||
const ProcessLifeCycle(); | ||
|
||
/// Generates a new stream of [ProcessStatus]. | ||
Stream<ProcessStatus> get onStateChanged => const Stream.empty(); | ||
} |
Oops, something went wrong.