channel_monitor

monitor flutter platform channel profiler, include EventChannel, MethodChannel, and BinaryChannel.

中文文档

Getting Started

void main() {
  //add this code to first in your flutter project.
  //note: this code will replace default
  CustomFlutterBinding();
  runApp(MyApp());
}

now this package will work and save channel profiler.

Parse channel profiler data

  1. add channel profiler page in your project:
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    //the channel profiler page
    return BasePage(ChannelDataManager.instance);
  }
}
  1. dump to it:

3361635491551_.pic.jpg

Other Use

  1. Parse channel profiler use web The example support web, you can run it in web and parse channel profiler files in web.

Note: the web don't support platforms channel, so it can parse channel profiler files form your computer.

More Config

ChannelMonitorManager.instance
   ..timeOut = 10 //set monitor time out seconds, default is 5
   ..log = true // default is false
   ..testData =
       false // use test data in Android or iOS, default is false : user your current project data
   ..addIgnoreChannelList("ignorechannle")//add ignore channel name, default is  "flutter/platform", "flutter/navigation"
   ..dataUpload = (path) {
     //the channel profiler will save in app's private dir.
     //it will callback will the data > 10K
     //you can upload data to your service and parse it.

     File file = File(path);
     // upload content to your service
     print("channel data, file: $path \n content: ${file.readAsStringSync()}");

     //if return true, the data will be delete.
     return true;
   };

if you custom WidgetsFlutterBinding or BinaryMessenger, you can use ChannelMonitorManager.

more info, clickcustom_flutter_binding

Libraries

base_channel_data
base_page
bean
channel_data
channel_monitor
custom_flutter_binding
data_upload
line_chart
Line chart example
method_data
native_parse_data
stack_data
utils
web_parse_data