flush method

  1. @override
Future<void> flush()
override

主动触发上报缓存事件到服务器.

Implementation

@override
Future<void> flush() async {
  try {
    methodChannel.invokeMethod('flush');
  } on PlatformException catch (e) {
    print('flush fail: ${e.message}');
  }
}