aerogear_core_sdk 0.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 35

aerogear_core_sdk #

A new flutter plugin project.

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

0.0.3 #

  • Sample plugin method getPlatformVersion deleted

0.0.2 #

  • Cleaning example application

0.0.1 #

  • First version, covers getConfiguration and http GET/POST/PUT methods


import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:aerogear_core_sdk/aerogear_core_sdk.dart';
import 'package:aerogear_core_sdk/model/mobile_service.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => new _MyAppState();

class _MyAppState extends State<MyApp> {
  final scaffoldKey = new GlobalKey<ScaffoldState>();
  bool _init = false;

  MobileService _service;

  initState() {

  // Platform messages are asynchronous, so we initialize in an async method.
  initPlatformState() async {
    String platformVersion;
    MobileService service;

    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      service = await AerogearCoreSdk.getConfiguration("cloud");
      print('service => ' + service.toString());
    } on PlatformException {
      _showSnackbar('Failed to get configuration');

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted)

    setState(() {
      _init = true;
      _service = service;

cloudRequest() async {
    dynamic data;
    String message;

    try {
      Map<String, dynamic> options = {
        "path" : _service.url,
        "method": "GET",
        "contentType": "application/json",
        "timeout": 25000
      data = await;
      print('data ==> ' + data.toString());
      message = data.toString();
    } on PlatformException catch (e, s) {
      print('Exception details:\n $e');
      print('Stack trace:\n $s');
      message = 'Error calling hello/';

  void _showSnackbar (String message) {
    final snackbar = new SnackBar(
      content: new Text(message),

  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        key: scaffoldKey,
        appBar: new AppBar(
          title: new Text('Aerogear Core SDK plugin example'),
        body:  new Center(
          child: new Container(
            padding: const EdgeInsets.fromLTRB(32.0, 28.0, 32.0, 8.0),
            child: new RaisedButton(
              child: new Text(_init ? 'Call ' + : 'Init in progress...'),
              color: Theme.of(context).primaryColor,
              textColor: Colors.white,
              onPressed: !_init ? null : () {
                // Perform some action

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  aerogear_core_sdk: ^0.0.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:aerogear_core_sdk/aerogear_core_sdk.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 20, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/aerogear_core_sdk.dart.

Run flutter format to format lib/aerogear_core_sdk.dart.

Format lib/model/mobile_service.dart.

Run flutter format to format lib/model/mobile_service.dart.

Maintenance suggestions

Package is getting outdated. (-66.03 points)

The package was last published 86 weeks ago.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8