mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(mobile): new video slider ui (#14126)
This commit is contained in:
parent
5a2af558fb
commit
11403abfbc
6 changed files with 120 additions and 122 deletions
|
|
@ -1,7 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/constants/immich_colors.dart';
|
||||
import 'package:immich_mobile/providers/asset_viewer/show_controls.provider.dart';
|
||||
import 'package:immich_mobile/widgets/asset_viewer/video_position.dart';
|
||||
|
||||
/// The video controls for the [videoPlayerControlsProvider]
|
||||
|
|
@ -12,24 +10,11 @@ class VideoControls extends ConsumerWidget {
|
|||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final isPortrait =
|
||||
MediaQuery.orientationOf(context) == Orientation.portrait;
|
||||
return AnimatedOpacity(
|
||||
opacity: ref.watch(showControlsProvider) ? 1.0 : 0.0,
|
||||
duration: const Duration(milliseconds: 100),
|
||||
child: isPortrait
|
||||
? const ColoredBox(
|
||||
color: blackOpacity40,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: VideoPosition(),
|
||||
),
|
||||
)
|
||||
: const ColoredBox(
|
||||
color: blackOpacity40,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 128.0),
|
||||
child: VideoPosition(),
|
||||
),
|
||||
),
|
||||
);
|
||||
return isPortrait
|
||||
? const VideoPosition()
|
||||
: const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 60.0),
|
||||
child: VideoPosition(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue