import 'package:flutter/services.dart';

/// Wraps a method channel that makes calls to AppLovin privacy APIs.
class MyMethodChannel {
  final MethodChannel _methodChannel = const MethodChannel('jigsort.solitaire.jigsaw.match.games/mediation-channel');

  /// Sets whether the user is age restricted in AppLovin.
  Future<void> setAppLovinIsAgeRestrictedUser(bool isAgeRestricted) async {
    return _methodChannel.invokeMethod('setIsAgeRestrictedUser', {'isAgeRestricted': isAgeRestricted});
  }

  /// Sets whether we have user consent for the user in AppLovin.
  Future<void> setHasUserConsent(bool hasUserConsent) async {
    return _methodChannel.invokeMethod('setHasUserConsent', {'hasUserConsent': hasUserConsent});
  }

  ///
  Future<void> setAdvertiserTrackingEnabled(bool advertiserTrackingEnabled) async {
    return _methodChannel.invokeMethod('setAdvertiserTrackingEnabled', {'advertiserTrackingEnabled': advertiserTrackingEnabled});
  }
}
