app_wrapper 0.2.2 copy "app_wrapper: ^0.2.2" to clipboard
app_wrapper: ^0.2.2 copied to clipboard

A wrapper that is responsible for initializing various services and utilities needed to run apps safely.

Release Maintained

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:
$ 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):

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:

import 'package:app_wrapper/app_wrapper.dart';

Usage #

Lets take a look at how to use AppWrapper to hook up a your application.


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: <your_app_Contexts>,
      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 is a more detailed snippet, on how to use the package.

Dart & Flutter Version #

  • Dart 2: >= 2.12
  • Flutter: >=2.0.0
3
likes
120
pub points
4%
popularity

Publisher

verified publishersavannahghi.org

A wrapper that is responsible for initializing various services and utilities needed to run apps safely.

Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

MIT (LICENSE)

Dependencies

camera, flutter, flutter_graphql_client, local_auth, platform

More

Packages that depend on app_wrapper