airbridge_flutter_sdk 1.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 61

Airbridge Flutter SDK #

Airbridge SDK for Flutter

More infos #

https://docs.airbridge.io

1.1.0 #

  • Airbridge.deeplink.setDeferredDeeplinkListener is removed
  • Update Airbridge iOS SDK to 1.11.0
  • Update Airbridge Android SDK to 2.3.5

1.0.1 #

  • Add s.static_framework = true to podspec

1.0.0 #

  • Release

example/lib/main.dart

import 'package:airbridge_flutter_sdk_example/app.dart';
import 'package:airbridge_flutter_sdk_example/storage.dart';
import 'package:flutter/material.dart';

import 'data/log_item.dart';

import 'package:airbridge_flutter_sdk/airbridge.dart';
import 'package:airbridge_flutter_sdk/src/util/log.dart' as AB;

void main() {
    runApp(App());
    init();
}

Future<void> init() async {
    AB.Log.addOnLog((message) {
        List<LogItem> logs = Storage.get('logs');
        if (logs == null) {
            logs = List();
        }

        logs.add(LogItem(
            DateTime.now(),
            message
        ));

        Storage.set('logs', logs);
    });

    Airbridge.deeplink.setDeeplinkListener((deeplink) {
        Storage.set('deeplink', deeplink);
    });

    Storage.set('user', User(
        id: 'test',
        email: 'test@ab180.co',
        phone: '000-0000-0000',
        alias: {
            'alias_key1': 'value1',
            'alias_key2': 'value2'
        },
        attributes: {
            'attributes_key2': 3,
            'attributes_key5': 2200000000,
            'attributes_key4': 10.4,
            'attributes_key3': true,
            'attributes_key1': 'value1'
        }
    ));

    Storage.set('sessionTimeout', 15000);
    Storage.set('deeplinkFetchTimeout', 3000);
    Storage.set('isTrackingAirbridgeDeeplinkOnly', false);
    Storage.set('isTrackingEnabled', true);
    Storage.set('isUserInfoHashed', true);

    Storage.set('deviceUUID', await Airbridge.state.deviceUUID);
    
    AB.Log.info('init');
}

Use this package as a library

1. Depend on it

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


dependencies:
  airbridge_flutter_sdk: ^1.1.0

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:airbridge_flutter_sdk/airbridge.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
31
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because:

  • package:airbridge_flutter_sdk/airbridge.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:airbridge_flutter_sdk/airbridge.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:airbridge_flutter_sdk/airbridge.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:airbridge_flutter_sdk/airbridge.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • airbridge_flutter_sdk that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

136 out of 136 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/airbridge.dart.

Run flutter format to format lib/airbridge.dart.

Format lib/src/airbridge.dart.

Run flutter format to format lib/src/airbridge.dart.

Format lib/src/data/event_option.dart.

Run flutter format to format lib/src/data/event_option.dart.

Fix additional 19 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/data/product.dart (Run flutter format to format lib/src/data/product.dart.)
  • lib/src/data/user.dart (Run flutter format to format lib/src/data/user.dart.)
  • lib/src/event/add_to_cart_event.dart (Run flutter format to format lib/src/event/add_to_cart_event.dart.)
  • lib/src/event/event.dart (Run flutter format to format lib/src/event/event.dart.)
  • lib/src/event/purchase_event.dart (Run flutter format to format lib/src/event/purchase_event.dart.)
  • lib/src/event/sign_in_event.dart (Run flutter format to format lib/src/event/sign_in_event.dart.)
  • lib/src/event/sign_out_event.dart (Run flutter format to format lib/src/event/sign_out_event.dart.)
  • lib/src/event/sign_up_event.dart (Run flutter format to format lib/src/event/sign_up_event.dart.)
  • lib/src/event/view_home_event.dart (Run flutter format to format lib/src/event/view_home_event.dart.)
  • lib/src/event/view_product_detail_event.dart (Run flutter format to format lib/src/event/view_product_detail_event.dart.)
  • lib/src/event/view_product_list_event.dart (Run flutter format to format lib/src/event/view_product_list_event.dart.)
  • lib/src/event/view_search_result_event.dart (Run flutter format to format lib/src/event/view_search_result_event.dart.)
  • lib/src/interface/deeplink_api.dart (Run flutter format to format lib/src/interface/deeplink_api.dart.)
  • lib/src/interface/event_api.dart (Run flutter format to format lib/src/interface/event_api.dart.)
  • lib/src/interface/placement_api.dart (Run flutter format to format lib/src/interface/placement_api.dart.)
  • lib/src/interface/state_api.dart (Run flutter format to format lib/src/interface/state_api.dart.)
  • lib/src/util/check.dart (Run flutter format to format lib/src/util/check.dart.)
  • lib/src/util/log.dart (Run flutter format to format lib/src/util/log.dart.)
  • lib/src/util/map_util.dart (Run flutter format to format lib/src/util/map_util.dart.)

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test