switched to json storage to allow sharing
This commit is contained in:
@ -90,6 +90,53 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _showStorageInfo() async {
|
||||
final filePath = await _storageService.getProjectsFilePath();
|
||||
if (!mounted) return;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Row(
|
||||
children: [
|
||||
Icon(Icons.folder_open),
|
||||
SizedBox(width: 8),
|
||||
Text('Storage Location'),
|
||||
],
|
||||
),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Your projects are saved in:',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SelectableText(
|
||||
filePath,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'monospace',
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const Text(
|
||||
'You can share this file with other users or back it up for safekeeping.',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text('Close'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _showWebWarning() {
|
||||
showDialog(
|
||||
context: context,
|
||||
@ -137,6 +184,12 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
tooltip: 'Web Platform Limitations',
|
||||
),
|
||||
),
|
||||
if (!kIsWeb)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.folder),
|
||||
onPressed: _showStorageInfo,
|
||||
tooltip: 'Storage Location',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.info_outline),
|
||||
onPressed: _showAboutDialog,
|
||||
|
||||
Reference in New Issue
Block a user