getuiflut 0.0.8

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 53

Getui Flutter Plugin #

引用 #

在工程 pubspec.yaml 中加入 dependencies

dependencies:
  getuiflut: ^0.0.7
  
Dart Packages: https://pub.dartlang.org/packages?q=getuiflut

配置 #

Android: #

/android/app/build.gradle 中添加下列代码:

android: {
  ....
  defaultConfig {
    applicationId ""
    
    manifestPlaceholders = [
    	GETUI_APP_ID    : "USER_APP_ID",
    	GETUI_APP_KEY   : "USER_APP_KEY",
    	GETUI_APP_SECRET: "USER_APP_SECRET" 
    ]
  }    
}
iOS: #

在你项目的main.dart中添加下列代码:

   Getuiflut().startSdk(
      appId: "8eLAkGIYnGAwA9fVYZU93A",
      appKey: "VFX8xYxvVF6w59tsvY6XN",
      appSecret: "Kv3TeED8z19QwnMLdzdI35"
   );
    

使用 #

import 'package:getuiflut/getuiflut.dart';

iOS API #

	Getuiflut().addEventHandler(
      onReceiveClientId: (String message) async {
        print("flutter onReceiveClientId: $message");
        setState(() {
          _getClientId = "ClientId: $message";
        });
      },
      onRegisterDeviceToken: (String message) async {
        setState(() {
          _getDeviceToken = "DeviceToken: $message";
        });
      },
      onReceivePayload: (String message) async {
        setState(() {
          _onReceivePayload = "$message";
        });
      },
      onReceiveNotificationResponse: (Map<String, dynamic> message) async {
        setState(() {
          _onReceiveNotificationResponse = "$message";
        });
      },
      onAppLinkPayload: (String message) async {
        setState(() {
          _onAppLinkPayLoad = "$message";
        });
      },
      onRegisterVoipToken: (String message) async {
        setState(() {
          _getVoipToken = "$message";
        });
      },
      onReceiveVoipPayLoad: (Map<String, dynamic> message) async {
        setState(() {
          _onReceiveVoipPayLoad = "$message";
        });
      },
    );

Android API #

Getuiflut().addEventHandler(
      onReceiveClientId: (String message) async {
        print("flutter onReceiveClientId: $message"); // 注册收到 cid 的回调
        setState(() {
          _getClientId = "flutter onReceiveClientId: $message";
        });
      },
      onReceiveMessageData: (Map<String, dynamic> msg) async {
        print("flutter onReceiveMessageData: $msg"); // 透传消息的内容都会走到这里
        setState(() {
          _payloadInfo = msg['payload'];
        });
      },
      onNotificationMessageArrived: (Map<String, dynamic> msg) async {
        print("flutter onNotificationMessageArrived"); // 消息到达的回调
        setState(() {
          _notificationState = 'Arrived';
        });
      },
      onNotificationMessageClicked: (Map<String, dynamic> msg) async {
        print("flutter onNotificationMessageClicked"); // 消息点击的回调
        setState(() {
          _notificationState = 'Clicked';
        });
      },
    );

0.0.7 #

  • TODO: Describe initial release.

example/README.md

getuiflut_example #

Demonstrates how to use the getuiflut plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  getuiflut: ^0.0.8

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:getuiflut/getuiflut.dart';
  
Version Uploaded Documentation Archive
0.0.8 May 20, 2019 Go to the documentation of getuiflut 0.0.8 Download getuiflut 0.0.8 archive
0.0.7 Apr 16, 2019 Go to the documentation of getuiflut 0.0.7 Download getuiflut 0.0.7 archive
0.0.6 Apr 16, 2019 Go to the documentation of getuiflut 0.0.6 Download getuiflut 0.0.6 archive
0.0.5 Apr 15, 2019 Go to the documentation of getuiflut 0.0.5 Download getuiflut 0.0.5 archive
0.0.4 Mar 15, 2019 Go to the documentation of getuiflut 0.0.4 Download getuiflut 0.0.4 archive
0.0.3 Mar 14, 2019 Go to the documentation of getuiflut 0.0.3 Download getuiflut 0.0.3 archive
0.0.2 Mar 8, 2019 Go to the documentation of getuiflut 0.0.2 Download getuiflut 0.0.2 archive
0.0.1 Mar 7, 2019 Go to the documentation of getuiflut 0.0.1 Download getuiflut 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
21
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
65
Overall:
Weighted score of the above. [more]
53
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

12 out of 12 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/getuiflut.dart.

Run flutter format to format lib/getuiflut.dart.

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

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.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test