Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
73 lines
2.7 KiB
Dart
73 lines
2.7 KiB
Dart
import 'package:cutdex_ui/theme.dart';
|
|
import 'package:cutdex_sdk/timeline_ui.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
/// Connects the application palette to the SDK timeline presentation.
|
|
abstract final class EditorTheme {
|
|
static ThemeData get penLight => adapt(AppTheme.penLight);
|
|
static ThemeData get penDark => adapt(AppTheme.penDark);
|
|
|
|
static ThemeData adapt(ThemeData theme) {
|
|
final palette = theme.brightness == Brightness.dark
|
|
? AppColors.penDark
|
|
: AppColors.penLight;
|
|
final dark = theme.brightness == Brightness.dark;
|
|
final text = theme.textTheme;
|
|
final timelineBorder = palette.divider;
|
|
final timelineSecondary = dark
|
|
? palette.foreground.withValues(alpha: .71)
|
|
: palette.mutedForeground;
|
|
final timelineTertiary = dark
|
|
? palette.foreground.withValues(alpha: .498)
|
|
: palette.mutedForeground.withValues(alpha: .8);
|
|
return theme.copyWith(
|
|
extensions: [
|
|
...theme.extensions.values,
|
|
const TimelineThemeData.dark().copyWith(
|
|
backgroundColor: palette.background,
|
|
primaryLaneBackgroundColor: palette.sidebar,
|
|
visualClipColor: palette.visualClip,
|
|
audioClipColor: palette.popover,
|
|
audioAccentColor: timelineSecondary,
|
|
gapColor: timelineBorder,
|
|
gapBorderColor: timelineBorder,
|
|
containerAccentColor: timelineSecondary,
|
|
transitionColor: timelineTertiary,
|
|
connectionLineColor: timelineBorder,
|
|
connectionLineWidth: 3,
|
|
clipBorderColor: timelineBorder,
|
|
clipBorderWidth: 1,
|
|
selectionOutlineColor: palette.foreground,
|
|
selectionOutlineWidth: 2,
|
|
keyframeColor: timelineSecondary,
|
|
keyframeBorderColor: palette.background,
|
|
keyframeInvalidColor: palette.destructive,
|
|
disabledOverlayColor: palette.background.withValues(alpha: 0.5),
|
|
outsideSourceRangeOverlayColor: palette.background.withValues(
|
|
alpha: 0.65,
|
|
),
|
|
clipCornerRadius: AppRadius.small,
|
|
clipHeaderHeight: 16,
|
|
clipHeaderPadding: 2,
|
|
clipNameTextStyle: text.bodySmall!.copyWith(
|
|
color: palette.foreground,
|
|
fontSize: 10,
|
|
height: 1.4,
|
|
),
|
|
rulerHeight: 20,
|
|
rulerBackgroundColor: palette.background,
|
|
rulerTickColor: timelineTertiary,
|
|
rulerTextStyle: text.bodySmall!.copyWith(
|
|
height: 16 / 12,
|
|
color: timelineSecondary,
|
|
),
|
|
playheadColor: palette.foreground,
|
|
scrollbarThickness: AppSpacing.compact,
|
|
scrollbarTrackColor: Colors.transparent,
|
|
scrollbarThumbColor: palette.foreground.withValues(alpha: .084),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|