Skip to content

Commit 5577e61

Browse files
committed
✨ 适配新版 Flutter 编译
1 parent bef0fda commit 5577e61

File tree

9 files changed

+15
-295
lines changed

9 files changed

+15
-295
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66

77
build/
88
shell/
9+
.idea/
10+
.vscode/

android/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ rootProject.allprojects {
3838
apply plugin: 'com.android.library'
3939

4040
android {
41+
if (project.android.hasProperty("namespace")) {
42+
namespace = "com.zero.flutter_gromore_ads"
43+
}
4144
compileSdk 31
4245
compileOptions {
4346
sourceCompatibility JavaVersion.VERSION_1_8

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
android {
88
namespace = "com.zero.flutter_gromore_ads_example"
9-
compileSdk = flutter.compileSdkVersion
9+
compileSdk = 34
1010
ndkVersion = flutter.ndkVersion
1111

1212
compileOptions {

example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pluginManagement {
1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
2121
id "com.android.application" version "7.3.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2323
}
2424

2525
include ":app"

example/lib/ads_config.dart

Lines changed: 0 additions & 36 deletions
This file was deleted.

example/lib/home_page.dart

Lines changed: 0 additions & 249 deletions
This file was deleted.

example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:flutter/material.dart';
22

3-
import 'home_page.dart';
3+
import 'pro_page.dart';
44

55
void main() {
66
// 绑定引擎
@@ -20,7 +20,7 @@ class _MyAppState extends State<MyApp> {
2020
@override
2121
Widget build(BuildContext context) {
2222
return const MaterialApp(
23-
home: HomePage(),
23+
home: ProPage(),
2424
);
2525
}
2626
}

example/lib/pro_page.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class _ProPageState extends State<ProPage> {
1313
Widget build(BuildContext context) {
1414
return Scaffold(
1515
appBar: AppBar(
16-
title: const Text('Pro 版付费功能'),
16+
title: const Text('Pro 版体验'),
1717
),
1818
body: SingleChildScrollView(
1919
child: Column(
@@ -22,20 +22,20 @@ class _ProPageState extends State<ProPage> {
2222
child: Padding(
2323
padding: EdgeInsets.all(10.0),
2424
child: Text(
25-
'此功能是插件 Pro 版付费功能,需要购买插件后才能使用\n请联系微信:toponelan 咨询购买并获得技术支持',
25+
'开源版不提供示例,请扫码下载 Pro 版体验',
2626
textAlign: TextAlign.center,
2727
),
2828
),
2929
),
30-
Image.asset(
31-
'assets/images/img_pro.png',
30+
Image.network(
31+
'https://flutterads.top/gzh_qrcode.webp',
3232
fit: BoxFit.cover,
3333
),
3434
const Center(
3535
child: Padding(
3636
padding: EdgeInsets.all(10.0),
3737
child: Text(
38-
'日活 10W 以上,可咨询其他合作模式,目前已有百万级别的客户在合作,获得了非常好的收益提升',
38+
'扫码关注公众号回复【Pro】,即可下载体验',
3939
textAlign: TextAlign.center,
4040
style: TextStyle(
4141
color: Colors.purple,

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
77
version: 3.2.0+16
88

99
environment:
10-
sdk: ">=2.12.0 <3.0.0"
10+
sdk: ">=2.12.0 <4.0.0"
1111

1212
# Dependencies specify other packages that your package needs in order to work.
1313
# To automatically upgrade your package dependencies to the latest versions

0 commit comments

Comments
 (0)