deepadx_sdk 1.0.3
deepadx_sdk: ^1.0.3 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 'ad_config.dart';
import 'demo_base_page.dart';
import 'home_page.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Android 15+ 忽略 statusBarColor,但低版本仍依赖这里把状态栏涂橙
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarColor: kDeepAdxDemoOrange,
statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.dark,
));
// 仅加载测试配置;SDK 初始化必须等用户同意隐私政策(见 HomePage)
await AdConfig.load();
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.fromSeed:它会对种子色做色调映射,
// 派生出的 primary 不再是品牌色 #F58220,这里直接写死各槽位。
useMaterial3: true,
brightness: Brightness.light,
colorScheme: const ColorScheme.light(
primary: kDeepAdxDemoOrange,
onPrimary: Colors.white,
secondary: kDeepAdxDemoOrange,
onSecondary: Colors.white,
surface: Colors.white,
onSurface: Color(0xFF222222),
),
scaffoldBackgroundColor: Colors.white,
appBarTheme: const AppBarTheme(
backgroundColor: kDeepAdxDemoOrange,
foregroundColor: Colors.white,
elevation: 0,
scrolledUnderElevation: 0,
surfaceTintColor: Colors.transparent,
shadowColor: Colors.transparent,
systemOverlayStyle: SystemUiOverlayStyle.light,
),
listTileTheme: const ListTileThemeData(
tileColor: Colors.white,
textColor: Color(0xFF222222),
iconColor: Color(0xFF222222),
),
),
home: const HomePage(),
);
}
}