refactor: extract shared mixins and helpers, drop dead abstractions
Introduces shared seams for paginated views, D-pad reorder, media control routing, async singletons and the device method channel, then points the open-coded copies at them. Also removes unused models and duplicated provider/server plumbing, folds the twice-implemented artifact store in the server, and factors the repeated Flutter toolchain prologue in CI into a composite action.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '../../widgets/app_icon.dart';
|
||||
import '../../media/media_item.dart';
|
||||
import '../../mpv/mpv.dart';
|
||||
import '../../models/livetv_capture_buffer.dart';
|
||||
@@ -12,6 +11,7 @@ import '../../i18n/strings.g.dart';
|
||||
import 'player_chrome_controller.dart';
|
||||
import 'widgets/circular_control_button.dart';
|
||||
import 'widgets/content_strip.dart';
|
||||
import 'widgets/content_strip_panel.dart';
|
||||
import 'widgets/first_frame_guard.dart';
|
||||
import 'widgets/play_pause_stream_builder.dart';
|
||||
import 'widgets/live_timeline_bar.dart';
|
||||
@@ -270,12 +270,7 @@ class _MobileVideoControlsState extends State<MobileVideoControls> with SingleTi
|
||||
_buildBottomBar(context),
|
||||
],
|
||||
),
|
||||
const Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 12,
|
||||
child: AppIcon(Symbols.keyboard_arrow_up_rounded, color: Colors.white24, size: 24),
|
||||
),
|
||||
const ContentStripHint(Symbols.keyboard_arrow_up_rounded),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -290,37 +285,19 @@ class _MobileVideoControlsState extends State<MobileVideoControls> with SingleTi
|
||||
ignoring: t < 0.5,
|
||||
child: Opacity(
|
||||
opacity: (t * 2).clamp(0.0, 1.0),
|
||||
child: Container(
|
||||
child: ContentStripPanel(
|
||||
padding: const EdgeInsets.only(top: 32),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black.withValues(alpha: 0.65),
|
||||
Colors.black.withValues(alpha: 0.7),
|
||||
],
|
||||
stops: const [0.0, 0.42, 1.0],
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: .min,
|
||||
children: [
|
||||
const AppIcon(Symbols.keyboard_arrow_down_rounded, color: Colors.white38, size: 20),
|
||||
const SizedBox(height: 4),
|
||||
ContentStrip(
|
||||
player: widget.player,
|
||||
chapters: widget.chapters,
|
||||
chaptersLoaded: widget.chaptersLoaded,
|
||||
canControl: widget.canControl,
|
||||
serverId: widget.serverId,
|
||||
showQueueTab: widget.showQueueTab,
|
||||
onQueueItemSelected: widget.onQueueItemSelected,
|
||||
onSeekRequested: widget.onSeekRequested,
|
||||
onSeekCompleted: widget.onSeekCompleted,
|
||||
),
|
||||
],
|
||||
chevron: Symbols.keyboard_arrow_down_rounded,
|
||||
child: ContentStrip(
|
||||
player: widget.player,
|
||||
chapters: widget.chapters,
|
||||
chaptersLoaded: widget.chaptersLoaded,
|
||||
canControl: widget.canControl,
|
||||
serverId: widget.serverId,
|
||||
showQueueTab: widget.showQueueTab,
|
||||
onQueueItemSelected: widget.onQueueItemSelected,
|
||||
onSeekRequested: widget.onSeekRequested,
|
||||
onSeekCompleted: widget.onSeekCompleted,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user