diff --git a/lib/player/states/player_controls.dart b/lib/player/states/player_controls.dart index f4438d74..112a99a3 100644 --- a/lib/player/states/player_controls.dart +++ b/lib/player/states/player_controls.dart @@ -1,9 +1,14 @@ +import 'dart:ui'; + import 'package:bloc/bloc.dart'; -import 'package:easy_debounce/easy_debounce.dart'; -import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:clipious/player/models/media_event.dart'; import 'package:clipious/player/states/interfaces/media_player.dart'; +import 'package:easy_debounce/easy_debounce.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter_volume_controller/flutter_volume_controller.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:logging/logging.dart'; +import 'package:screen_brightness/screen_brightness.dart'; import '../../globals.dart'; import '../../main.dart'; @@ -188,23 +193,86 @@ class PlayerControlsCubit extends Cubit { emit(state.copyWith(justDoubleTappedSkip: false)); }); } + + Future startBrightnessAdjustments() async { + final currentBrightness = await ScreenBrightness().current; + emit(state.copyWith( + systemBrightness: currentBrightness, showBrightnessSlider: true)); + } + + Future updateBrightness( + DragUpdateDetails details, BoxConstraints constraints) async { + // Set upper and lower bounds (75% of the screen for full brightness, bottom 25% for zero brightness) + double upperBound = 0.25; // top 75% is full brightness + double lowerBound = 0.75; // bottom is 0 brightness + + // Clamping the brightness based on the drag position + double normalizedPosition = + (details.localPosition.dy / constraints.maxHeight) + .clamp(upperBound, lowerBound); + + // Linearly interpolate between 1 (full brightness) and 0 (no brightness) + final screenBrightness = lerpDouble( + 1, 0, (normalizedPosition - upperBound) / (lowerBound - upperBound))!; + + await ScreenBrightness().setScreenBrightness(screenBrightness); + emit(state.copyWith(systemBrightness: screenBrightness)); + } + + void stopBrightnessAdjustments() { + emit(state.copyWith(showBrightnessSlider: false)); + } + + Future startVolumeAdjustments() async { + await FlutterVolumeController.updateShowSystemUI(false); + final currentVolume = await FlutterVolumeController.getVolume(); + emit(state.copyWith( + systemVolume: currentVolume ?? 0, showVolumeSlider: true)); + } + + Future updateVolume( + DragUpdateDetails details, BoxConstraints constraints) async { + // Set upper and lower bounds (75% of the screen for full volume, bottom 25% for zero volume) + double upperBound = 0.25; // top 75% is full volume + double lowerBound = 0.75; // bottom is 0 volume + + // Clamping the volume based on the drag position + double normalizedPosition = + (details.localPosition.dy / constraints.maxHeight) + .clamp(upperBound, lowerBound); + + // Linearly interpolate between 1 (full volume) and 0 (no volume) + final volume = lerpDouble( + 1, 0, (normalizedPosition - upperBound) / (lowerBound - upperBound))!; + + await FlutterVolumeController.setVolume(volume); + emit(state.copyWith(systemVolume: volume)); + } + + void stopVolumeAdjustments() { + emit(state.copyWith(showVolumeSlider: false)); + } } @freezed class PlayerControlsState with _$PlayerControlsState { - const factory PlayerControlsState({ - @Default(false) bool errored, - @Default(Duration.zero) Duration position, - @Default(Duration(seconds: 1)) Duration duration, - @Default(Duration.zero) Duration buffer, - @Default(FullScreenState.notFullScreen) FullScreenState fullScreenState, - @Default(false) bool displayControls, - @Default(false) bool muted, - @Default(false) bool buffering, - @Default(false) bool draggingPositionSlider, - @Default(0) double doubleTapFastForwardedOpacity, - @Default(0) double doubleTapRewindedOpacity, - @Default(false) bool justDoubleTappedSkip, - @Default(false) bool showSponsorBlocked, - }) = _PlayercontrolsState; + const factory PlayerControlsState( + {@Default(false) bool errored, + @Default(Duration.zero) Duration position, + @Default(Duration(seconds: 1)) Duration duration, + @Default(Duration.zero) Duration buffer, + @Default(FullScreenState.notFullScreen) FullScreenState fullScreenState, + @Default(false) bool displayControls, + @Default(false) bool muted, + @Default(false) bool buffering, + @Default(false) bool draggingPositionSlider, + @Default(0) double doubleTapFastForwardedOpacity, + @Default(0) double doubleTapRewindedOpacity, + @Default(false) bool justDoubleTappedSkip, + @Default(false) bool showSponsorBlocked, + // system setting adjustments + @Default(false) bool showBrightnessSlider, + @Default(0) double systemBrightness, + @Default(false) bool showVolumeSlider, + @Default(0) double systemVolume}) = _PlayercontrolsState; } diff --git a/lib/player/states/player_controls.freezed.dart b/lib/player/states/player_controls.freezed.dart index 761d9e18..76a912a3 100644 --- a/lib/player/states/player_controls.freezed.dart +++ b/lib/player/states/player_controls.freezed.dart @@ -30,6 +30,10 @@ mixin _$PlayerControlsState { double get doubleTapRewindedOpacity => throw _privateConstructorUsedError; bool get justDoubleTappedSkip => throw _privateConstructorUsedError; bool get showSponsorBlocked => throw _privateConstructorUsedError; + bool get showBrightnessSlider => throw _privateConstructorUsedError; + double get systemBrightness => throw _privateConstructorUsedError; + bool get showVolumeSlider => throw _privateConstructorUsedError; + double get systemVolume => throw _privateConstructorUsedError; /// Create a copy of PlayerControlsState /// with the given fields replaced by the non-null parameter values. @@ -57,7 +61,11 @@ abstract class $PlayerControlsStateCopyWith<$Res> { double doubleTapFastForwardedOpacity, double doubleTapRewindedOpacity, bool justDoubleTappedSkip, - bool showSponsorBlocked}); + bool showSponsorBlocked, + bool showBrightnessSlider, + double systemBrightness, + bool showVolumeSlider, + double systemVolume}); } /// @nodoc @@ -88,6 +96,10 @@ class _$PlayerControlsStateCopyWithImpl<$Res, $Val extends PlayerControlsState> Object? doubleTapRewindedOpacity = null, Object? justDoubleTappedSkip = null, Object? showSponsorBlocked = null, + Object? showBrightnessSlider = null, + Object? systemBrightness = null, + Object? showVolumeSlider = null, + Object? systemVolume = null, }) { return _then(_value.copyWith( errored: null == errored @@ -142,6 +154,22 @@ class _$PlayerControlsStateCopyWithImpl<$Res, $Val extends PlayerControlsState> ? _value.showSponsorBlocked : showSponsorBlocked // ignore: cast_nullable_to_non_nullable as bool, + showBrightnessSlider: null == showBrightnessSlider + ? _value.showBrightnessSlider + : showBrightnessSlider // ignore: cast_nullable_to_non_nullable + as bool, + systemBrightness: null == systemBrightness + ? _value.systemBrightness + : systemBrightness // ignore: cast_nullable_to_non_nullable + as double, + showVolumeSlider: null == showVolumeSlider + ? _value.showVolumeSlider + : showVolumeSlider // ignore: cast_nullable_to_non_nullable + as bool, + systemVolume: null == systemVolume + ? _value.systemVolume + : systemVolume // ignore: cast_nullable_to_non_nullable + as double, ) as $Val); } } @@ -167,7 +195,11 @@ abstract class _$$PlayercontrolsStateImplCopyWith<$Res> double doubleTapFastForwardedOpacity, double doubleTapRewindedOpacity, bool justDoubleTappedSkip, - bool showSponsorBlocked}); + bool showSponsorBlocked, + bool showBrightnessSlider, + double systemBrightness, + bool showVolumeSlider, + double systemVolume}); } /// @nodoc @@ -196,6 +228,10 @@ class __$$PlayercontrolsStateImplCopyWithImpl<$Res> Object? doubleTapRewindedOpacity = null, Object? justDoubleTappedSkip = null, Object? showSponsorBlocked = null, + Object? showBrightnessSlider = null, + Object? systemBrightness = null, + Object? showVolumeSlider = null, + Object? systemVolume = null, }) { return _then(_$PlayercontrolsStateImpl( errored: null == errored @@ -250,6 +286,22 @@ class __$$PlayercontrolsStateImplCopyWithImpl<$Res> ? _value.showSponsorBlocked : showSponsorBlocked // ignore: cast_nullable_to_non_nullable as bool, + showBrightnessSlider: null == showBrightnessSlider + ? _value.showBrightnessSlider + : showBrightnessSlider // ignore: cast_nullable_to_non_nullable + as bool, + systemBrightness: null == systemBrightness + ? _value.systemBrightness + : systemBrightness // ignore: cast_nullable_to_non_nullable + as double, + showVolumeSlider: null == showVolumeSlider + ? _value.showVolumeSlider + : showVolumeSlider // ignore: cast_nullable_to_non_nullable + as bool, + systemVolume: null == systemVolume + ? _value.systemVolume + : systemVolume // ignore: cast_nullable_to_non_nullable + as double, )); } } @@ -270,7 +322,11 @@ class _$PlayercontrolsStateImpl implements _PlayercontrolsState { this.doubleTapFastForwardedOpacity = 0, this.doubleTapRewindedOpacity = 0, this.justDoubleTappedSkip = false, - this.showSponsorBlocked = false}); + this.showSponsorBlocked = false, + this.showBrightnessSlider = false, + this.systemBrightness = 0, + this.showVolumeSlider = false, + this.systemVolume = 0}); @override @JsonKey() @@ -311,10 +367,22 @@ class _$PlayercontrolsStateImpl implements _PlayercontrolsState { @override @JsonKey() final bool showSponsorBlocked; + @override + @JsonKey() + final bool showBrightnessSlider; + @override + @JsonKey() + final double systemBrightness; + @override + @JsonKey() + final bool showVolumeSlider; + @override + @JsonKey() + final double systemVolume; @override String toString() { - return 'PlayerControlsState(errored: $errored, position: $position, duration: $duration, buffer: $buffer, fullScreenState: $fullScreenState, displayControls: $displayControls, muted: $muted, buffering: $buffering, draggingPositionSlider: $draggingPositionSlider, doubleTapFastForwardedOpacity: $doubleTapFastForwardedOpacity, doubleTapRewindedOpacity: $doubleTapRewindedOpacity, justDoubleTappedSkip: $justDoubleTappedSkip, showSponsorBlocked: $showSponsorBlocked)'; + return 'PlayerControlsState(errored: $errored, position: $position, duration: $duration, buffer: $buffer, fullScreenState: $fullScreenState, displayControls: $displayControls, muted: $muted, buffering: $buffering, draggingPositionSlider: $draggingPositionSlider, doubleTapFastForwardedOpacity: $doubleTapFastForwardedOpacity, doubleTapRewindedOpacity: $doubleTapRewindedOpacity, justDoubleTappedSkip: $justDoubleTappedSkip, showSponsorBlocked: $showSponsorBlocked, showBrightnessSlider: $showBrightnessSlider, systemBrightness: $systemBrightness, showVolumeSlider: $showVolumeSlider, systemVolume: $systemVolume)'; } @override @@ -347,7 +415,15 @@ class _$PlayercontrolsStateImpl implements _PlayercontrolsState { (identical(other.justDoubleTappedSkip, justDoubleTappedSkip) || other.justDoubleTappedSkip == justDoubleTappedSkip) && (identical(other.showSponsorBlocked, showSponsorBlocked) || - other.showSponsorBlocked == showSponsorBlocked)); + other.showSponsorBlocked == showSponsorBlocked) && + (identical(other.showBrightnessSlider, showBrightnessSlider) || + other.showBrightnessSlider == showBrightnessSlider) && + (identical(other.systemBrightness, systemBrightness) || + other.systemBrightness == systemBrightness) && + (identical(other.showVolumeSlider, showVolumeSlider) || + other.showVolumeSlider == showVolumeSlider) && + (identical(other.systemVolume, systemVolume) || + other.systemVolume == systemVolume)); } @override @@ -365,7 +441,11 @@ class _$PlayercontrolsStateImpl implements _PlayercontrolsState { doubleTapFastForwardedOpacity, doubleTapRewindedOpacity, justDoubleTappedSkip, - showSponsorBlocked); + showSponsorBlocked, + showBrightnessSlider, + systemBrightness, + showVolumeSlider, + systemVolume); /// Create a copy of PlayerControlsState /// with the given fields replaced by the non-null parameter values. @@ -391,7 +471,11 @@ abstract class _PlayercontrolsState implements PlayerControlsState { final double doubleTapFastForwardedOpacity, final double doubleTapRewindedOpacity, final bool justDoubleTappedSkip, - final bool showSponsorBlocked}) = _$PlayercontrolsStateImpl; + final bool showSponsorBlocked, + final bool showBrightnessSlider, + final double systemBrightness, + final bool showVolumeSlider, + final double systemVolume}) = _$PlayercontrolsStateImpl; @override bool get errored; @@ -419,6 +503,14 @@ abstract class _PlayercontrolsState implements PlayerControlsState { bool get justDoubleTappedSkip; @override bool get showSponsorBlocked; + @override + bool get showBrightnessSlider; + @override + double get systemBrightness; + @override + bool get showVolumeSlider; + @override + double get systemVolume; /// Create a copy of PlayerControlsState /// with the given fields replaced by the non-null parameter values. diff --git a/lib/player/views/components/player_controls.dart b/lib/player/views/components/player_controls.dart index 2e3bd8a5..e6b42cd2 100644 --- a/lib/player/views/components/player_controls.dart +++ b/lib/player/views/components/player_controls.dart @@ -5,6 +5,7 @@ import 'package:clipious/main.dart'; import 'package:clipious/player/states/interfaces/media_player.dart'; import 'package:clipious/player/states/player.dart'; import 'package:clipious/player/views/components/sleep_timer.dart'; +import 'package:clipious/player/views/components/system_setting_slider.dart'; import 'package:clipious/settings/states/settings.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; @@ -228,8 +229,10 @@ class PlayerControls extends StatelessWidget { child: BlocProvider( create: (context) => PlayerControlsCubit(const PlayerControlsState(), player), - child: BlocBuilder( - builder: (context, playerState) { + child: LayoutBuilder( + builder: (context, constraints) { + final playerState = context.watch().state; + bool isMini = context.select((PlayerCubit cubit) => cubit.state.isMini); bool isPlaying = @@ -258,6 +261,12 @@ class PlayerControls extends StatelessWidget { value.state.playerRepeatMode == PlayerRepeat.noRepeat); var cubit = context.read(); + + // to allow or not dragging to adjust brightness and volume + var canDragToAdjustDeviceSettings = + playerState.fullScreenState == FullScreenState.fullScreen && + !playerState.displayControls; + return BlocListener( listenWhen: (previous, current) => previous.mediaEvent != current.mediaEvent, @@ -337,6 +346,23 @@ class PlayerControls extends StatelessWidget { Expanded( child: GestureDetector( behavior: HitTestBehavior.translucent, + onVerticalDragStart: + canDragToAdjustDeviceSettings + ? (details) { + cubit + .startBrightnessAdjustments(); + } + : null, + onVerticalDragUpdate: + canDragToAdjustDeviceSettings + ? (details) { + cubit.updateBrightness( + details, constraints); + } + : null, + onVerticalDragEnd: (details) { + cubit.stopBrightnessAdjustments(); + }, onTap: playerState.justDoubleTappedSkip ? cubit.doubleTapRewind : playerState.displayControls @@ -354,6 +380,23 @@ class PlayerControls extends StatelessWidget { icon: Icons.fast_rewind))), Expanded( child: GestureDetector( + onVerticalDragStart: + canDragToAdjustDeviceSettings + ? (details) { + cubit + .startVolumeAdjustments(); + } + : null, + onVerticalDragUpdate: + canDragToAdjustDeviceSettings + ? (details) { + cubit.updateVolume( + details, constraints); + } + : null, + onVerticalDragEnd: (details) { + cubit.stopVolumeAdjustments(); + }, onTap: playerState.justDoubleTappedSkip ? cubit.doubleTapFastForward : playerState.displayControls @@ -650,6 +693,47 @@ class PlayerControls extends StatelessWidget { curve: animationCurve, begin: 0, end: 2), + + Positioned( + top: constraints.maxHeight * 0.15, + bottom: constraints.maxHeight * 0.15, + right: 20, + child: SystemSettingsSlider( + icon: Icons.brightness_5, + value: playerState.systemBrightness)) + .animate( + target: playerState.showBrightnessSlider ? 1 : 0, + ) + .slideX( + begin: 2, + end: 0, + duration: animationDuration ~/ 2, + curve: animationCurve) + .fade( + begin: 0, + end: 1, + duration: animationDuration * 0.75, + curve: animationCurve), + Positioned( + top: constraints.maxHeight * 0.15, + bottom: constraints.maxHeight * 0.15, + left: 20, + child: SystemSettingsSlider( + icon: Icons.volume_up, + value: playerState.systemVolume)) + .animate( + target: playerState.showVolumeSlider ? 1 : 0, + ) + .slideX( + begin: -2, + end: 0, + duration: animationDuration ~/ 2, + curve: animationCurve) + .fade( + begin: 0, + end: 1, + duration: animationDuration * 0.75, + curve: animationCurve), ], ), ), diff --git a/lib/player/views/components/system_setting_slider.dart b/lib/player/views/components/system_setting_slider.dart new file mode 100644 index 00000000..7dd0e228 --- /dev/null +++ b/lib/player/views/components/system_setting_slider.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; + +class SystemSettingsSlider extends StatelessWidget { + final IconData icon; + final double value; + + const SystemSettingsSlider( + {super.key, required this.icon, required this.value}); + + @override + Widget build(BuildContext context) { + final colors = Theme.of(context).colorScheme; + return Container( + width: 20, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: colors.secondaryContainer), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + child: FractionallySizedBox( + alignment: Alignment.bottomCenter, + widthFactor: 0.5, + heightFactor: value, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: colors.primary), + ), + ), + ), + const Gap(10), + Icon( + icon, + color: colors.primary, + size: 12, + ) + ], + ), + ), + ); + } +} diff --git a/lib/router.dart b/lib/router.dart index 71af4b1f..cb8a9cba 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -112,7 +112,7 @@ const shortsPath = 'shorts'; const streamsPath = 'streams'; @AutoRouterConfig(replaceInRouteName: 'Screen|Tab,Route') -class AppRouter extends RootStackRouter implements AutoRouteGuard { +class AppRouter extends RootStackRouter { final bool hasServer; AppRouter({required this.hasServer}); @@ -227,6 +227,10 @@ class AppRouter extends RootStackRouter implements AutoRouteGuard { } @override + late final List guards = [ + AutoRouteGuard.simple(onNavigation) + ]; + Future onNavigation( NavigationResolver resolver, StackRouter router) async { try { diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 8834a091..cbe13175 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -9,6 +9,7 @@ #include #include #include +#include #include void fl_register_plugins(FlPluginRegistry* registry) { @@ -21,6 +22,9 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) dynamic_color_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); + g_autoptr(FlPluginRegistrar) flutter_volume_controller_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterVolumeControllerPlugin"); + flutter_volume_controller_plugin_register_with_registrar(flutter_volume_controller_registrar); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 7879666f..7235f642 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST awesome_notifications awesome_notifications_core dynamic_color + flutter_volume_controller url_launcher_linux ) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 8dd8bad0..252bc69f 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -13,10 +13,12 @@ import device_info_plus import downloadsfolder import dynamic_color import ffmpeg_kit_flutter_full +import flutter_volume_controller import flutter_web_auth import just_audio import package_info_plus import path_provider_foundation +import screen_brightness_macos import share_plus import sqflite import url_launcher_macos @@ -31,10 +33,12 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DownloadsfolderPlugin.register(with: registry.registrar(forPlugin: "DownloadsfolderPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) FFmpegKitFlutterPlugin.register(with: registry.registrar(forPlugin: "FFmpegKitFlutterPlugin")) + FlutterVolumeControllerPlugin.register(with: registry.registrar(forPlugin: "FlutterVolumeControllerPlugin")) FlutterWebAuthPlugin.register(with: registry.registrar(forPlugin: "FlutterWebAuthPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) diff --git a/pubspec.lock b/pubspec.lock index ed3e34d3..74d6c717 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -589,6 +589,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.1" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + url: "https://pub.dev" + source: hosted + version: "2.0.22" flutter_shaders: dependency: transitive description: @@ -618,6 +626,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_volume_controller: + dependency: "direct main" + description: + name: flutter_volume_controller + sha256: fa4c36dfe7ef7f423704f34ab8e64e00b4a30a90aa6e56f251e9dba649efcd7f + url: "https://pub.dev" + source: hosted + version: "1.3.2" flutter_web_auth: dependency: "direct main" description: @@ -1189,6 +1205,54 @@ packages: url: "https://pub.dev" source: hosted version: "0.27.7" + screen_brightness: + dependency: "direct main" + description: + name: screen_brightness + sha256: "7d4ac84ae26b37c01d6f5db7123a72db7933e1f2a2a8c369a51e08f81b3178d8" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + screen_brightness_android: + dependency: transitive + description: + name: screen_brightness_android + sha256: "8c69d3ac475e4d625e7fa682a3a51a69ff59abe5b4a9e57f6ec7d830a6c69bd6" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + screen_brightness_ios: + dependency: transitive + description: + name: screen_brightness_ios + sha256: f08f70ca1ac3e30719764b5cfb8b3fe1e28163065018a41b3e6f243ab146c2f1 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + screen_brightness_macos: + dependency: transitive + description: + name: screen_brightness_macos + sha256: "70c2efa4534e22b927e82693488f127dd4a0f008469fccf4f0eefe9061bbdd6a" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + screen_brightness_platform_interface: + dependency: transitive + description: + name: screen_brightness_platform_interface + sha256: "9f3ebf7f22d5487e7676fe9ddaf3fc55b6ff8057707cf6dc0121c7dfda346a16" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + screen_brightness_windows: + dependency: transitive + description: + name: screen_brightness_windows + sha256: c8e12a91cf6dd912a48bd41fcf749282a51afa17f536c3460d8d05702fb89ffa + url: "https://pub.dev" + source: hosted + version: "1.0.1" sembast: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 6770fdf6..d84fa86d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: clipious -version: 1.22.1+4062 +version: 1.22.0+4063 publish_to: none description: Client for invidious. environment: @@ -31,6 +31,7 @@ dependencies: flutter_native_splash: 2.4.1 flutter_svg: 2.0.10+1 flutter_swipe_action_cell: 3.1.4 + flutter_volume_controller: 1.3.2 flutter_web_auth: 0.5.0 freezed_annotation: 2.4.4 gap: 3.0.1 @@ -47,6 +48,7 @@ dependencies: path: any path_provider: 2.1.4 receive_sharing_intent: 1.8.0 + screen_brightness: 1.0.1 sembast: 3.7.4 sembast_sqflite: 2.2.0+2 settings_ui: 2.0.2 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 827ecca1..ebb3afcc 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -10,7 +10,9 @@ #include #include #include +#include #include +#include #include #include @@ -23,8 +25,12 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("DownloadsfolderPluginCApi")); DynamicColorPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); + FlutterVolumeControllerPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FlutterVolumeControllerPluginCApi")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); + ScreenBrightnessWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin")); SharePlusWindowsPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index d2f43e8d..b81870c4 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -7,7 +7,9 @@ list(APPEND FLUTTER_PLUGIN_LIST awesome_notifications_core downloadsfolder dynamic_color + flutter_volume_controller permission_handler_windows + screen_brightness_windows share_plus url_launcher_windows )