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,664 @@
|
||||
import 'package:cutdex/errors/app_failure.dart';
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:cutdex/l10n/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/adaptive/desktop_workspace_controller.dart';
|
||||
import '../../app/adaptive/workspace_layout_policy.dart';
|
||||
import '../../app/shells/phone_workspace_shell.dart';
|
||||
import '../../app/shells/desktop_workspace_shell.dart';
|
||||
import '../../app/shells/tablet_workspace_shell.dart';
|
||||
import '../../integrations/platform/device_experience.dart';
|
||||
import '../../integrations/platform/editor_window_chrome.dart';
|
||||
import '../../integrations/platform/file_picker.dart';
|
||||
|
||||
import 'package:cutdex_native/cutdex_native.dart';
|
||||
|
||||
import '../../persistence/app_settings_repositories.dart';
|
||||
|
||||
import 'package:cutdex_ui/theme.dart';
|
||||
|
||||
import '../../workspace/project_state.dart';
|
||||
import '../../workspace/projects.dart';
|
||||
import '../../workspace/view_settings.dart';
|
||||
import '../../workspace/workspace_mode.dart';
|
||||
import '../../workspace/workspace_navigation.dart';
|
||||
import '../../workspace/workspace_session_scope.dart';
|
||||
import '../assistant/workspace_agent_surface.dart';
|
||||
import '../editor/background_tasks_button.dart';
|
||||
import '../editor/editor_page.dart';
|
||||
import '../settings/settings_dialog.dart';
|
||||
import 'editor_loading_region.dart';
|
||||
import 'project_sidebar.dart';
|
||||
import 'widgets/name_dialog.dart';
|
||||
|
||||
/// The single application surface: project navigation beside the editor.
|
||||
|
||||
class EditingPage extends ConsumerStatefulWidget {
|
||||
const EditingPage({super.key});
|
||||
|
||||
@override
|
||||
ConsumerState<EditingPage> createState() => _EditingPageState();
|
||||
}
|
||||
|
||||
class _EditingPageState extends ConsumerState<EditingPage> {
|
||||
final _desktopSplits = DesktopWorkspaceController();
|
||||
final _editorKey = GlobalKey();
|
||||
final _agentKey = GlobalKey();
|
||||
final _navigationKey = GlobalKey();
|
||||
final _drawerNavigationKey = GlobalKey();
|
||||
final _desktopScaffoldKey = GlobalKey<ScaffoldState>();
|
||||
WorkspaceViewSettingsData get _viewSettings =>
|
||||
ref.read(workspaceViewSettingsProvider).value ??
|
||||
const WorkspaceViewSettingsData();
|
||||
WorkspaceViewSettings get _viewController =>
|
||||
ref.read(workspaceViewSettingsProvider.notifier);
|
||||
WorkspaceMode get _mode => _viewSettings.mode;
|
||||
set _mode(WorkspaceMode value) => _viewController.setMode(value);
|
||||
bool get _sidebarCollapsed => _viewSettings.sidebarCollapsed;
|
||||
set _sidebarCollapsed(bool value) =>
|
||||
_viewController.setSidebarCollapsed(value);
|
||||
double? get _sidebarWidthOverride => _viewSettings.sidebarWidth;
|
||||
set _sidebarWidthOverride(double? value) =>
|
||||
_viewController.setSidebarWidth(value);
|
||||
bool get _startupReady => ref.read(workspaceNavigationProvider).ready;
|
||||
bool get _switchingProject =>
|
||||
ref.read(workspaceNavigationProvider).switchingProject;
|
||||
String? get _selectedProjectId =>
|
||||
ref.read(workspaceNavigationProvider).selectedProjectId;
|
||||
|
||||
void _saveViewState({String? activeProjectId}) {
|
||||
if (!_startupReady) return;
|
||||
final current = ref.read(projectsProvider).value;
|
||||
unawaited(
|
||||
_viewController.save(
|
||||
activeProjectId: activeProjectId ?? current?.activeProject?.id,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _selectProject(
|
||||
BuildContext context,
|
||||
WidgetRef ref, {
|
||||
required bool create,
|
||||
}) async {
|
||||
if (ref.read(projectsProvider).value?.projectBusy == true) return;
|
||||
try {
|
||||
if (create) {
|
||||
final name = await askName(
|
||||
context,
|
||||
title: context.l10n.newProject,
|
||||
label: context.l10n.projectName,
|
||||
);
|
||||
if (name == null || !context.mounted) return;
|
||||
final created = await ref
|
||||
.read(projectsProvider.notifier)
|
||||
.createProject(
|
||||
name,
|
||||
initialTimelineName: context.l10n.defaultTimelineName(1),
|
||||
);
|
||||
if (!created && context.mounted) {
|
||||
final error = ref.read(projectsProvider).value?.error;
|
||||
if (error?.requiresProjectLocation == true) {
|
||||
await showSettingsDialog(context);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
final directory = await ref
|
||||
.read(filePickerProvider)
|
||||
.pickDirectory(confirmButtonText: context.l10n.openProject);
|
||||
if (directory == null || !context.mounted) return;
|
||||
await ref.read(projectsProvider.notifier).open(directory);
|
||||
} catch (_) {
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(context.l10n.selectDirectoryFailed)),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _openProject(WidgetRef ref, RecentProject project) =>
|
||||
ref.read(workspaceNavigationProvider.notifier).openProject(project);
|
||||
|
||||
Future<bool> _renameProject(
|
||||
BuildContext context,
|
||||
WidgetRef ref,
|
||||
RecentProject project,
|
||||
) async {
|
||||
if (ref.read(projectsProvider).value?.projectBusy == true) return false;
|
||||
final name = await askName(
|
||||
context,
|
||||
title: context.l10n.rename,
|
||||
label: context.l10n.projectName,
|
||||
initialValue: project.name,
|
||||
submitLabel: context.l10n.rename,
|
||||
);
|
||||
if (name == null || !context.mounted || name == project.name) return false;
|
||||
return ref.read(projectsProvider.notifier).renameProject(project, name);
|
||||
}
|
||||
|
||||
Future<void> _relocateProject(
|
||||
BuildContext context,
|
||||
WidgetRef ref,
|
||||
RecentProject project,
|
||||
) async {
|
||||
if (ref.read(projectsProvider).value?.projectBusy == true) return;
|
||||
final directory = await ref
|
||||
.read(filePickerProvider)
|
||||
.pickDirectory(confirmButtonText: context.l10n.openProject);
|
||||
if (directory == null || !context.mounted) return;
|
||||
await ref
|
||||
.read(projectsProvider.notifier)
|
||||
.open(directory, expectedId: project.id);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_desktopSplits.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _setMode(WorkspaceMode mode) {
|
||||
_mode = mode;
|
||||
_saveViewState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ref.watch(workspaceViewSettingsProvider);
|
||||
ref.watch(workspaceNavigationProvider);
|
||||
final experience = ref.watch(deviceExperienceProvider);
|
||||
final desktop = experience == DeviceExperience.desktop;
|
||||
final projects = ref.watch(projectsProvider);
|
||||
final state = projects.value ?? const ProjectState();
|
||||
return EditorWindowChrome(
|
||||
headerHeight: desktop ? AppControlSize.panelHeader : 48,
|
||||
builder: (context, integrated) => Scaffold(
|
||||
body: SafeArea(
|
||||
top: !integrated,
|
||||
child: AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 320),
|
||||
child: !_startupReady
|
||||
? const _StartupLoading(key: ValueKey('startup-loading'))
|
||||
: WorkspaceSessionScope(
|
||||
key: const ValueKey('workspace-content'),
|
||||
state: state,
|
||||
child: Stack(
|
||||
children: [
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final navigationHiddenBySpace =
|
||||
desktop &&
|
||||
!WorkspaceLayoutPolicy.desktopNavigationFits(
|
||||
constraints.maxWidth,
|
||||
);
|
||||
final navigationCollapsed =
|
||||
_sidebarCollapsed || navigationHiddenBySpace;
|
||||
Widget controls({
|
||||
bool navigationToggle = true,
|
||||
}) => HeaderControlRegion(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: AppSpacing.tiny,
|
||||
children: [
|
||||
if (navigationToggle)
|
||||
SizedBox.square(
|
||||
dimension: AppControlSize.headerButton,
|
||||
child: IconButton(
|
||||
key: const Key(
|
||||
'project-sidebar-toggle',
|
||||
),
|
||||
tooltip: navigationCollapsed
|
||||
? context.l10n.expandSidebar
|
||||
: context.l10n.collapseSidebar,
|
||||
onPressed: () {
|
||||
if (navigationHiddenBySpace) {
|
||||
_desktopScaffoldKey.currentState
|
||||
?.openDrawer();
|
||||
} else {
|
||||
_sidebarCollapsed =
|
||||
!_sidebarCollapsed;
|
||||
_saveViewState();
|
||||
}
|
||||
},
|
||||
style: sidebarActionButtonStyle(
|
||||
context,
|
||||
),
|
||||
icon: const Icon(
|
||||
Icons.view_sidebar_outlined,
|
||||
size: AppIconSize.header,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (desktop &&
|
||||
navigationCollapsed &&
|
||||
navigationToggle)
|
||||
PopupMenuButton<WorkspaceMode>(
|
||||
key: const Key('desktop-workspace-mode'),
|
||||
initialValue: _mode,
|
||||
onSelected: _setMode,
|
||||
itemBuilder: (context) => [
|
||||
for (final mode in WorkspaceMode.values)
|
||||
PopupMenuItem(
|
||||
key: ValueKey(
|
||||
'desktop-mode-${mode.name}',
|
||||
),
|
||||
value: mode,
|
||||
child: Text(
|
||||
mode == WorkspaceMode.agent
|
||||
? context.l10n.workspaceAgent
|
||||
: context.l10n.workspaceCut,
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 6,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
_mode == WorkspaceMode.agent
|
||||
? context.l10n.workspaceAgent
|
||||
: context.l10n.workspaceCut,
|
||||
),
|
||||
const Icon(
|
||||
Icons.keyboard_arrow_down,
|
||||
size: 16,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox.square(
|
||||
dimension: desktop
|
||||
? AppControlSize.headerButton
|
||||
: 48,
|
||||
child: IconButton(
|
||||
key: const Key('project-settings-button'),
|
||||
tooltip: context.l10n.settings,
|
||||
onPressed: () =>
|
||||
showSettingsDialog(context),
|
||||
style: sidebarActionButtonStyle(context),
|
||||
icon: const Icon(
|
||||
Icons.settings_outlined,
|
||||
size: AppIconSize.header,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox.square(
|
||||
dimension: desktop
|
||||
? AppControlSize.headerButton
|
||||
: 48,
|
||||
child: const BackgroundTasksButton(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
Widget leading() => Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (navigationCollapsed && integrated)
|
||||
SizedBox(
|
||||
width: EditorWindowChrome.leadingWidth,
|
||||
),
|
||||
if (navigationCollapsed) controls(),
|
||||
const SizedBox(width: AppSpacing.compact),
|
||||
],
|
||||
);
|
||||
void selectProject(RecentProject project) {
|
||||
if (project.availability.canOpen) {
|
||||
_openProject(ref, project);
|
||||
} else {
|
||||
_relocateProject(context, ref, project);
|
||||
}
|
||||
}
|
||||
|
||||
final agent = WorkspaceAgentSurface(
|
||||
key: _agentKey,
|
||||
state: state,
|
||||
onSelectProject: (project) =>
|
||||
project.availability.canOpen
|
||||
? _openProject(ref, project)
|
||||
: _relocateProject(context, ref, project),
|
||||
onCreateProject: () =>
|
||||
_selectProject(context, ref, create: true),
|
||||
);
|
||||
Widget navigation({
|
||||
DesktopWorkspaceGeometry? geometry,
|
||||
VoidCallback? expandEditor,
|
||||
bool drawer = false,
|
||||
}) => ProjectSidebar(
|
||||
experience: experience,
|
||||
key: drawer
|
||||
? _drawerNavigationKey
|
||||
: _navigationKey,
|
||||
agent: desktop && !drawer
|
||||
? agent
|
||||
: const SizedBox.shrink(),
|
||||
navigationOnly: !desktop || drawer,
|
||||
onNavigationComplete: desktop && !drawer
|
||||
? null
|
||||
: () => Navigator.of(context).maybePop(),
|
||||
editorHidden: geometry?.editorHidden ?? false,
|
||||
onExpandEditor: expandEditor,
|
||||
agentHeaderLeading: desktop
|
||||
? leading()
|
||||
: const SizedBox.shrink(),
|
||||
navigationCollapsed:
|
||||
desktop && !drawer && navigationCollapsed,
|
||||
mode: _mode,
|
||||
onModeChanged: _setMode,
|
||||
navigationWidth: geometry?.sidebarWidth ?? 320,
|
||||
state: state,
|
||||
selectedProjectId:
|
||||
_selectedProjectId ?? state.activeProject?.id,
|
||||
integratedTitlebar: integrated,
|
||||
onCreateProject: () =>
|
||||
_selectProject(context, ref, create: true),
|
||||
onSelectProject: selectProject,
|
||||
onRenameProject: (project) =>
|
||||
_renameProject(context, ref, project),
|
||||
headerControls: desktop && !drawer
|
||||
? controls()
|
||||
: HeaderControlRegion(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Builder(
|
||||
builder: (context) => IconButton(
|
||||
tooltip: MaterialLocalizations.of(
|
||||
context,
|
||||
).closeButtonTooltip,
|
||||
onPressed: () =>
|
||||
Scaffold.of(context)
|
||||
.closeDrawer(),
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
final editor = ProjectLoadingRegion(
|
||||
loading: _switchingProject,
|
||||
child:
|
||||
state.activeProject != null &&
|
||||
state.timeline != null
|
||||
? EditorWorkspace(
|
||||
key: _editorKey,
|
||||
experience: experience,
|
||||
projectId: state.activeProject!.id,
|
||||
timelineId: state.timeline!.id,
|
||||
projectName: state.activeProject!.name,
|
||||
showProjectName:
|
||||
desktop && _mode == WorkspaceMode.cut,
|
||||
integratedTitlebar: desktop && integrated,
|
||||
headerLeading:
|
||||
desktop && _mode == WorkspaceMode.cut
|
||||
? leading()
|
||||
: const SizedBox(
|
||||
width: AppSpacing.compact,
|
||||
),
|
||||
)
|
||||
: EmptyEditor(
|
||||
state: state,
|
||||
showProjectName:
|
||||
desktop && _mode == WorkspaceMode.cut,
|
||||
headerLeading:
|
||||
desktop && _mode == WorkspaceMode.cut
|
||||
? leading()
|
||||
: const SizedBox(
|
||||
width: AppSpacing.compact,
|
||||
),
|
||||
),
|
||||
);
|
||||
return switch (experience) {
|
||||
DeviceExperience.desktop => DesktopWorkspaceShell(
|
||||
controller: _desktopSplits,
|
||||
scaffoldKey: _desktopScaffoldKey,
|
||||
navigationDrawer: navigation(drawer: true),
|
||||
mode: _mode,
|
||||
sidebarCollapsed: navigationCollapsed,
|
||||
sidebarWidth: _sidebarWidthOverride,
|
||||
onSidebarCollapsedChanged: (value) {
|
||||
_sidebarCollapsed = value;
|
||||
_saveViewState();
|
||||
},
|
||||
onSidebarWidthChanged: (value) {
|
||||
_sidebarWidthOverride = value;
|
||||
_saveViewState();
|
||||
},
|
||||
sidebarBuilder: (geometry, expand) =>
|
||||
navigation(
|
||||
geometry: geometry,
|
||||
expandEditor: expand,
|
||||
),
|
||||
editor: editor,
|
||||
),
|
||||
DeviceExperience.tablet => TabletWorkspaceShell(
|
||||
mode: _mode,
|
||||
onModeChanged: _setMode,
|
||||
navigation: navigation(),
|
||||
headerActions: controls(
|
||||
navigationToggle: false,
|
||||
),
|
||||
title: state.activeProject?.name ?? 'Cutdex',
|
||||
integratedTitlebar: integrated,
|
||||
agent: agent,
|
||||
editor: editor,
|
||||
),
|
||||
DeviceExperience.phone => PhoneWorkspaceShell(
|
||||
mode: _mode,
|
||||
onModeChanged: _setMode,
|
||||
navigation: navigation(),
|
||||
headerActions: controls(
|
||||
navigationToggle: false,
|
||||
),
|
||||
title: state.activeProject?.name ?? 'Cutdex',
|
||||
integratedTitlebar: integrated,
|
||||
agent: agent,
|
||||
editor: editor,
|
||||
),
|
||||
};
|
||||
},
|
||||
),
|
||||
PositionedDirectional(
|
||||
top: AppSpacing.compact,
|
||||
end: AppSpacing.compact,
|
||||
child: _SonnerErrorToast(
|
||||
message: projects.hasError
|
||||
? const AppFailure(
|
||||
AppErrorCode.loadProjectsFailed,
|
||||
)
|
||||
: state.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _StartupLoading extends StatefulWidget {
|
||||
const _StartupLoading({super.key});
|
||||
|
||||
@override
|
||||
State<_StartupLoading> createState() => _StartupLoadingState();
|
||||
}
|
||||
|
||||
class _StartupLoadingState extends State<_StartupLoading>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late final AnimationController _pulse = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 1800),
|
||||
)..repeat(reverse: true);
|
||||
|
||||
late final Animation<double> _opacity = Tween<double>(
|
||||
begin: 0.5,
|
||||
end: 1,
|
||||
).animate(CurvedAnimation(parent: _pulse, curve: Curves.easeInOut));
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_pulse.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Center(
|
||||
child: Semantics(
|
||||
liveRegion: true,
|
||||
child: FadeTransition(
|
||||
opacity: _opacity,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'CUTDEX',
|
||||
style: Theme.of(context).textTheme.titleMedium
|
||||
?.copyWith(fontWeight: FontWeight.w600, letterSpacing: 3),
|
||||
),
|
||||
const SizedBox(height: AppSpacing.medium),
|
||||
Text(
|
||||
context.l10n.openingWorkspace,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class _SonnerErrorToast extends StatefulWidget {
|
||||
const _SonnerErrorToast({required this.message});
|
||||
|
||||
final AppFailure? message;
|
||||
|
||||
@override
|
||||
State<_SonnerErrorToast> createState() => _SonnerErrorToastState();
|
||||
}
|
||||
|
||||
class _SonnerErrorToastState extends State<_SonnerErrorToast> {
|
||||
static const _displayDuration = Duration(seconds: 6);
|
||||
|
||||
Timer? _timer;
|
||||
AppFailure? _displayedMessage;
|
||||
bool _visible = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_show(widget.message);
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant _SonnerErrorToast oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (widget.message != null &&
|
||||
(oldWidget.message == null || widget.message != oldWidget.message)) {
|
||||
_show(widget.message);
|
||||
}
|
||||
}
|
||||
|
||||
void _show(AppFailure? message) {
|
||||
if (message == null) return;
|
||||
_timer?.cancel();
|
||||
_displayedMessage = message;
|
||||
_visible = true;
|
||||
_timer = Timer(_displayDuration, _hide);
|
||||
}
|
||||
|
||||
void _hide() {
|
||||
if (mounted) setState(() => _visible = false);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_timer?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final message = _displayedMessage;
|
||||
if (message == null) return const SizedBox.shrink();
|
||||
final theme = Theme.of(context);
|
||||
return IgnorePointer(
|
||||
ignoring: !_visible,
|
||||
child: AnimatedSlide(
|
||||
offset: _visible ? Offset.zero : const Offset(0.08, 0),
|
||||
duration: const Duration(milliseconds: 180),
|
||||
curve: Curves.easeOutCubic,
|
||||
child: AnimatedOpacity(
|
||||
opacity: _visible ? 1 : 0,
|
||||
duration: const Duration(milliseconds: 160),
|
||||
child: Semantics(
|
||||
liveRegion: true,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 360),
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHigh,
|
||||
border: Border.all(color: theme.colorScheme.outlineVariant),
|
||||
borderRadius: BorderRadius.circular(AppRadius.large),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: theme.colorScheme.shadow.withValues(alpha: .25),
|
||||
blurRadius: 16,
|
||||
offset: const Offset(0, 6),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(
|
||||
start: AppSpacing.compact,
|
||||
top: AppSpacing.small,
|
||||
bottom: AppSpacing.small,
|
||||
end: AppSpacing.tiny,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
size: AppIconSize.small,
|
||||
color: theme.colorScheme.error,
|
||||
),
|
||||
const SizedBox(width: AppSpacing.small),
|
||||
Flexible(
|
||||
child: Text(
|
||||
context.l10n.failureMessage(message),
|
||||
style: theme.textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: MaterialLocalizations.of(context)
|
||||
.closeButtonTooltip,
|
||||
onPressed: _hide,
|
||||
icon: const Icon(Icons.close, size: AppIconSize.small),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user