add in the discovery section
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ddf6bf8638
commit
845476d057
@ -1,6 +1,12 @@
|
|||||||
package com.example.justmusic
|
package com.example.justmusic
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.google.android.gms.ads.MobileAds
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
class MainActivity: FlutterActivity() {
|
class MainActivity: FlutterActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
MobileAds.initialize(this)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
class AdHelper {
|
||||||
|
static String get bannerAdUnitId {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
return 'ca-app-pub-3940256099942544/6300978111';
|
||||||
|
} else if (Platform.isIOS) {
|
||||||
|
return 'ca-app-pub-3940256099942544/2934735716';
|
||||||
|
} else {
|
||||||
|
throw new UnsupportedError('Unsupported platform');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static String get interstitialAdUnitId {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
return "ca-app-pub-3940256099942544/1033173712";
|
||||||
|
} else if (Platform.isIOS) {
|
||||||
|
return "ca-app-pub-3940256099942544/4411468910";
|
||||||
|
} else {
|
||||||
|
throw new UnsupportedError("Unsupported platform");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static String get rewardedAdUnitId {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
return "ca-app-pub-3940256099942544/5224354917";
|
||||||
|
} else if (Platform.isIOS) {
|
||||||
|
return "ca-app-pub-3940256099942544/1712485313";
|
||||||
|
} else {
|
||||||
|
throw new UnsupportedError("Unsupported platform");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
import 'package:flutter/Material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||||
|
import 'package:ionicons/ionicons.dart';
|
||||||
|
import 'package:justmusic/values/constants.dart';
|
||||||
|
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
|
||||||
|
|
||||||
|
class AdComponent extends StatefulWidget {
|
||||||
|
final Container ad;
|
||||||
|
const AdComponent({super.key, required this.ad});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AdComponent> createState() => _AdComponentState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AdComponentState extends State<AdComponent> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.fromLTRB(8, 4, 8, 4),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1000),
|
||||||
|
color: grayColor,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Ionicons.information_circle,
|
||||||
|
color: grayText.withOpacity(0.4),
|
||||||
|
size: 15,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Sponsorisé",
|
||||||
|
style: GoogleFonts.plusJakartaSans(
|
||||||
|
color: grayText.withOpacity(0.4), fontWeight: FontWeight.w500, fontSize: 12),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
widget.ad,
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue