Skip to content

Commit 5e4db20

Browse files
committed
🚀 Update example
1 parent 4b8bb89 commit 5e4db20

File tree

11 files changed

+22
-27
lines changed

11 files changed

+22
-27
lines changed

example/android/app/build.gradle

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,6 @@ plugins {
55
id "dev.flutter.flutter-gradle-plugin"
66
}
77

8-
def localProperties = new Properties()
9-
def localPropertiesFile = rootProject.file('local.properties')
10-
if (localPropertiesFile.exists()) {
11-
localPropertiesFile.withReader('UTF-8') { reader ->
12-
localProperties.load(reader)
13-
}
14-
}
15-
16-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
17-
if (flutterVersionCode == null) {
18-
flutterVersionCode = '1'
19-
}
20-
21-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
22-
if (flutterVersionName == null) {
23-
flutterVersionName = '1.0'
24-
}
25-
268
android {
279
namespace "com.fluttercandies.wechatAssetsPickerExample"
2810
compileSdk flutter.compileSdkVersion
@@ -34,9 +16,9 @@ android {
3416
defaultConfig {
3517
applicationId "com.fluttercandies.wechatAssetsPickerExample"
3618
minSdkVersion 21
37-
targetSdkVersion flutter.targetSdkVersion
38-
versionCode flutterVersionCode.toInteger()
39-
versionName flutterVersionName
19+
targetSdk flutter.targetSdkVersion
20+
versionCode flutter.versionCode
21+
versionName flutter.versionName
4022
}
4123

4224
kotlinOptions {

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pluginManagement {
1919

2020
plugins {
2121
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22-
id "com.android.application" version "8.2.2" apply false
23-
id "org.jetbrains.kotlin.android" version "1.9.21" apply false
22+
id "com.android.application" version "8.6.1" apply false
23+
id "org.jetbrains.kotlin.android" version "2.1.10" apply false
2424
}
2525

2626
include ":app"

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
);
267267
runOnlyForDeploymentPostprocessing = 0;
268268
shellPath = /bin/sh;
269-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
269+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
270270
};
271271
/* End PBXShellScriptBuildPhase section */
272272

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<MacroExpansion>
3132
<BuildableReference
@@ -54,11 +55,13 @@
5455
buildConfiguration = "Debug"
5556
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5657
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
5759
launchStyle = "0"
5860
useCustomWorkingDirectory = "NO"
5961
ignoresPersistentStateOnLaunch = "NO"
6062
debugDocumentVersioning = "YES"
6163
debugServiceExtension = "internal"
64+
enableGPUValidationMode = "1"
6265
allowLocationSimulation = "YES">
6366
<BuildableProductRunnable
6467
runnableDebuggingMode = "0">

example/ios/Runner/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundleInfoDictionaryVersion</key>
1616
<string>6.0</string>
1717
<key>CFBundleName</key>
18-
<string>com.fluttercandies.wechatAssetsPickerExample</string>
18+
<string>flutter_wechat_assets_picker_example</string>
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>

example/lib/l10n/gen/app_localizations_en.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore: unused_import
2+
import 'package:intl/intl.dart' as intl;
13
import 'app_localizations.dart';
24

35
// ignore_for_file: type=lint

example/lib/l10n/gen/app_localizations_zh.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore: unused_import
2+
import 'package:intl/intl.dart' as intl;
13
import 'app_localizations.dart';
24

35
// ignore_for_file: type=lint

example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
ignoresPersistentStateOnLaunch = "NO"
6060
debugDocumentVersioning = "YES"
6161
debugServiceExtension = "internal"
62+
enableGPUValidationMode = "1"
6263
allowLocationSimulation = "YES">
6364
<BuildableProductRunnable
6465
runnableDebuggingMode = "0">
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import Cocoa
22
import FlutterMacOS
33

4-
@NSApplicationMain
4+
@main
55
class AppDelegate: FlutterAppDelegate {
66
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
77
return true
88
}
9+
10+
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
11+
return true
12+
}
913
}

example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ dev_dependencies:
2828

2929
flutter:
3030
uses-material-design: true
31+
generate: true
3132
assets:
3233
- assets/

0 commit comments

Comments
 (0)