my_method_channel.dart 954 B

123456789101112131415161718192021
  1. import 'package:flutter/services.dart';
  2. /// Wraps a method channel that makes calls to AppLovin privacy APIs.
  3. class MyMethodChannel {
  4. final MethodChannel _methodChannel = const MethodChannel('jigsort.solitaire.jigsaw.match.games/mediation-channel');
  5. /// Sets whether the user is age restricted in AppLovin.
  6. Future<void> setAppLovinIsAgeRestrictedUser(bool isAgeRestricted) async {
  7. return _methodChannel.invokeMethod('setIsAgeRestrictedUser', {'isAgeRestricted': isAgeRestricted});
  8. }
  9. /// Sets whether we have user consent for the user in AppLovin.
  10. Future<void> setHasUserConsent(bool hasUserConsent) async {
  11. return _methodChannel.invokeMethod('setHasUserConsent', {'hasUserConsent': hasUserConsent});
  12. }
  13. ///
  14. Future<void> setAdvertiserTrackingEnabled(bool advertiserTrackingEnabled) async {
  15. return _methodChannel.invokeMethod('setAdvertiserTrackingEnabled', {'advertiserTrackingEnabled': advertiserTrackingEnabled});
  16. }
  17. }