Skip to content

Commit

Permalink
Feature/flutter 3.0 (jhomlala#1023)
Browse files Browse the repository at this point in the history
* Flutter 3.0 update

* Updated version

* General refactor
  • Loading branch information
jhomlala authored Jun 5, 2022
1 parent 67b5ff8 commit f6a77cf
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 55 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.83
* Updated dependencies
* Fixed Flutter 3.0 issues

## 0.0.82
* Updated ExoPlayer version to 2.17.1.
* Updated dependencies.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
ext.annotationVersion = "1.2.0"
ext.workVersion = "2.7.0"
ext.coreVersion = "1.6.0"
ext.gradleVersion = "4.1.0"
ext.gradleVersion = "7.0.2"
ext.kotlinVersion = "1.5.31"

repositories {
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```yaml
dependencies:
better_player: ^0.0.82
better_player: ^0.0.83
```
2. Install it
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.kotlinVersion = "1.5.31"
ext.gradleVersion = "4.1.0"
ext.gradleVersion = "7.0.2"
ext.multidexVersion = "2.0.1"
repositories {
google()
Expand Down
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 @@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

14 changes: 7 additions & 7 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -163,7 +163,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -270,7 +270,7 @@
"${BUILT_PRODUCTS_DIR}/PINCache/PINCache.framework",
"${BUILT_PRODUCTS_DIR}/PINOperation/PINOperation.framework",
"${BUILT_PRODUCTS_DIR}/better_player/better_player.framework",
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework",
"${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework",
);
name = "[CP] Embed Pods Frameworks";
Expand All @@ -281,7 +281,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PINCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PINOperation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/better_player.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -395,7 +395,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.jhomlala.betterplayer;
PRODUCT_BUNDLE_IDENTIFIER = com.jhomlala.betterplayer2;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down Expand Up @@ -532,7 +532,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.jhomlala.betterplayer;
PRODUCT_BUNDLE_IDENTIFIER = com.jhomlala.betterplayer2;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down Expand Up @@ -564,7 +564,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.jhomlala.betterplayer;
PRODUCT_BUNDLE_IDENTIFIER = com.jhomlala.betterplayer2;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ dependencies:
sdk: flutter
flutter_localizations:
sdk: flutter
path_provider: ^2.0.9
visibility_detector: ^0.2.2
collection: ^1.15.0
path_provider: ^2.0.10
visibility_detector: ^0.3.3
collection: ^1.16.0

dev_dependencies:
flutter_test:
Expand Down
4 changes: 2 additions & 2 deletions lib/src/core/better_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class _BetterPlayerState extends State<BetterPlayer>
@override
void initState() {
super.initState();
WidgetsBinding.instance!.addObserver(this);
WidgetsBinding.instance.addObserver(this);
}

@override
Expand Down Expand Up @@ -110,7 +110,7 @@ class _BetterPlayerState extends State<BetterPlayer>
_betterPlayerConfiguration.deviceOrientationsAfterFullScreen);
}

WidgetsBinding.instance!.removeObserver(this);
WidgetsBinding.instance.removeObserver(this);
_controllerEventSubscription?.cancel();
widget.controller.dispose();
VisibilityDetectorController.instance
Expand Down
6 changes: 1 addition & 5 deletions lib/src/subtitles/better_player_subtitle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ class BetterPlayerSubtitle {
final Duration? end;
final List<String>? texts;

///VTT OR SRT
final String? type;

BetterPlayerSubtitle._({
this.index,
this.start,
this.end,
this.texts,
this.type,
});

factory BetterPlayerSubtitle(String value, bool isWebVTT) {
Expand Down Expand Up @@ -114,6 +110,6 @@ class BetterPlayerSubtitle {

@override
String toString() {
return 'BetterPlayerSubtitle{index: $index, start: $start, end: $end, texts: $texts, type: $type}';
return 'BetterPlayerSubtitle{index: $index, start: $start, end: $end, texts: $texts}';
}
}
41 changes: 17 additions & 24 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
csslib:
dependency: transitive
description:
Expand All @@ -56,14 +56,14 @@ packages:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "1.0.5"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
ffi:
dependency: transitive
description:
Expand Down Expand Up @@ -104,7 +104,7 @@ packages:
name: flutter_widget_from_html_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.5+1"
version: "0.8.5+3"
fwfh_text_style:
dependency: transitive
description:
Expand Down Expand Up @@ -132,14 +132,14 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
version: "0.6.4"
lint:
dependency: "direct dev"
description:
name: lint
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
matcher:
dependency: transitive
description:
Expand All @@ -153,7 +153,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
meta:
dependency: "direct main"
description:
Expand All @@ -167,14 +167,14 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
path_provider:
dependency: "direct main"
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.9"
version: "2.0.10"
path_provider_android:
dependency: transitive
description:
Expand Down Expand Up @@ -223,7 +223,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.0"
version: "5.0.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -256,7 +256,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -291,28 +291,21 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "0.4.9"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
visibility_detector:
dependency: "direct main"
description:
name: visibility_detector
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.2"
version: "0.3.3"
wakelock:
dependency: "direct main"
description:
Expand Down Expand Up @@ -368,7 +361,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.3.1"
version: "6.1.0"
sdks:
dart: ">=2.15.0-7.0.dev <3.0.0"
flutter: ">=2.6.0-0"
dart: ">=2.17.0 <3.0.0"
flutter: ">=2.12.0"
16 changes: 8 additions & 8 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: better_player
description: Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run.
version: 0.0.82
version: 0.0.83
# Disabled because of warning from analyzer
# authors:
# - Jakub Homlala <jhomlala@gmail.com>
Expand All @@ -14,17 +14,17 @@ environment:
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.4
cupertino_icons: ^1.0.5
wakelock: ^0.6.1+2
meta: ^1.7.0
flutter_widget_from_html_core: ^0.8.5+1
visibility_detector: ^0.2.2
path_provider: ^2.0.9
collection: ^1.15.0
xml: ^5.3.0
flutter_widget_from_html_core: ^0.8.5+3
visibility_detector: ^0.3.3
path_provider: ^2.0.10
collection: ^1.16.0
xml: ^6.1.0

dev_dependencies:
lint: ^1.8.1
lint: ^1.8.2
flutter_test:
sdk: flutter
flutter_localizations:
Expand Down

0 comments on commit f6a77cf

Please sign in to comment.