Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.71 KB

File metadata and controls

57 lines (37 loc) · 1.71 KB

Use of dio window

中文文档(使用谷歌浏览器打开)

You can listen to the API requests of the Flutter plug-in dio in this window. There is no need to use the print function to print the logs related to dio

image

1.Installation dependency

Add a dependency in the pubspec. yaml under the root directory of your Flutter Project

dd_check_plugin: ^laset_version

run

flutter pub get

2.Add code

Connect the FlutterVersionCheckX plug-in at the entrance of your main function

Like this

void main() {
  await DdCheckPlugin().init(Dio(), initHost: '192.168.199.75', port: 9999, conectSuccess: (Socket s) {
    print('Connection succeeded:${s.address}');
  });
}

InitHost can automatically recognize your local IP address

image

Attribute Introduce
initHost IP address of your development tool computer
port The listening port is generally 9999 by default
conectSuccess Connection success callback
customCoverterResponseData User-defined parsing of data sent to the idea side

Custom listening port

After saving, you need to restart the idea to take effect

image