feat: initial Cutdex application
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.
This commit is contained in:
commit
27e77fff39
718 files changed
+183958
No files matched your search
@@ -0,0 +1,75 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/app_theme.dart';
|
||||
|
||||
class AppSlider extends StatelessWidget {
|
||||
const AppSlider({
|
||||
super.key,
|
||||
required this.value,
|
||||
required this.onChanged,
|
||||
this.min = 0,
|
||||
this.max = 1,
|
||||
this.divisions,
|
||||
this.label,
|
||||
this.focusNode,
|
||||
this.semanticFormatterCallback,
|
||||
this.onChangeStart,
|
||||
this.onChangeEnd,
|
||||
});
|
||||
|
||||
final double value;
|
||||
final double min;
|
||||
final double max;
|
||||
final int? divisions;
|
||||
final String? label;
|
||||
final FocusNode? focusNode;
|
||||
final SemanticFormatterCallback? semanticFormatterCallback;
|
||||
final ValueChanged<double>? onChanged;
|
||||
final ValueChanged<double>? onChangeStart;
|
||||
final ValueChanged<double>? onChangeEnd;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final colors = theme.colorScheme;
|
||||
final accent = colors.primary;
|
||||
return SizedBox(
|
||||
height: AppControlSize.standard,
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
trackHeight: 4,
|
||||
trackGap: 0,
|
||||
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.compact),
|
||||
activeTrackColor: accent,
|
||||
inactiveTrackColor: colors.secondaryContainer,
|
||||
disabledActiveTrackColor: colors.onSurface.withValues(alpha: 0.24),
|
||||
disabledInactiveTrackColor: colors.outlineVariant,
|
||||
thumbColor: colors.onPrimary,
|
||||
disabledThumbColor: colors.onSurface.withValues(alpha: 0.38),
|
||||
overlayColor: accent.withValues(alpha: 0.14),
|
||||
thumbShape: const RoundSliderThumbShape(
|
||||
enabledThumbRadius: 6,
|
||||
disabledThumbRadius: 6,
|
||||
elevation: 1,
|
||||
pressedElevation: 1,
|
||||
),
|
||||
overlayShape: const RoundSliderOverlayShape(overlayRadius: 12),
|
||||
trackShape: const RoundedRectSliderTrackShape(),
|
||||
showValueIndicator: ShowValueIndicator.never,
|
||||
),
|
||||
child: Slider(
|
||||
value: value,
|
||||
min: min,
|
||||
max: max,
|
||||
divisions: divisions,
|
||||
label: label,
|
||||
focusNode: focusNode,
|
||||
semanticFormatterCallback: semanticFormatterCallback,
|
||||
onChanged: onChanged,
|
||||
onChangeStart: onChangeStart,
|
||||
onChangeEnd: onChangeEnd,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user