Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change deprecated WillPopScope in example to newer PopScope #186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
6 changes: 3 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '2.0.0'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/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-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
10 changes: 5 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ class _VideoEditorState extends State<VideoEditor> {

@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async => false,
return PopScope(
canPop: false,
child: Scaffold(
backgroundColor: Colors.black,
body: _controller.initialized
Expand Down Expand Up @@ -238,12 +238,12 @@ class _VideoEditorState extends State<VideoEditor> {
margin: const EdgeInsets.only(top: 10),
child: Column(
children: [
TabBar(
const TabBar(
tabs: [
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: const [
children: [
Padding(
padding: EdgeInsets.all(5),
child: Icon(
Expand All @@ -253,7 +253,7 @@ class _VideoEditorState extends State<VideoEditor> {
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: const [
children: [
Padding(
padding: EdgeInsets.all(5),
child:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/cover/cover_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class _CoverSelectionState extends State<CoverSelection>
@override
Widget build(BuildContext context) {
super.build(context);
final wrap = widget.wrap ?? Wrap();
final wrap = widget.wrap ?? const Wrap();

return StreamBuilder<List<CoverData>>(
stream: _stream,
Expand Down