onInit method

  1. @override
void onInit()
override

Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.

Implementation

@override
void onInit() async {
  super.onInit();
  _autoDownloadMobilePhoto(
      await Mirrorfly.getMediaSetting(networkType: 0, type: "Photos"));
  _autoDownloadMobileVideo(
      await Mirrorfly.getMediaSetting(networkType: 0, type: "Videos"));
  _autoDownloadMobileAudio(
      await Mirrorfly.getMediaSetting(networkType: 0, type: "Audio"));
  _autoDownloadMobileDocument(
      await Mirrorfly.getMediaSetting(networkType: 0, type: "Documents"));

  _autoDownloadWifiPhoto(
      await Mirrorfly.getMediaSetting(networkType: 1, type: "Photos"));
  _autoDownloadWifiVideo(
      await Mirrorfly.getMediaSetting(networkType: 1, type: "Videos"));
  _autoDownloadWifiAudio(
      await Mirrorfly.getMediaSetting(networkType: 1, type: "Audio"));
  _autoDownloadWifiDocument(
      await Mirrorfly.getMediaSetting(networkType: 1, type: "Documents"));
}