getAdUnitId method

String? getAdUnitId(
  1. String adType,
  2. String? iosUnitId,
  3. String? androidUnitId
)

Get the Ad Unit ID based on the platform and ad type.

Implementation

String? getAdUnitId(
  String adType,
  String? iosUnitId,
  String? androidUnitId,
) {
  if (Platform.isIOS || Platform.isAndroid) {
    if (Platform.isIOS) {
      return kDebugMode ? kFastAdmobTestUnitsIOS[adType] : iosUnitId;
    }

    return kDebugMode ? kFastAdmobTestUnitsAndroid[adType] : androidUnitId;
  }

  return null;
}