https://github.com/savannahghi/app_wrapper
It is a shared library between BeWell-Consumer and BeWell-Professional and is responsible for putting together everything that these app needs in order to run safely.
https://github.com/savannahghi/app_wrapper
dart device-capabilities flutter mobile-app
Last synced: 2 months ago
JSON representation
It is a shared library between BeWell-Consumer and BeWell-Professional and is responsible for putting together everything that these app needs in order to run safely.
- Host: GitHub
- URL: https://github.com/savannahghi/app_wrapper
- Owner: savannahghi
- License: mit
- Created: 2021-06-10T11:14:37.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-10-18T12:15:42.000Z (over 3 years ago)
- Last Synced: 2025-06-16T07:57:30.204Z (about 1 year ago)
- Topics: dart, device-capabilities, flutter, mobile-app
- Language: Dart
- Homepage: https://pub.dev/packages/app_wrapper
- Size: 78.1 KB
- Stars: 2
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://shields.io/)
[](https://shields.io/)
# app_wrapper
`sil_app_wrapper` is an open source project — it's one among many other shared libraries that make up the wider ecosystem of software made and open sourced by `Savannah Informatics Limited`.
It is a shared library between [BeWell-Consumer] and [SladeAdvantage] and is responsible for putting together everything that these app needs in order to run safely.
## Installation Instructions
Use this package as a library by depending on it
Run this command:
- With Flutter:
```dart
$ flutter pub add app_wrapper
```
This will add a line like this to your package's `pubspec.yaml` (and run an implicit dart pub get):
```dart
dependencies:
app_wrapper: ^0.2.2
```
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Lastly:
Import it like so:
```dart
import 'package:app_wrapper/app_wrapper.dart';
```
## Usage
Lets take a look at how to use AppWrapper to hook up a your application.
```dart
class YourApp extends StatelessWidget {
const YourApp({ Key? key }) : super(key: key);
@override
Widget build(BuildContext context) {
return AppWrapper(
appName: appName,
eventBus: EventBus(),
graphQLClient: GraphQlClient(
'id_token',
'endpoint_url',
),
appContexts: ,
child: YourAppEntryWidget(),
);
}
}
```
With the above snippet, we have successfully hooked up our app to use `AppWrapper`. Your application's element tree now has access to `DeviceCapabilities`, `graphQLClient` etc, that is passed down. These include Device Camera, Device BiometricType (face or fingerprint) and Endpoints.
Provided [here](https://github.com/savannahghi/app_wrapper/blob/main/example/main.dart) is a more detailed snippet, on how to use the package.
## Dart & Flutter Version
- Dart 2: >= 2.12
- Flutter: >=2.0.0