Files
Synapse/app/lib/main.dart
dasemuandClaude Sonnet 5.5 88ef4a97a5 feat(app): hubs, types and tags UI, themes, key bindings and slash commands
Settings screen (themes incl. Sweet, rebindable shortcuts), rich text escapes,
page sidebar with the local graph, sortable All pages, tree view changes and the
Type/Tags rows in the page header. Docs updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 02:45:22 +01:00

31 lines
926 B
Dart

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'src/app.dart';
import 'src/backend/graph_backend.dart';
import 'src/editor/block_row.dart' as editor;
import 'src/rust/frb_generated.dart';
import 'src/state/settings.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await RustLib.init();
editor.openUrl = (url) {
final uri = Uri.tryParse(url);
if (uri != null) launchUrl(uri, mode: LaunchMode.externalApplication);
};
final dir =
Platform.environment['SYNAPSE_GRAPH'] ??
'${(await getApplicationSupportDirectory()).path}${Platform.pathSeparator}graph';
final backend = await FfiGraphBackend.open(dir);
runApp(
SynapseApp(
backend: backend,
settings: FileSettings('$dir${Platform.pathSeparator}app-settings.json'),
),
);
}