deepadx_sdk 1.0.2
deepadx_sdk: ^1.0.2 copied to clipboard
DeepAdx Flutter ad mediation SDK. Supports splash, interstitial, rewarded video, native express and banner ad formats. Wraps native mediation SDKs with a unified Dart API.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:deepadx_sdk/deepadx_sdk.dart';
import 'ad_config.dart';
import 'demo_base_page.dart';
import 'home_page.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// 先加载测试配置(按平台×地区从 assets/ad_config.json 选取 AppID + 各广告位 ID)
await AdConfig.load();
await DeepAdxFlutterSdk.init(appId: AdConfig.appId);
await DeepAdxFlutterSdk.setDebug(true);
runApp(const DemoApp());
}
class DemoApp extends StatelessWidget {
const DemoApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'DeepAdx Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: kDeepAdxDemoOrange,
).copyWith(
primary: kDeepAdxDemoOrange,
onPrimary: Colors.white,
),
useMaterial3: true,
appBarTheme: const AppBarTheme(
backgroundColor: kDeepAdxDemoOrange,
foregroundColor: Colors.white,
elevation: 0,
surfaceTintColor: Colors.transparent,
systemOverlayStyle: SystemUiOverlayStyle.light,
),
),
home: const HomePage(),
);
}
}