简化
This commit is contained in:
parent
10ffe7db30
commit
a00cfa6b3e
@ -10,6 +10,10 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
class Weibo {
|
class Weibo {
|
||||||
|
Weibo() {
|
||||||
|
_channel.setMethodCallHandler(_handleMethod);
|
||||||
|
}
|
||||||
|
|
||||||
static const String _METHOD_REGISTERAPP = 'registerApp';
|
static const String _METHOD_REGISTERAPP = 'registerApp';
|
||||||
static const String _METHOD_ISWEIBOINSTALLED = 'isWeiboInstalled';
|
static const String _METHOD_ISWEIBOINSTALLED = 'isWeiboInstalled';
|
||||||
static const String _METHOD_AUTH = 'auth';
|
static const String _METHOD_AUTH = 'auth';
|
||||||
@ -53,7 +57,6 @@ class Weibo {
|
|||||||
}) {
|
}) {
|
||||||
assert(appKey != null && appKey.isNotEmpty);
|
assert(appKey != null && appKey.isNotEmpty);
|
||||||
assert(scope != null && scope.isNotEmpty);
|
assert(scope != null && scope.isNotEmpty);
|
||||||
_channel.setMethodCallHandler(_handleMethod);
|
|
||||||
return _channel.invokeMethod(
|
return _channel.invokeMethod(
|
||||||
_METHOD_REGISTERAPP,
|
_METHOD_REGISTERAPP,
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
|
Loading…
Reference in New Issue
Block a user