channel_monitor

Creator: coderz1093

Last updated:

0 purchases

channel_monitor Image
channel_monitor Images

Languages

Categories

Add to Cart

Description:

channel monitor

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());
}
copied to clipboard
now this package will work and save channel profiler.
Parse channel profiler data #

add channel profiler page in your project:

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
//the channel profiler page
return BasePage(ChannelDataManager.instance);
}
}
copied to clipboard

dump to it:


Other Use #

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;
};
copied to clipboard
if you custom WidgetsFlutterBinding or BinaryMessenger, you can use ChannelMonitorManager. #
more info, clickcustom_flutter_binding

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.