Skip to content

Commit

Permalink
Fix AppLovin Adapter dart format
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 719474042
  • Loading branch information
LTPhantom committed Jan 25, 2025
1 parent 21463bf commit 61866f0
Showing 1 changed file with 24 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ PlatformException _createConnectionError(String channelName) {
);
}


class _PigeonCodec extends StandardMessageCodec {
const _PigeonCodec();
@override
Expand All @@ -42,9 +41,12 @@ class AppLovinSDKApi {
/// Constructor for [AppLovinSDKApi]. The [binaryMessenger] named argument is
/// available for dependency injection. If it is left null, the default
/// BinaryMessenger will be used which routes to the host platform.
AppLovinSDKApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
: pigeonVar_binaryMessenger = binaryMessenger,
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
AppLovinSDKApi({
BinaryMessenger? binaryMessenger,
String messageChannelSuffix = '',
}) : pigeonVar_binaryMessenger = binaryMessenger,
pigeonVar_messageChannelSuffix =
messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
final BinaryMessenger? pigeonVar_binaryMessenger;

static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
Expand All @@ -53,14 +55,17 @@ class AppLovinSDKApi {

/// Used to configure GDPR consent on the Android or iOS AppLovin SDK
Future<void> setHasUserConsent(bool hasUserConsent) async {
final String pigeonVar_channelName = 'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setHasUserConsent$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final String pigeonVar_channelName =
'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setHasUserConsent$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel =
BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final List<Object?>? pigeonVar_replyList =
await pigeonVar_channel.send(<Object?>[hasUserConsent]) as List<Object?>?;
await pigeonVar_channel.send(<Object?>[hasUserConsent])
as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName);
} else if (pigeonVar_replyList.length > 1) {
Expand All @@ -76,12 +81,14 @@ class AppLovinSDKApi {

/// Used to opt out of the sale of personal information in AppLovin SDK.
Future<void> setDoNotSell(bool doNotSell) async {
final String pigeonVar_channelName = 'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setDoNotSell$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final String pigeonVar_channelName =
'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setDoNotSell$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel =
BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final List<Object?>? pigeonVar_replyList =
await pigeonVar_channel.send(<Object?>[doNotSell]) as List<Object?>?;
if (pigeonVar_replyList == null) {
Expand Down

0 comments on commit 61866f0

Please sign in to comment.