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.
29 lines
805 B
Dart
29 lines
805 B
Dart
import 'package:cutdex/l10n/l10n.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
|
|
import '../../features/projects/projects_page.dart';
|
|
|
|
part 'app_router.g.dart';
|
|
|
|
// The router is an application resource, independent of editor state changes.
|
|
@Riverpod(keepAlive: true)
|
|
GoRouter appRouter(Ref ref) {
|
|
final router = GoRouter(
|
|
routes: [
|
|
GoRoute(path: '/', builder: (context, state) => const EditingPage()),
|
|
],
|
|
errorBuilder: (context, state) => Scaffold(
|
|
body: Center(
|
|
child: FilledButton(
|
|
onPressed: () => context.go('/'),
|
|
child: Text(context.l10n.backToProjects),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
ref.onDispose(router.dispose);
|
|
return router;
|
|
}
|