Compare commits
28 Commits
56daf1b940
...
v0.1.37
| Author | SHA1 | Date | |
|---|---|---|---|
| 446ef9a57a | |||
| 6103d0b679 | |||
| 5fd690197a | |||
| 31c0ade243 | |||
| 8ec264cebe | |||
| 83bfdf322b | |||
| cad43c7664 | |||
| 5c44574949 | |||
| 336be6cb72 | |||
| 214ae08bb9 | |||
| 100b86d3f9 | |||
| ff1b102047 | |||
| d51f3d4ba7 | |||
| b4016e6e5b | |||
| eae4a853e9 | |||
| 8eb4cadc85 | |||
| 06c5ca9910 | |||
| 27c3804b1e | |||
| debf960d70 | |||
| 1029bad20f | |||
| cef23a1c83 | |||
| c4fe32e4b1 | |||
| 893a1b558f | |||
| b0eebb5ee8 | |||
| 06a76afc42 | |||
| dca8c64555 | |||
| 1aaea5f6d9 | |||
| 3a54a077f3 |
@@ -4,9 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
3
lib/assets/constants.dart
Normal file
3
lib/assets/constants.dart
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
const String appName = 'Maps Bookmarks';
|
||||||
|
const String jsonFileName = 'MapsBookmarksData.json';
|
||||||
|
const String defaultAndroidExportDirectory = '/storage/emulated/0/Documents';
|
||||||
@@ -25,10 +25,19 @@
|
|||||||
"url": "Url",
|
"url": "Url",
|
||||||
"description": "Beschreibung",
|
"description": "Beschreibung",
|
||||||
"settings": "Einstellungen",
|
"settings": "Einstellungen",
|
||||||
"activateJsonExport": "Json-Export aktivieren",
|
"appData": "App-Daten",
|
||||||
|
"export": "Exportieren",
|
||||||
|
"import": "Importieren",
|
||||||
|
"activateJsonExport": "Immer als JSON speichern",
|
||||||
|
|
||||||
|
"@@comment": "Info",
|
||||||
|
"exportSuccess": "Daten exportiert",
|
||||||
|
"importSuccess": "Daten importiert",
|
||||||
|
|
||||||
"@@comment": "Errors",
|
"@@comment": "Errors",
|
||||||
"errorStoragePermisson": "Zugriff auf Speicher verwehrt",
|
"errorStoragePermisson": "Zugriff auf Speicher verwehrt",
|
||||||
"errorCouldNotLaunchUrl": "Konnte Url nicht öffnen",
|
"errorCouldNotLaunchUrl": "Konnte Url nicht öffnen",
|
||||||
"errorInvalidUrl": "Fehlerhafte Url"
|
"errorInvalidUrl": "Fehlerhafte Url",
|
||||||
|
"exportFailed": "Export fehlgeschlagen",
|
||||||
|
"importFailed": "Import fehlgeschlagen"
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,20 @@
|
|||||||
"url": "Url",
|
"url": "Url",
|
||||||
"description": "Description",
|
"description": "Description",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"activateJsonExport": "Activate json export",
|
"appData": "App data",
|
||||||
|
"export": "Export",
|
||||||
|
"import": "Import",
|
||||||
|
"activateJsonExport": "Always save to JSON",
|
||||||
|
|
||||||
|
|
||||||
|
"@@comment": "Info",
|
||||||
|
"exportSuccess": "Exported data",
|
||||||
|
"importSuccess": "Imported data",
|
||||||
|
|
||||||
"@@comment": "Errors",
|
"@@comment": "Errors",
|
||||||
"errorStoragePermisson": "Storage permissions denied",
|
"errorStoragePermisson": "Storage permissions denied",
|
||||||
"errorCouldNotLaunchUrl": "Could not launch Url",
|
"errorCouldNotLaunchUrl": "Could not launch Url",
|
||||||
"errorInvalidUrl": "Invalid Url"
|
"errorInvalidUrl": "Invalid Url",
|
||||||
|
"exportFailed": "Export failed",
|
||||||
|
"importFailed": "Import failed"
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import 'pages/collections_list_page.dart';
|
|||||||
import 'pages/search_page.dart';
|
import 'pages/search_page.dart';
|
||||||
import 'pages/settings_page.dart';
|
import 'pages/settings_page.dart';
|
||||||
import 'service/search_provider.dart';
|
import 'service/search_provider.dart';
|
||||||
|
import 'service/settings_provider.dart';
|
||||||
import 'service/shared_link_provider.dart';
|
import 'service/shared_link_provider.dart';
|
||||||
import 'service/storage.dart';
|
import 'service/storage.dart';
|
||||||
import 'service/share_intent_service.dart';
|
import 'service/share_intent_service.dart';
|
||||||
@@ -20,6 +21,7 @@ void main() async {
|
|||||||
providers: [
|
providers: [
|
||||||
ChangeNotifierProvider(create: (_) => SharedLinkProvider()),
|
ChangeNotifierProvider(create: (_) => SharedLinkProvider()),
|
||||||
ChangeNotifierProvider(create: (_) => SearchProvider()),
|
ChangeNotifierProvider(create: (_) => SearchProvider()),
|
||||||
|
ChangeNotifierProvider(create: (_) => SettingsProvider()),
|
||||||
],
|
],
|
||||||
child: const MapsBookmarks(),
|
child: const MapsBookmarks(),
|
||||||
),
|
),
|
||||||
|
|||||||
39
lib/model/settings.dart
Normal file
39
lib/model/settings.dart
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import '../assets/constants.dart' as constants;
|
||||||
|
|
||||||
|
class Settings {
|
||||||
|
final String exportDirectoryPath;
|
||||||
|
final bool alwaysExportEnabled;
|
||||||
|
|
||||||
|
Settings._({
|
||||||
|
required this.exportDirectoryPath,
|
||||||
|
required this.alwaysExportEnabled,
|
||||||
|
});
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return {
|
||||||
|
'exportDirectoryPath': exportDirectoryPath,
|
||||||
|
'alwaysExportEnabled': alwaysExportEnabled,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
factory Settings.fromJson(Map<String, dynamic> json) {
|
||||||
|
return Settings._(
|
||||||
|
exportDirectoryPath: json['exportDirectoryPath'] as String,
|
||||||
|
alwaysExportEnabled: json['alwaysExportEnabled'] as bool,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
factory Settings.defaults() {
|
||||||
|
return Settings._(
|
||||||
|
exportDirectoryPath: constants.defaultAndroidExportDirectory,
|
||||||
|
alwaysExportEnabled: false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Settings copyWith({String? exportDirectoryPath, bool? alwaysExportEnabled}) {
|
||||||
|
return Settings._(
|
||||||
|
exportDirectoryPath: exportDirectoryPath ?? this.exportDirectoryPath,
|
||||||
|
alwaysExportEnabled: alwaysExportEnabled ?? this.alwaysExportEnabled,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,191 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../l10n/app_localizations.dart';
|
import '../l10n/app_localizations.dart';
|
||||||
|
import '../service/notifying.dart';
|
||||||
|
import '../service/permission_service.dart';
|
||||||
|
import '../service/settings_provider.dart';
|
||||||
|
import '../service/storage.dart';
|
||||||
|
|
||||||
class SettingsPage extends StatelessWidget {
|
class SettingsPage extends StatefulWidget {
|
||||||
static const routeName = '/settings';
|
static const routeName = '/settings';
|
||||||
const SettingsPage({super.key});
|
const SettingsPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SettingsPage> createState() => _SettingsPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SettingsPageState extends State<SettingsPage> {
|
||||||
|
bool storagePermissionIsGranted = false;
|
||||||
|
final tileSpacing = 16.0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
PermissionService.storagePermissionStatus.then((value) {
|
||||||
|
storagePermissionIsGranted = value.isGranted;
|
||||||
|
if (context.mounted) setState(() {});
|
||||||
|
});
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Localize
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final titlePadding = Theme.of(context).listTileTheme.contentPadding!;
|
||||||
|
checkStoragePermission();
|
||||||
|
final alwaysExportEnabled = context
|
||||||
|
.watch<SettingsProvider>()
|
||||||
|
.settings
|
||||||
|
.alwaysExportEnabled;
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text(AppLocalizations.of(context)!.settings)),
|
appBar: AppBar(title: Text(AppLocalizations.of(context)!.settings)),
|
||||||
|
body: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.9,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: titlePadding,
|
||||||
|
child: Text(
|
||||||
|
AppLocalizations.of(context)!.appData,
|
||||||
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: tileSpacing),
|
||||||
|
ListTile(
|
||||||
|
title: Text('Grant storage permisson'),
|
||||||
|
subtitle: storagePermissionIsGranted
|
||||||
|
? Text('Storage permission granted')
|
||||||
|
: Text(
|
||||||
|
'For app-data settings to work, you need to grant the app permissions to manage internal storage.',
|
||||||
|
),
|
||||||
|
onTap: () => PermissionService.requestStoragePermission
|
||||||
|
.whenComplete(() => checkStoragePermission()),
|
||||||
|
trailing: Icon(Icons.arrow_forward_ios_rounded),
|
||||||
|
enabled: !storagePermissionIsGranted,
|
||||||
|
),
|
||||||
|
SizedBox(height: tileSpacing),
|
||||||
|
ListTile(
|
||||||
|
title: Text(AppLocalizations.of(context)!.import),
|
||||||
|
subtitle: Text('Import app-data from a json file.'),
|
||||||
|
onTap: () => onJsonImportPressed(),
|
||||||
|
trailing: Icon(Icons.arrow_forward_ios_rounded),
|
||||||
|
enabled: storagePermissionIsGranted,
|
||||||
|
),
|
||||||
|
SizedBox(height: tileSpacing),
|
||||||
|
ListTile(
|
||||||
|
title: Text(AppLocalizations.of(context)!.export),
|
||||||
|
subtitle: Text(
|
||||||
|
'Export app-data to a json file in the selected directory.',
|
||||||
|
),
|
||||||
|
onTap: () => onJsonExportPressed(),
|
||||||
|
trailing: Icon(Icons.arrow_forward_ios_rounded),
|
||||||
|
enabled: storagePermissionIsGranted,
|
||||||
|
),
|
||||||
|
SizedBox(height: tileSpacing),
|
||||||
|
ListTile(
|
||||||
|
title: Text('Always save to file'),
|
||||||
|
subtitle: Text(
|
||||||
|
'Export app data to a directory, every time you make a change',
|
||||||
|
),
|
||||||
|
onTap: () => onAlwaysSaveToJsonPressed(),
|
||||||
|
trailing: Checkbox(
|
||||||
|
value: alwaysExportEnabled,
|
||||||
|
onChanged: (value) {
|
||||||
|
onAlwaysSaveToJsonPressed();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
enabled: storagePermissionIsGranted,
|
||||||
|
),
|
||||||
|
if (alwaysExportEnabled) SizedBox(height: tileSpacing),
|
||||||
|
if (alwaysExportEnabled)
|
||||||
|
ListTile(
|
||||||
|
title: Text('Change export directory'),
|
||||||
|
subtitle: Text(
|
||||||
|
context
|
||||||
|
.watch<SettingsProvider>()
|
||||||
|
.settings
|
||||||
|
.exportDirectoryPath,
|
||||||
|
),
|
||||||
|
onTap: () => onChangeExportDirectoryPressed(),
|
||||||
|
trailing: Icon(Icons.arrow_forward_ios_rounded),
|
||||||
|
enabled: storagePermissionIsGranted,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onJsonExportPressed() async {
|
||||||
|
if (!await checkStoragePermission()) return;
|
||||||
|
Storage.exportToJsonFile().then(showExportInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
void onJsonImportPressed() async {
|
||||||
|
if (!await checkStoragePermission()) return;
|
||||||
|
Storage.importFromJsonFile().then(showImportInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
void onAlwaysSaveToJsonPressed() async {
|
||||||
|
if (context.read<SettingsProvider>().settings.alwaysExportEnabled) {
|
||||||
|
context.read<SettingsProvider>().setExportDirectoryPath('', silent: true);
|
||||||
|
context.read<SettingsProvider>().setAlwaysExportEnabled(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!await PermissionService.storagePermissionStatus.isGranted) return;
|
||||||
|
final dir = await Storage.selectDirectoryPath();
|
||||||
|
if (dir.isEmpty || !context.mounted) return;
|
||||||
|
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
context.read<SettingsProvider>().setExportDirectoryPath(dir, silent: true);
|
||||||
|
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
Storage.saveDataToFile().whenComplete(
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
() => context.read<SettingsProvider>().setAlwaysExportEnabled(true),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void onChangeExportDirectoryPressed() async {
|
||||||
|
if (!await PermissionService.storagePermissionStatus.isGranted) return;
|
||||||
|
final dir = await Storage.selectDirectoryPath();
|
||||||
|
if (dir.isEmpty || !context.mounted) return;
|
||||||
|
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
context.read<SettingsProvider>().setExportDirectoryPath(dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<bool> checkStoragePermission() async {
|
||||||
|
PermissionService.storagePermissionStatus.then((value) {
|
||||||
|
if (context.mounted && value.isGranted != storagePermissionIsGranted) {
|
||||||
|
storagePermissionIsGranted = value.isGranted;
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return storagePermissionIsGranted;
|
||||||
|
}
|
||||||
|
|
||||||
|
void showExportInfo(bool success) => Notifying.showSnackbar(
|
||||||
|
context,
|
||||||
|
text: success
|
||||||
|
? AppLocalizations.of(context)!.exportSuccess
|
||||||
|
: AppLocalizations.of(context)!.exportFailed,
|
||||||
|
isError: !success,
|
||||||
|
);
|
||||||
|
|
||||||
|
void showImportInfo(bool success) => Notifying.showSnackbar(
|
||||||
|
context,
|
||||||
|
text: success
|
||||||
|
? AppLocalizations.of(context)!.importSuccess
|
||||||
|
: AppLocalizations.of(context)!.importFailed,
|
||||||
|
isError: !success,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
90
lib/service/json_file_service.dart
Normal file
90
lib/service/json_file_service.dart
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:file_selector/file_selector.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
import '../model/bookmark.dart';
|
||||||
|
import '../model/collection.dart';
|
||||||
|
import '../assets/constants.dart' as constants;
|
||||||
|
|
||||||
|
class JsonFileService {
|
||||||
|
static Future<bool> exportToJson({
|
||||||
|
required List<Collection> collections,
|
||||||
|
required List<Bookmark> bookmarks,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final dir = await selectDirectoryPath();
|
||||||
|
if (dir.isEmpty) return false;
|
||||||
|
|
||||||
|
saveDataToFile(collections, bookmarks, dir);
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<({List<Collection> collections, List<Bookmark> bookmarks})>
|
||||||
|
importFromJson() async {
|
||||||
|
try {
|
||||||
|
const typeGroup = XTypeGroup(label: 'json', extensions: <String>['json']);
|
||||||
|
final XFile? file = await openFile(
|
||||||
|
acceptedTypeGroups: <XTypeGroup>[typeGroup],
|
||||||
|
);
|
||||||
|
|
||||||
|
if (file == null) {
|
||||||
|
return (collections: <Collection>[], bookmarks: <Bookmark>[]);
|
||||||
|
}
|
||||||
|
|
||||||
|
final jsonString = await file.readAsString();
|
||||||
|
|
||||||
|
final data = jsonDecode(jsonString) as Map<String, dynamic>;
|
||||||
|
|
||||||
|
final collections = (data['collections'] as List<dynamic>? ?? [])
|
||||||
|
.map((json) => Collection.fromJson(json as Map<String, dynamic>))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
final bookmarks = (data['bookmarks'] as List<dynamic>? ?? [])
|
||||||
|
.map((json) => Bookmark.fromJson(json as Map<String, dynamic>))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
return (collections: collections, bookmarks: bookmarks);
|
||||||
|
} catch (e) {
|
||||||
|
return (collections: <Collection>[], bookmarks: <Bookmark>[]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<bool> saveDataToFile(
|
||||||
|
List<Collection> collections,
|
||||||
|
List<Bookmark> bookmarks,
|
||||||
|
String directory,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
final data = jsonEncode({
|
||||||
|
'collections': collections.map((c) => c.toJson()).toList(),
|
||||||
|
'bookmarks': bookmarks.map((b) => b.toJson()).toList(),
|
||||||
|
}).codeUnits;
|
||||||
|
|
||||||
|
final file = XFile.fromData(
|
||||||
|
Uint8List.fromList(data),
|
||||||
|
mimeType: 'application/json',
|
||||||
|
name: constants.jsonFileName,
|
||||||
|
);
|
||||||
|
|
||||||
|
file.saveTo('$directory/${constants.jsonFileName}');
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<String> selectDirectoryPath() async {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
return await getDirectoryPath(
|
||||||
|
initialDirectory: constants.defaultAndroidExportDirectory,
|
||||||
|
) ??
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
return await getDirectoryPath() ?? '';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,9 @@
|
|||||||
// service/maps_launcher_service.dart
|
|
||||||
import 'dart:io' show Platform;
|
import 'dart:io' show Platform;
|
||||||
import 'package:android_intent_plus/android_intent.dart';
|
import 'package:android_intent_plus/android_intent.dart';
|
||||||
|
|
||||||
class MapsLauncherService {
|
class MapsLauncherService {
|
||||||
/// Opens a URL in Google Maps app
|
|
||||||
/// Falls back to browser if Maps app is not installed
|
|
||||||
static Future<bool> openInGoogleMaps(String url) async {
|
static Future<bool> openInGoogleMaps(String url) async {
|
||||||
if (!Platform.isAndroid) {
|
if (!Platform.isAndroid) return false;
|
||||||
// Handle iOS or other platforms if needed
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Try to open in Google Maps app
|
// Try to open in Google Maps app
|
||||||
@@ -28,36 +22,16 @@ class MapsLauncherService {
|
|||||||
await browserIntent.launch();
|
await browserIntent.launch();
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Failed to open maps link: $e');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Opens navigation to specific coordinates
|
|
||||||
static Future<bool> navigateToCoordinates(
|
|
||||||
String latitude,
|
|
||||||
String longitude,
|
|
||||||
) async {
|
|
||||||
final url = 'google.navigation:q=$latitude,$longitude';
|
|
||||||
return openInGoogleMaps(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Opens a search query in Google Maps
|
|
||||||
static Future<bool> searchInMaps(String query) async {
|
|
||||||
final encodedQuery = Uri.encodeComponent(query);
|
|
||||||
final url = 'geo:0,0?q=$encodedQuery';
|
|
||||||
return openInGoogleMaps(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Shares a Google Maps link or location via Android share sheet
|
|
||||||
static Future<bool> shareLocation({
|
static Future<bool> shareLocation({
|
||||||
required String text,
|
required String text,
|
||||||
String? subject,
|
String? subject,
|
||||||
}) async {
|
}) async {
|
||||||
if (!Platform.isAndroid) {
|
if (!Platform.isAndroid) return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final intent = AndroidIntent(
|
final intent = AndroidIntent(
|
||||||
@@ -72,7 +46,6 @@ class MapsLauncherService {
|
|||||||
await intent.launch();
|
await intent.launch();
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Failed to share location: $e');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class Notifying {
|
|||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
backgroundColor: Theme.of(context).colorScheme.error,
|
backgroundColor: isError ? Theme.of(context).colorScheme.error : null,
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -29,7 +29,7 @@ class Notifying {
|
|||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar(),
|
ScaffoldMessenger.of(context).hideCurrentSnackBar(),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.close_rounded,
|
Icons.close_rounded,
|
||||||
color: Theme.of(context).colorScheme.onError,
|
color: isError ? Theme.of(context).colorScheme.onError : null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -54,11 +54,11 @@ class Notifying {
|
|||||||
showSnackbar(context, text: errorText, isError: true);
|
showSnackbar(context, text: errorText, isError: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showStoragePermissionErrorSnackbar(BuildContext context) {
|
static void showErrorSnackbar(BuildContext context, String message) {
|
||||||
showSnackbar(
|
showSnackbar(context, text: message, isError: true);
|
||||||
context,
|
}
|
||||||
text: AppLocalizations.of(context)!.errorStoragePermisson,
|
|
||||||
isError: true,
|
static void showMessageSnackbar(BuildContext context, String message) {
|
||||||
);
|
showSnackbar(context, text: message, isError: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
lib/service/permission_service.dart
Normal file
9
lib/service/permission_service.dart
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
|
class PermissionService {
|
||||||
|
static Future<PermissionStatus> get storagePermissionStatus =>
|
||||||
|
Permission.manageExternalStorage.status;
|
||||||
|
|
||||||
|
static Future<PermissionStatus> get requestStoragePermission =>
|
||||||
|
Permission.manageExternalStorage.request();
|
||||||
|
}
|
||||||
24
lib/service/settings_provider.dart
Normal file
24
lib/service/settings_provider.dart
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../model/settings.dart';
|
||||||
|
import 'storage.dart';
|
||||||
|
|
||||||
|
class SettingsProvider extends ChangeNotifier {
|
||||||
|
SettingsProvider() : _settings = Storage.loadSettings();
|
||||||
|
|
||||||
|
Settings _settings;
|
||||||
|
|
||||||
|
Settings get settings => _settings;
|
||||||
|
|
||||||
|
void setExportDirectoryPath(String path, {bool silent = false}) {
|
||||||
|
_settings = _settings.copyWith(exportDirectoryPath: path);
|
||||||
|
Storage.saveSettings(_settings);
|
||||||
|
if (!silent) notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setAlwaysExportEnabled(bool enabled, {bool silent = false}) {
|
||||||
|
_settings = _settings.copyWith(alwaysExportEnabled: enabled);
|
||||||
|
Storage.saveSettings(_settings);
|
||||||
|
if (!silent) notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,21 +4,49 @@ import 'package:shared_preferences/shared_preferences.dart';
|
|||||||
|
|
||||||
import '../model/bookmark.dart';
|
import '../model/bookmark.dart';
|
||||||
import '../model/collection.dart';
|
import '../model/collection.dart';
|
||||||
|
import '../model/settings.dart';
|
||||||
|
import 'json_file_service.dart';
|
||||||
|
|
||||||
class Storage {
|
class Storage {
|
||||||
static const String _bookmarksKey = 'bookmarks';
|
static const String _bookmarksKey = 'bookmarks';
|
||||||
static const String _collectionsKey = 'collections';
|
static const String _collectionsKey = 'collections';
|
||||||
static SharedPreferencesWithCache? _prefsWithCache;
|
static SharedPreferencesWithCache? _prefsWithCache;
|
||||||
|
static const String _settingsKey = 'settings';
|
||||||
static const String _statsKey = 'stats';
|
static const String _statsKey = 'stats';
|
||||||
|
static Settings _currentSettings = Settings.defaults();
|
||||||
|
|
||||||
static Future<void> initialize() async {
|
static Future<void> initialize() async {
|
||||||
_prefsWithCache = await SharedPreferencesWithCache.create(
|
_prefsWithCache = await SharedPreferencesWithCache.create(
|
||||||
cacheOptions: const SharedPreferencesWithCacheOptions(
|
cacheOptions: const SharedPreferencesWithCacheOptions(
|
||||||
allowList: <String>{_collectionsKey, _bookmarksKey, _statsKey},
|
allowList: <String>{
|
||||||
|
_collectionsKey,
|
||||||
|
_bookmarksKey,
|
||||||
|
_statsKey,
|
||||||
|
_settingsKey,
|
||||||
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Settings loadSettings() {
|
||||||
|
final jsonString = _prefs.getString(_settingsKey);
|
||||||
|
if (jsonString != null) {
|
||||||
|
final json = jsonDecode(jsonString) as Map<String, dynamic>;
|
||||||
|
_currentSettings = Settings.fromJson(json);
|
||||||
|
return _currentSettings;
|
||||||
|
} else {
|
||||||
|
final settings = Settings.defaults();
|
||||||
|
saveSettings(settings);
|
||||||
|
return settings;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<void> saveSettings(Settings settings) {
|
||||||
|
final json = jsonEncode(settings.toJson());
|
||||||
|
_currentSettings = settings;
|
||||||
|
return _prefs.setString(_settingsKey, json);
|
||||||
|
}
|
||||||
|
|
||||||
static List<Collection> loadCollections() {
|
static List<Collection> loadCollections() {
|
||||||
final jsonString = _prefs.getString(_collectionsKey) ?? '[]';
|
final jsonString = _prefs.getString(_collectionsKey) ?? '[]';
|
||||||
final jsonList = jsonDecode(jsonString) as List;
|
final jsonList = jsonDecode(jsonString) as List;
|
||||||
@@ -38,11 +66,13 @@ class Storage {
|
|||||||
static Future<void> saveCollections(List<Collection> collections) async {
|
static Future<void> saveCollections(List<Collection> collections) async {
|
||||||
final jsonList = collections.map((c) => c.toJson()).toList();
|
final jsonList = collections.map((c) => c.toJson()).toList();
|
||||||
await _prefs.setString(_collectionsKey, jsonEncode(jsonList));
|
await _prefs.setString(_collectionsKey, jsonEncode(jsonList));
|
||||||
|
if (_currentSettings.alwaysExportEnabled) saveDataToFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> saveBookmarks(List<Bookmark> bookmarks) async {
|
static Future<void> saveBookmarks(List<Bookmark> bookmarks) async {
|
||||||
final jsonList = bookmarks.map((b) => b.toJson()).toList();
|
final jsonList = bookmarks.map((b) => b.toJson()).toList();
|
||||||
await _prefs.setString(_bookmarksKey, jsonEncode(jsonList));
|
await _prefs.setString(_bookmarksKey, jsonEncode(jsonList));
|
||||||
|
if (_currentSettings.alwaysExportEnabled) saveDataToFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Bookmark> loadBookmarksForCollection(int collectionId) {
|
static List<Bookmark> loadBookmarksForCollection(int collectionId) {
|
||||||
@@ -155,6 +185,31 @@ class Storage {
|
|||||||
await _prefs.setString(_statsKey, jsonEncode(stats));
|
await _prefs.setString(_statsKey, jsonEncode(stats));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Future<bool> exportToJsonFile() => JsonFileService.exportToJson(
|
||||||
|
collections: loadCollections(),
|
||||||
|
bookmarks: loadBookmarks(),
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<bool> importFromJsonFile() async {
|
||||||
|
final import = await JsonFileService.importFromJson();
|
||||||
|
|
||||||
|
if (import.bookmarks.isNotEmpty || import.collections.isNotEmpty) {
|
||||||
|
saveBookmarks(import.bookmarks);
|
||||||
|
saveCollections(import.collections);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<String> selectDirectoryPath() =>
|
||||||
|
JsonFileService.selectDirectoryPath();
|
||||||
|
|
||||||
|
static Future<bool> saveDataToFile() => JsonFileService.saveDataToFile(
|
||||||
|
loadCollections(),
|
||||||
|
loadBookmarks(),
|
||||||
|
_currentSettings.exportDirectoryPath,
|
||||||
|
);
|
||||||
|
|
||||||
static SharedPreferencesWithCache get _prefs {
|
static SharedPreferencesWithCache get _prefs {
|
||||||
if (_prefsWithCache == null) {
|
if (_prefsWithCache == null) {
|
||||||
throw StateError(
|
throw StateError(
|
||||||
|
|||||||
@@ -22,5 +22,6 @@ ThemeData _baseTheme(ColorScheme scheme) =>
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadiusGeometry.circular(12),
|
borderRadius: BorderRadiusGeometry.circular(12),
|
||||||
),
|
),
|
||||||
|
contentPadding: EdgeInsetsDirectional.only(start: 16.0, end: 24.0),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import 'package:flutter/material.dart' show TextButton, Theme;
|
import 'package:flutter/material.dart' show TextButton, Theme;
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
|
import '../../l10n/app_localizations.dart';
|
||||||
|
|
||||||
class EditDialogTitle extends StatelessWidget {
|
class EditDialogTitle extends StatelessWidget {
|
||||||
const EditDialogTitle({
|
const EditDialogTitle({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -15,11 +17,10 @@ class EditDialogTitle extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
// TODO: Localize
|
|
||||||
if (dialogType == DialogType.bookmark)
|
if (dialogType == DialogType.bookmark)
|
||||||
Text('Create Bookmark')
|
Text(AppLocalizations.of(context)!.createBookmark)
|
||||||
else
|
else
|
||||||
Text('Create Collection'),
|
Text(AppLocalizations.of(context)!.createCollection),
|
||||||
|
|
||||||
if (onDeletePressed != null)
|
if (onDeletePressed != null)
|
||||||
TextButton(
|
TextButton(
|
||||||
@@ -28,7 +29,7 @@ class EditDialogTitle extends StatelessWidget {
|
|||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Delete',
|
AppLocalizations.of(context)!.delete,
|
||||||
style: TextStyle(color: Theme.of(context).colorScheme.error),
|
style: TextStyle(color: Theme.of(context).colorScheme.error),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
164
pubspec.lock
164
pubspec.lock
@@ -41,14 +41,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.1.2"
|
||||||
code_assets:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: code_assets
|
|
||||||
sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.0"
|
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -57,14 +49,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.19.1"
|
version: "1.19.1"
|
||||||
crypto:
|
cross_file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: crypto
|
name: cross_file
|
||||||
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
|
sha256: "701dcfc06da0882883a2657c445103380e53e647060ad8d9dfb710c100996608"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.7"
|
version: "0.3.5+1"
|
||||||
csslib:
|
csslib:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -105,6 +97,70 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.1"
|
version: "7.0.1"
|
||||||
|
file_selector:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: file_selector
|
||||||
|
sha256: bd15e43e9268db636b53eeaca9f56324d1622af30e5c34d6e267649758c84d9a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
file_selector_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_android
|
||||||
|
sha256: "51e8fd0446de75e4b62c065b76db2210c704562d072339d333bd89c57a7f8a7c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.5.2+4"
|
||||||
|
file_selector_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_ios
|
||||||
|
sha256: e2ecf2885c121691ce13b60db3508f53c01f869fb6e8dc5c1cfa771e4c46aeca
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.5.3+5"
|
||||||
|
file_selector_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_linux
|
||||||
|
sha256: "2567f398e06ac72dcf2e98a0c95df2a9edd03c2c2e0cacd4780f20cdf56263a0"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.4"
|
||||||
|
file_selector_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_macos
|
||||||
|
sha256: "5e0bbe9c312416f1787a68259ea1505b52f258c587f12920422671807c4d618a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.5"
|
||||||
|
file_selector_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_platform_interface
|
||||||
|
sha256: "35e0bd61ebcdb91a3505813b055b09b79dfdc7d0aee9c09a7ba59ae4bb13dc85"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.7.0"
|
||||||
|
file_selector_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_web
|
||||||
|
sha256: c4c0ea4224d97a60a7067eca0c8fd419e708ff830e0c83b11a48faf566cec3e7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.4+2"
|
||||||
|
file_selector_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_windows
|
||||||
|
sha256: "62197474ae75893a62df75939c777763d39c2bc5f73ce5b88497208bc269abfd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.3+5"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -133,22 +189,6 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
glob:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: glob
|
|
||||||
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.3"
|
|
||||||
hooks:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: hooks
|
|
||||||
sha256: "5d309c86e7ce34cd8e37aa71cb30cb652d3829b900ab145e4d9da564b31d59f7"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.0"
|
|
||||||
html:
|
html:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -213,14 +253,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.0"
|
version: "6.0.0"
|
||||||
logging:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: logging
|
|
||||||
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -253,14 +285,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.2"
|
version: "0.4.2"
|
||||||
native_toolchain_c:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: native_toolchain_c
|
|
||||||
sha256: "89e83885ba09da5fdf2cdacc8002a712ca238c28b7f717910b34bcd27b0d03ac"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.17.4"
|
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -269,14 +293,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
objective_c:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: objective_c
|
|
||||||
sha256: "9922a1ad59ac5afb154cc948aa6ded01987a75003651d0a2866afc23f4da624e"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "9.2.3"
|
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -285,30 +301,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
path_provider:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: path_provider
|
|
||||||
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.5"
|
|
||||||
path_provider_android:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_android
|
|
||||||
sha256: f2c65e21139ce2c3dad46922be8272bb5963516045659e71bb16e151c93b580e
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.2.22"
|
|
||||||
path_provider_foundation:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_foundation
|
|
||||||
sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.6.0"
|
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -405,14 +397,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.5+1"
|
version: "6.1.5+1"
|
||||||
pub_semver:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: pub_semver
|
|
||||||
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.2.0"
|
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -634,14 +618,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
yaml:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: yaml
|
|
||||||
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.3"
|
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.10.3 <4.0.0"
|
dart: ">=3.10.0 <4.0.0"
|
||||||
flutter: ">=3.38.4"
|
flutter: ">=3.38.0"
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ dependencies:
|
|||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
intl: any
|
intl: any
|
||||||
path_provider: ^2.1.5
|
|
||||||
permission_handler: ^12.0.1
|
permission_handler: ^12.0.1
|
||||||
|
file_selector: ^1.1.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user