Skip to content

Commit

Permalink
fix: flutter downgrade to 3.22.2 (#11)
Browse files Browse the repository at this point in the history
* fix: flutter downgrade to 3.22.2

在某些设备上动画会失效,relate to flutter/flutter#155048

* ci: Update release.yml

---------

Co-authored-by: GhostenEditor <>
  • Loading branch information
GhostenEditor authored Dec 1, 2024
1 parent e63d373 commit 6faed75
Show file tree
Hide file tree
Showing 20 changed files with 63 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: subosito/flutter-action@v1
with:
flutter-version: '3.24.4'
flutter-version: '3.22.2'

- run: flutter pub get

Expand Down
21 changes: 13 additions & 8 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = "1"
}

def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "1.0"
}

android {
namespace = "com.ghosten.player"
compileSdk = flutter.compileSdkVersion
Expand All @@ -28,19 +38,14 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.ghosten.player"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
}

signingConfigs {
Expand Down
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
Expand Down
17 changes: 0 additions & 17 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,6 @@ rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}

// FIX flutter plugin install_plugin for Flutter 3.24
subprojects {
afterEvaluate { project ->
if (project.group == "com.example.installplugin") {
project.android {
compileSdkVersion = 34
namespace = project.group
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
}
}
}

subprojects {
project.evaluationDependsOn(":app")
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

include ":app"
2 changes: 1 addition & 1 deletion lib/components/pop_to_top.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PopToTop extends StatelessWidget {
Widget build(BuildContext context) {
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) {
onPopInvoked: (didPop) {
if (!didPop) {
if (PlatformApi.isAndroidTV() && controller.offset > 1000) {
controller.animateTo(
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class _QuitConfirmState extends State<QuitConfirm> {
? widget.child
: PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) {
onPopInvoked: (didPop) {
if (didPop) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/library.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class _LibraryManageState extends State<LibraryManage> {
Widget build(BuildContext context) {
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) {
onPopInvoked: (didPop) {
if (!didPop) Navigator.of(context).pop(refresh);
},
child: Scaffold(
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/player/live_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class _LivePlayerPageState extends State<LivePlayerPage> {
),
PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) async {
onPopInvoked: (didPop) async {
if (didPop) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Future<NotificationResponse<T?>?> showNotification<T>(
future: future,
builder: (context, snapshot) => PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) {
onPopInvoked: (didPop) {
if (!didPop && !snapshot.connectionState.isLoading()) {
Navigator.of(context).pop(NotificationResponse(data: snapshot.data, error: snapshot.error));
}
Expand Down
2 changes: 1 addition & 1 deletion packages/api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Api Plugin for Ghosten Player"
version: 1.2.0

environment:
sdk: ^3.5.4
sdk: '>=3.4.3 <4.0.0'
flutter: '>=3.3.0'

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/bluetooth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Bluetooth Plugin for Ghosten Player"
version: 1.2.0

environment:
sdk: ^3.5.4
sdk: '>=3.4.3 <4.0.0'
flutter: '>=3.3.0'

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/file_picker/lib/src/file_picker_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class _FilePickerDialogState<T> extends State<FilePickerDialog<T>> {
),
body: PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) {
onPopInvoked: (didPop) {
if (!didPop) _pageBack();
},
child: RefreshIndicator(
Expand Down
2 changes: 1 addition & 1 deletion packages/file_picker/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "File Picker Plugin for Ghosten Player"
version: 1.2.0

environment:
sdk: ^3.5.4
sdk: '>=3.4.3 <4.0.0'
flutter: '>=3.3.0'

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/player_view/lib/src/player_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class _PlayerControlsState extends State<PlayerControls> {
floatingActionButtonLocation: FloatingActionButtonLocation.startTop,
body: PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) async {
onPopInvoked: (didPop) async {
if (didPop) {
return;
} else if (_scaffoldKey.currentState!.isEndDrawerOpen) {
Expand Down
2 changes: 1 addition & 1 deletion packages/player_view/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Video Player Plugin for Ghosten Player"
version: 1.2.0

environment:
sdk: ^3.5.4
sdk: '>=3.4.3 <4.0.0'
flutter: '>=3.3.0'

dependencies:
Expand Down
Loading

0 comments on commit 6faed75

Please sign in to comment.