Files
cutdex/lib/app/shells/phone_workspace_shell.dart
T
lingjhf 27e77fff39 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.
2026-10-05 23:36:23 +08:00

59 lines
1.7 KiB
Dart

import 'package:flutter/material.dart';
import '../../l10n/l10n.dart';
import '../../workspace/workspace_mode.dart';
import 'workspace_frame.dart';
/// A focused surface; hidden features keep their state in workspace controllers.
class PhoneWorkspaceShell extends StatelessWidget {
const PhoneWorkspaceShell({
super.key,
required this.mode,
required this.onModeChanged,
required this.navigation,
required this.headerActions,
required this.title,
required this.integratedTitlebar,
required this.agent,
required this.editor,
});
final WorkspaceMode mode;
final ValueChanged<WorkspaceMode> onModeChanged;
final Widget navigation;
final Widget headerActions;
final String title;
final bool integratedTitlebar;
final Widget agent;
final Widget editor;
@override
Widget build(BuildContext context) => WorkspaceFrame(
key: const Key('phone-workspace-shell'),
navigation: navigation,
headerActions: headerActions,
title: title,
integratedTitlebar: integratedTitlebar,
bottomNavigationBar: NavigationBar(
height: 64,
selectedIndex: mode == WorkspaceMode.agent ? 0 : 1,
onDestinationSelected: (index) =>
onModeChanged(index == 0 ? WorkspaceMode.agent : WorkspaceMode.cut),
destinations: [
NavigationDestination(
key: const Key('workspace-agent-destination'),
icon: const Icon(Icons.chat_bubble_outline),
label: context.l10n.workspaceAgent,
),
NavigationDestination(
key: const Key('workspace-cut-destination'),
icon: const Icon(Icons.movie_outlined),
label: context.l10n.workspaceCut,
),
],
),
child: mode == WorkspaceMode.agent ? agent : editor,
);
}