saveMediaSettings static method

dynamic saveMediaSettings({
  1. required bool photos,
  2. required bool videos,
  3. required bool audios,
  4. required bool documents,
  5. required int networkType,
})

Saves media settings for the user.

This static method is used to save the user's media download settings while using Mobile Network and WIFI, such as preferences for photos, videos, audio, and documents, as well as the preferred network type for media downloads.

Parameters:

  • photos: A boolean indicating whether the user allows photo downloads.
  • videos: A boolean indicating whether the user allows video downloads.
  • audio: A boolean indicating whether the user allows audio downloads.
  • documents: A boolean indicating whether the user allows document downloads.
  • networkType: An integer representing the type of network. This could be values such as 0 for cellular data, 1 for Wi-Fi, etc.

Returns: A future that completes with a boolean value indicating whether the media settings were successfully saved.

Implementation

static saveMediaSettings(
    {required bool photos,
    required bool videos,
    required bool audios,
    required bool documents,
    required int networkType}) async {
  return FlyChatFlutterPlatform.instance
      .saveMediaSettings(photos, videos, audios, documents, networkType);
}