From e971bdd2ebf6f183031ca3525576264388e79386 Mon Sep 17 00:00:00 2001 From: Mohamed Ramadan <60930725+MoRmdn@users.noreply.github.com> Date: Sun, 15 Dec 2024 10:25:04 +0200 Subject: [PATCH 1/3] - Add devtools_options.yaml configuration files - Add devtools_options.yaml example configuration - Update iOS AppDelegate.swift - Fix RTL support in CupertinoControls - Fix RTL support in MaterialControls --- devtools_options.yaml | 3 +++ example/devtools_options.yaml | 3 +++ example/ios/Runner/AppDelegate.swift | 2 +- lib/src/cupertino/cupertino_controls.dart | 2 +- lib/src/material/material_controls.dart | 3 ++- 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 devtools_options.yaml create mode 100644 example/devtools_options.yaml diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 000000000..fa0b357c4 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/example/devtools_options.yaml b/example/devtools_options.yaml new file mode 100644 index 000000000..fa0b357c4 --- /dev/null +++ b/example/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift index 9074fee92..626664468 100644 --- a/example/ios/Runner/AppDelegate.swift +++ b/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Flutter import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/lib/src/cupertino/cupertino_controls.dart b/lib/src/cupertino/cupertino_controls.dart index ea0bf4d80..797219c10 100644 --- a/lib/src/cupertino/cupertino_controls.dart +++ b/lib/src/cupertino/cupertino_controls.dart @@ -460,7 +460,7 @@ class _CupertinoControlsState extends State final position = _latestValue.duration - _latestValue.position; return Padding( - padding: const EdgeInsets.only(right: 12.0), + padding: const EdgeInsets.symmetric(horizontal: 12.0), child: Text( '-${formatDuration(position)}', style: TextStyle(color: iconColor, fontSize: 12.0), diff --git a/lib/src/material/material_controls.dart b/lib/src/material/material_controls.dart index 9b20f0722..45bb8e303 100644 --- a/lib/src/material/material_controls.dart +++ b/lib/src/material/material_controls.dart @@ -260,6 +260,7 @@ class _MaterialControlsState extends State height: barHeight + (chewieController.isFullScreen ? 10.0 : 0), padding: EdgeInsets.only( left: 20, + right: 20, bottom: !chewieController.isFullScreen ? 10.0 : 0, ), child: SafeArea( @@ -291,7 +292,7 @@ class _MaterialControlsState extends State if (!chewieController.isLive) Expanded( child: Container( - padding: const EdgeInsets.only(right: 20), + padding: const EdgeInsets.symmetric(horizontal: 20), child: Row( children: [ _buildProgressBar(), From 8a92a7c7f36b26de3be53e9fe1c4bb8d34392823 Mon Sep 17 00:00:00 2001 From: Diego Tori Date: Mon, 6 Jan 2025 12:25:31 -0500 Subject: [PATCH 2/3] Fixed dart lint issues. --- lib/src/helpers/adaptive_controls.dart | 2 -- lib/src/material/material_controls.dart | 7 ++++--- lib/src/material/material_desktop_controls.dart | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/helpers/adaptive_controls.dart b/lib/src/helpers/adaptive_controls.dart index e8dbdef4f..ef8968d3b 100644 --- a/lib/src/helpers/adaptive_controls.dart +++ b/lib/src/helpers/adaptive_controls.dart @@ -23,8 +23,6 @@ class AdaptiveControls extends StatelessWidget { backgroundColor: Color.fromRGBO(41, 41, 41, 0.7), iconColor: Color.fromARGB(255, 200, 200, 200), ); - default: - return const MaterialControls(); } } } diff --git a/lib/src/material/material_controls.dart b/lib/src/material/material_controls.dart index 45bb8e303..2644eb8ce 100644 --- a/lib/src/material/material_controls.dart +++ b/lib/src/material/material_controls.dart @@ -470,7 +470,7 @@ class _MaterialControlsState extends State text: '/ ${formatDuration(duration)}', style: TextStyle( fontSize: 14.0, - color: Colors.white.withOpacity(.75), + color: Colors.white.withValues(alpha: .75), fontWeight: FontWeight.normal, ), ) @@ -682,8 +682,9 @@ class _MaterialControlsState extends State playedColor: Theme.of(context).colorScheme.secondary, handleColor: Theme.of(context).colorScheme.secondary, bufferedColor: - Theme.of(context).colorScheme.surface.withOpacity(0.5), - backgroundColor: Theme.of(context).disabledColor.withOpacity(.5), + Theme.of(context).colorScheme.surface.withValues(alpha: 0.5), + backgroundColor: + Theme.of(context).disabledColor.withValues(alpha: .5), ), draggableProgressBar: chewieController.draggableProgressBar, ), diff --git a/lib/src/material/material_desktop_controls.dart b/lib/src/material/material_desktop_controls.dart index 1b8fba8e2..7932fb861 100644 --- a/lib/src/material/material_desktop_controls.dart +++ b/lib/src/material/material_desktop_controls.dart @@ -591,8 +591,9 @@ class _MaterialDesktopControlsState extends State playedColor: Theme.of(context).colorScheme.secondary, handleColor: Theme.of(context).colorScheme.secondary, bufferedColor: - Theme.of(context).colorScheme.surface.withOpacity(0.5), - backgroundColor: Theme.of(context).disabledColor.withOpacity(.5), + Theme.of(context).colorScheme.surface.withValues(alpha: 0.5), + backgroundColor: + Theme.of(context).disabledColor.withValues(alpha: 0.5), ), draggableProgressBar: chewieController.draggableProgressBar, ), From 07b1e0acde9687047fe06ee95dd208524b2a862b Mon Sep 17 00:00:00 2001 From: Diego Tori Date: Mon, 6 Jan 2025 12:32:22 -0500 Subject: [PATCH 3/3] chewie, version 1.8.6. Addresses Issue #874. --- CHANGELOG.md | 3 +++ pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa2dda947..539bc40b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.8.6] +* ⬆️ [#874](https://github.com/fluttercommunity/chewie/pull/874): Add `devtools_options.yaml` configuration files. Thanks [MoRmdn](https://github.com/MoRmdn). + ## [1.8.5] * ⬆️ [#703](https://github.com/fluttercommunity/chewie/pull/703): Adding Seek buttons for Android. Thanks [GyanendroKh](https://github.com/GyanendroKh). * Upgraded `wakelock_plus` to version `1.2.8`, which uses `web` version `1.0.0`. Thanks [diegotori](https://github.com/diegotori). diff --git a/pubspec.yaml b/pubspec.yaml index f39e584ef..1cafc3cd2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: chewie description: A video player for Flutter with Cupertino and Material play controls -version: 1.8.5 +version: 1.8.6 homepage: https://github.com/fluttercommunity/chewie environment: