if you would like to use this plugin: https://github.com/EddyVerbruggen/cordova-plugin-googleplus with dart. Install this package.
In you code just import GoogleplusPlugin, and watch the available methods. They are exactly the same like on cordova repo.
Remember to install the cordova plugin also!! this is just a wrapper
pub package: https://pub.dartlang.org/packages/cordova_googleplus_plugin
add this to your dependencies
dependencies:
cordova_googleplus_plugin: ^1.0.0
import 'package:cordova_googleplus_plugin/cordova_googleplus_plugin.dart';
-change readme and add this changelog
-first initial working version of this plugin
example/main.dart
import 'dart:html';
import 'package:cordova_googleplus_plugin/cordova_googleplus_plugin.dart';
String CLIENT_ID = 'your google client it';
void main() {
GoogleplusPlugin googleplus = GoogleplusPlugin(webClientId: CLIENT_ID);
googleplus
.trySilentLogin()
.then((GoogleplusPayload payload) => print(payload.email));
document.getElementById('something').onClick.listen((MouseEvent event) {
googleplus
.login()
.then((GoogleplusPayload payload) => print(payload.email));
});
}
Add this to your package's pubspec.yaml file:
dependencies:
cordova_googleplus_plugin: ^1.0.1
You can install packages from the command line:
with pub:
$ pub get
Alternatively, your editor might support pub get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:cordova_googleplus_plugin/cordova_googleplus_plugin.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
1.0.1 | Jan 2, 2019 |
|
|
1.0.0 | Jan 2, 2019 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
38
|
Health:
Code health derived from static analysis.
[more]
|
99
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
100
|
Overall:
Weighted score of the above.
[more]
|
69
|
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: web, other
Primary library:
package:cordova_googleplus_plugin/cordova_googleplus_plugin.dart
with components:js
.
Document public APIs. (-1 points)
31 out of 31 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.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.1.0 <3.0.0 | ||
js | >=0.6.0 <0.7.0 | 0.6.1+1 |