Skip to content

Commit

Permalink
feat: updated dependencies, flutter/dart version, metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jhomlala committed Jun 15, 2024
1 parent 5207c42 commit ae0fe76
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 110 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## 0.0.84
* [BREAKING_CHANGE] Updated min. Flutter version to 3.3.0 and min. Dart version to 3.0.0.
* Recreated example project.
* Updated dependencies.
* Updated readme.
* Replaced wakelock with wakelock plus.
* Updated other dependencies.
* Updated metadata.

## 0.0.83
* Updated dependencies.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![pub package](https://img.shields.io/github/license/jhomlala/betterplayer.svg?style=flat)](https://github.com/jhomlala/betterplayer)
[![pub package](https://img.shields.io/badge/platform-flutter-blue.svg)](https://github.com/jhomlala/betterplayer)

Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run.
Advanced video player. It solves many typical use cases and it's easy to run.

<table>
<tr>
Expand Down
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.83
better_player: ^0.0.84
```

2. Install it
Expand Down
28 changes: 28 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
3 changes: 2 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<application
android:label="example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ dependencies:
sdk: flutter
flutter_localizations:
sdk: flutter
path_provider: ^2.0.10
visibility_detector: ^0.3.3
collection: ^1.16.0
path_provider: ^2.1.3
visibility_detector: ^0.4.0+2
collection: ^1.18.0

dev_dependencies:
flutter_test:
Expand Down
8 changes: 4 additions & 4 deletions lib/src/core/better_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:better_player/src/core/better_player_with_controls.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:visibility_detector/visibility_detector.dart';
import 'package:wakelock/wakelock.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

///Widget which uses provided controller to render video player.
class BetterPlayer extends StatefulWidget {
Expand Down Expand Up @@ -102,7 +102,7 @@ class _BetterPlayerState extends State<BetterPlayer>
///full screen is on, then full screen route must be pop and return to normal
///state.
if (_isFullScreen) {
Wakelock.disable();
WakelockPlus.disable();
_navigatorState.maybePop();
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
overlays: _betterPlayerConfiguration.systemOverlaysAfterFullScreen);
Expand Down Expand Up @@ -244,7 +244,7 @@ class _BetterPlayerState extends State<BetterPlayer>
}

if (!_betterPlayerConfiguration.allowedScreenSleep) {
Wakelock.enable();
WakelockPlus.enable();
}

await Navigator.of(context, rootNavigator: true).push(route);
Expand All @@ -253,7 +253,7 @@ class _BetterPlayerState extends State<BetterPlayer>

// The wakelock plugins checks whether it needs to perform an action internally,
// so we do not need to check Wakelock.isEnabled.
Wakelock.disable();
WakelockPlus.disable();

await SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
overlays: _betterPlayerConfiguration.systemOverlaysAfterFullScreen);
Expand Down
Loading

0 comments on commit ae0fe76

Please sign in to comment.