MethodChannelNetwork class
An implementation of NetworkPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- NetworkPlatform
- MethodChannelNetwork
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelAllRequest(
) → Future< String?> -
取消所有HTTP请求
override
-
cancelRequestWithURL(
Map< String, String> map) → Future<String?> -
取消指定URL的HTTP请求
override
-
closeLog(
) → Future< String?> -
关闭日志打印,默认关闭
override
-
downloadWithURL(
Map< String, dynamic> map) → Future<String?> -
下载文件
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openLog(
) → Future< String?> -
开启日志打印 (Debug级别)
override
-
reachabilityStatusChangeBlock(
) → Future< String?> -
网络监听,获取当前网络状态
override
-
requestWithMethod(
Map< String, dynamic> map) → Future<String?> -
发起网络请求
override
-
setHTTPHeaderValue(
Map< String, dynamic> map) → Future<String?> -
设置请求头
override
-
setRequestSerializer(
String type) → Future< String?> -
设置网络请求参数的格式:默认为JSON格式
override
-
setResponseSerializer(
String type) → Future< String?> -
设置服务器响应数据格式:默认为JSON格式
override
-
setTimeoutInterval(
double time) → Future< String?> -
设置服务器响应时间 默认30s
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited