diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3b85f3d..7ea4b1d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.0.5
+* Forked from Microsoft's dual_screen project
+* Updated to latest Android, AGP, and Kotlin versions to support newer versions of Flutter
+* Re-published on pub.dev as split_screen
+
## 1.0.4
* Updated AGP to 7 and kotlin to 1.7
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index e23b34e..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Contributing to Flutter Dual Screen
-
-Welcome, and thank you for your interest in contributing to Flutter Dual Screen!
-
-There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.
-
-## Asking Questions
-
-Have a question? The quickest way to get answers is by reaching out on [Twitter](https://twitter.com/surfaceduodev). You can also [open an issue](https://github.com/microsoft/flutter-dualscreen/issues/new) here on Github.
-
-## Reporting Issues
-
-Have you identified a reproducible problem in Flutter Dual Screen? Have a feature request? We want to hear about it! Please [open an issue](https://github.com/microsoft/flutter-dualscreen/issues/new).
-
-## Contributing code
-
-This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
-
-When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
-
-This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
-For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
-or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
-
-# Thank You!
-
-Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute.
\ No newline at end of file
diff --git a/README.md b/README.md
index f912fcb..eb264ae 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,7 @@
-# Flutter Dual Screen
+# Flutter Split Screen
+
+**note**
+This project has been forked from the Microsoft DualScreen project in order to keep it up to date with the latest Flutter / Android requirements. The information below is otherwise unchanged, unless necessary.
This contains Microsoft's offerings to streamline foldable and dual-screen development using Flutter. This plugin will work on any platform, but only Android actually has foldable and dual screen devices.
@@ -73,9 +76,9 @@ Foldable and dual-screen devices have a hinge between the two moving parts of th
## Hinge angle API
-To use this plugin, add `dual_screen` as a dependency in your pubspec.yaml file.
+To use this plugin, add `split_screen` as a dependency in your pubspec.yaml file.
-This will allow you to import DualScreenInfo `import 'package:dual_screen/dual_screen.dart';`
+This will allow you to import DualScreenInfo `import 'package:split_screen/split_screen.dart';`
DualScreenInfo exposes 2 static properties:
@@ -85,7 +88,7 @@ DualScreenInfo exposes 2 static properties:
## Hinge angle example
```dart
-import 'package:dual_screen/dual_screen.dart';
+import 'package:split_screen/split_screen.dart';
DualScreenInfo.hingeAngleEvents.listen((double hingeAngle) {
print(hingeAngle);
@@ -128,4 +131,4 @@ Any use of third-party trademarks or logos are subject to those third-party's po
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/SUPPORT.md b/SUPPORT.md
deleted file mode 100644
index c717936..0000000
--- a/SUPPORT.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Support
-
-## How to file issues and get help
-
-This project uses GitHub Issues to track bugs and feature requests. Please search the existing
-issues before filing new issues to avoid duplicates. For new issues, file your bug or
-feature request as a new Issue.
-
-For help and questions about using this project, please contact [Andrei Diaconu](https://devblogs.microsoft.com/surface-duo/author/adiaconu/).
-
-## Microsoft Support Policy
-
-Support for this project is limited to the resources listed above.
diff --git a/android/build.gradle b/android/build.gradle
index 0d88a27..1419f9d 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,15 +1,15 @@
-group 'com.example.dual_screen'
+group 'com.example.split_screen'
version '1.0-SNAPSHOT'
buildscript {
- ext.kotlin_version = '1.7.21'
+ ext.kotlin_version = '1.9.22'
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.4.2'
+ classpath 'com.android.tools.build:gradle:8.7.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -25,7 +25,17 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
- compileSdkVersion 30
+ compileSdkVersion 35
+ namespace "com.microsoft.flutterdualscreen"
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 3c472b9..81a4301 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -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-7.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
diff --git a/android/settings.gradle b/android/settings.gradle
index ead423e..7f66c0a 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1 +1 @@
-rootProject.name = 'dual_screen'
+rootProject.name = 'split_screen'
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index edda7df..6033ee4 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,3 +1,3 @@
+ >
diff --git a/android/src/main/kotlin/com/microsoft/flutterdualscreen/DualScreenInfo.kt b/android/src/main/kotlin/com/microsoft/flutterdualscreen/DualScreenInfo.kt
index 0a02186..5cb4409 100644
--- a/android/src/main/kotlin/com/microsoft/flutterdualscreen/DualScreenInfo.kt
+++ b/android/src/main/kotlin/com/microsoft/flutterdualscreen/DualScreenInfo.kt
@@ -16,7 +16,7 @@ private const val HINGE_ANGLE_CHANNEL_NAME = "com.microsoft.flutterdualscreen/hi
private const val HINGE_INFO_CHANNEL_NAME = "com.microsoft.flutterdualscreen/hinge_info"
/**
- * Manages dual_screen event and method call channels (creates, registers, unregisters).
+ * Manages split_screen event and method call channels (creates, registers, unregisters).
*
* The two channels it manages:
* - Hinge angle: Event channel that emits a new double value for each hinge sensor angle change.
diff --git a/example/README.md b/example/README.md
index be980af..8805e0a 100644
--- a/example/README.md
+++ b/example/README.md
@@ -1,6 +1,6 @@
-# dual_screen_example
+# split_screen_example
-Demonstrates how to use the dual_screen plugin.
+Demonstrates how to use the split_screen plugin.
## Getting Started
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index c11df7b..9afef2b 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -26,17 +26,28 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 31
+ compileSdkVersion 35
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
+ namespace "com.example.split_screen_example"
+
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.example.dual_screen_example"
- minSdkVersion 16
- targetSdkVersion 30
+ applicationId "com.example.split_screen_example"
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml
index 86aeac0..bfe778b 100644
--- a/example/android/app/src/debug/AndroidManifest.xml
+++ b/example/android/app/src/debug/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="com.example.split_screen_example">
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index a29f62e..2765146 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -1,10 +1,11 @@
+ package="com.example.split_screen_example">
+ package="com.example.split_screen_example">
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 7ff2838..66757dc 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
- ext.kotlin_version = '1.7.21'
+ ext.kotlin_version = '1.9.22'
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.4.2'
+ classpath 'com.android.tools.build:gradle:8.7.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
}
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index 6b66533..d955bd4 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
diff --git a/example/lib/main.dart b/example/lib/main.dart
index ef89144..81639d5 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -2,7 +2,7 @@
/// Licensed under the MIT License.
import 'package:flutter/material.dart';
-import 'package:dual_screen/dual_screen.dart';
+import 'package:split_screen/split_screen.dart';
void main() {
runApp(MyApp());
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 0b7285b..5a11189 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -1,5 +1,5 @@
-name: dual_screen_example
-description: Demonstrates how to use the dual_screen plugin.
+name: split_screen_example
+description: Demonstrates how to use the split_screen plugin.
version: 1.0.0
# The following line prevents the package from being accidentally published to
@@ -7,15 +7,15 @@ version: 1.0.0
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment:
- sdk: ">=2.12.0 <3.0.0"
+ sdk: ">=2.12.0"
dependencies:
flutter:
sdk: flutter
- dual_screen:
+ split_screen:
# When depending on this package from a real application you should use:
- # dual_screen: ^x.y.z
+ # split_screen: ^x.y.z
# See https://dart.dev/tools/pub/dependencies#version-constraints
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart
index f86473d..d9e15c1 100644
--- a/example/test/widget_test.dart
+++ b/example/test/widget_test.dart
@@ -1,7 +1,7 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
-import 'package:dual_screen_example/main.dart';
+import 'package:split_screen_example/main.dart';
void main() {
const EventChannel hingeAngleChannel =
diff --git a/lib/dual_screen.dart b/lib/split_screen.dart
similarity index 82%
rename from lib/dual_screen.dart
rename to lib/split_screen.dart
index 436ee63..0532c1c 100644
--- a/lib/dual_screen.dart
+++ b/lib/split_screen.dart
@@ -1,4 +1,4 @@
-library dual_screen;
+library split_screen;
export 'src/dual_screen_info.dart';
export 'src/two_pane.dart';
diff --git a/pubspec.yaml b/pubspec.yaml
index 952aa31..446d642 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,11 +1,11 @@
-name: dual_screen
-description: Foldable and dual-screen support, like the TwoPane widget and hinge angle sensor data.
-version: 1.0.4
+name: split_screen
+description: Foldable and dual-screen support, like the TwoPane widget and hinge angle sensor data. Forked from the Microsoft dual_screen package.
+version: 1.0.5
homepage: https://docs.microsoft.com/en-us/dual-screen/
-repository: https://github.com/microsoft/flutter-dualscreen
+repository: https://github.com/DeekFit/flutter-splitscreen
environment:
- sdk: ">=2.12.0 <3.0.0"
+ sdk: ">=2.12.0"
flutter: ">=2.10.0"
dependencies:
diff --git a/test/dual_screen_info_test.dart b/test/dual_screen_info_test.dart
index de98970..4de3c80 100644
--- a/test/dual_screen_info_test.dart
+++ b/test/dual_screen_info_test.dart
@@ -1,7 +1,7 @@
/// Copyright (c) Microsoft Corporation.
/// Licensed under the MIT License.
-import 'package:dual_screen/dual_screen.dart';
+import 'package:split_screen/split_screen.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
diff --git a/test/media_query_extension_test.dart b/test/media_query_extension_test.dart
index 710bc22..e3218ce 100644
--- a/test/media_query_extension_test.dart
+++ b/test/media_query_extension_test.dart
@@ -3,7 +3,7 @@
import 'dart:ui';
-import 'package:dual_screen/dual_screen.dart';
+import 'package:split_screen/split_screen.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
diff --git a/test/two_pane_test.dart b/test/two_pane_test.dart
index 1ce1c45..6214703 100644
--- a/test/two_pane_test.dart
+++ b/test/two_pane_test.dart
@@ -3,7 +3,7 @@
import 'dart:ui';
-import 'package:dual_screen/dual_screen.dart';
+import 'package:split_screen/split_screen.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';