Compare commits
4 Commits
5fd690197a
...
v0.1.27
| Author | SHA1 | Date | |
|---|---|---|---|
| 06a76afc42 | |||
| dca8c64555 | |||
| 1aaea5f6d9 | |||
| 3a54a077f3 |
@@ -4,6 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
155
.gitignore
vendored
155
.gitignore
vendored
@@ -1,23 +1,16 @@
|
|||||||
# Do not remove or rename entries in this file, only add new ones
|
|
||||||
# See https://github.com/flutter/flutter/issues/128635 for more context.
|
|
||||||
|
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
*.class
|
*.class
|
||||||
*.lock
|
|
||||||
*.log
|
*.log
|
||||||
*.pyc
|
*.pyc
|
||||||
*.swp
|
*.swp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.atom/
|
.atom/
|
||||||
|
.build/
|
||||||
.buildlog/
|
.buildlog/
|
||||||
.history
|
.history
|
||||||
.svn/
|
.svn/
|
||||||
lib/l10n/app_localizations*
|
.swiftpm/
|
||||||
|
migrate_working_dir/
|
||||||
# As packages are no longer pinned, we use a lockfile for testing locally.
|
|
||||||
# When unpinning packages, Using lockfiles ensures that failures in PRs are
|
|
||||||
# actually due to those PRs, not due to a package being updated.
|
|
||||||
!/pubspec.lock
|
|
||||||
|
|
||||||
# IntelliJ related
|
# IntelliJ related
|
||||||
*.iml
|
*.iml
|
||||||
@@ -25,142 +18,28 @@ lib/l10n/app_localizations*
|
|||||||
*.iws
|
*.iws
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# Visual Studio Code related
|
# The .vscode folder contains launch configuration and tasks you configure in
|
||||||
.classpath
|
# VS Code which you may wish to be included in version control, so this line
|
||||||
.project
|
# is commented out by default.
|
||||||
.settings/
|
#.vscode/
|
||||||
.vscode/*
|
|
||||||
.ccls-cache
|
|
||||||
|
|
||||||
# This file, on the master branch, should never exist or be checked-in.
|
|
||||||
#
|
|
||||||
# On a *final* release branch, that is, what will ship to stable or beta, the
|
|
||||||
# file can be force added (git add --force) and checked-in in order to effectively
|
|
||||||
# "pin" the engine artifact version so the flutter tool does not need to use git
|
|
||||||
# to determine the engine artifacts.
|
|
||||||
#
|
|
||||||
# See https://github.com/flutter/flutter/blob/main/docs/tool/Engine-artifacts.md.
|
|
||||||
/bin/internal/engine.version
|
|
||||||
|
|
||||||
# Flutter repo-specific
|
|
||||||
/bin/cache/
|
|
||||||
/bin/internal/bootstrap.bat
|
|
||||||
/bin/internal/bootstrap.sh
|
|
||||||
/bin/internal/engine.realm
|
|
||||||
/bin/mingit/
|
|
||||||
/dev/benchmarks/mega_gallery/
|
|
||||||
/dev/bots/.recipe_deps
|
|
||||||
/dev/bots/android_tools/
|
|
||||||
/dev/devicelab/ABresults*.json
|
|
||||||
/dev/docs/doc/
|
|
||||||
/dev/docs/api_docs.zip
|
|
||||||
/dev/docs/flutter.docs.zip
|
|
||||||
/dev/docs/lib/
|
|
||||||
/dev/docs/pubspec.yaml
|
|
||||||
/dev/integration_tests/**/xcuserdata
|
|
||||||
/dev/integration_tests/**/Pods
|
|
||||||
/packages/flutter/coverage/
|
|
||||||
version
|
|
||||||
analysis_benchmark.json
|
|
||||||
|
|
||||||
# packages file containing multi-root paths
|
|
||||||
.packages.generated
|
|
||||||
|
|
||||||
# Flutter/Dart/Pub related
|
# Flutter/Dart/Pub related
|
||||||
**/doc/api/
|
**/doc/api/
|
||||||
|
**/ios/Flutter/.last_build_id
|
||||||
.dart_tool/
|
.dart_tool/
|
||||||
.flutter-plugins-dependencies
|
.flutter-plugins-dependencies
|
||||||
**/generated_plugin_registrant.dart
|
|
||||||
.packages
|
|
||||||
.pub-preload-cache/
|
|
||||||
.pub-cache/
|
.pub-cache/
|
||||||
.pub/
|
.pub/
|
||||||
build/
|
/build/
|
||||||
flutter_*.png
|
/coverage/
|
||||||
linked_*.ds
|
|
||||||
unlinked.ds
|
|
||||||
unlinked_spec.ds
|
|
||||||
|
|
||||||
# Android related
|
# Symbolication related
|
||||||
**/android/**/gradle-wrapper.jar
|
|
||||||
.gradle/
|
|
||||||
**/android/captures/
|
|
||||||
**/android/gradlew
|
|
||||||
**/android/gradlew.bat
|
|
||||||
**/android/**/GeneratedPluginRegistrant.java
|
|
||||||
**/android/key.properties
|
|
||||||
*.jks
|
|
||||||
local.properties
|
|
||||||
**/.cxx/
|
|
||||||
|
|
||||||
# iOS/XCode related
|
|
||||||
**/ios/**/*.mode1v3
|
|
||||||
**/ios/**/*.mode2v3
|
|
||||||
**/ios/**/*.moved-aside
|
|
||||||
**/ios/**/*.pbxuser
|
|
||||||
**/ios/**/*.perspectivev3
|
|
||||||
**/ios/**/*sync/
|
|
||||||
**/ios/**/.sconsign.dblite
|
|
||||||
**/ios/**/.tags*
|
|
||||||
**/ios/**/.vagrant/
|
|
||||||
**/ios/**/DerivedData/
|
|
||||||
**/ios/**/Icon?
|
|
||||||
**/ios/**/Pods/
|
|
||||||
**/ios/**/.symlinks/
|
|
||||||
**/ios/**/profile
|
|
||||||
**/ios/**/xcuserdata
|
|
||||||
**/ios/.generated/
|
|
||||||
**/ios/Flutter/.last_build_id
|
|
||||||
**/ios/Flutter/App.framework
|
|
||||||
**/ios/Flutter/Flutter.framework
|
|
||||||
**/ios/Flutter/Flutter.podspec
|
|
||||||
**/ios/Flutter/Generated.xcconfig
|
|
||||||
**/ios/Flutter/ephemeral
|
|
||||||
**/ios/Flutter/app.flx
|
|
||||||
**/ios/Flutter/app.zip
|
|
||||||
**/ios/Flutter/flutter_assets/
|
|
||||||
**/ios/Flutter/flutter_export_environment.sh
|
|
||||||
**/ios/ServiceDefinitions.json
|
|
||||||
**/ios/Runner/GeneratedPluginRegistrant.*
|
|
||||||
|
|
||||||
# macOS
|
|
||||||
**/Flutter/ephemeral/
|
|
||||||
**/Pods/
|
|
||||||
**/macos/Flutter/GeneratedPluginRegistrant.swift
|
|
||||||
**/macos/Flutter/ephemeral
|
|
||||||
**/xcuserdata/
|
|
||||||
|
|
||||||
# Windows
|
|
||||||
**/windows/flutter/ephemeral/
|
|
||||||
**/windows/flutter/generated_plugin_registrant.cc
|
|
||||||
**/windows/flutter/generated_plugin_registrant.h
|
|
||||||
**/windows/flutter/generated_plugins.cmake
|
|
||||||
|
|
||||||
# Linux
|
|
||||||
**/linux/flutter/ephemeral/
|
|
||||||
**/linux/flutter/generated_plugin_registrant.cc
|
|
||||||
**/linux/flutter/generated_plugin_registrant.h
|
|
||||||
**/linux/flutter/generated_plugins.cmake
|
|
||||||
|
|
||||||
# Coverage
|
|
||||||
coverage/
|
|
||||||
|
|
||||||
# Symbols
|
|
||||||
app.*.symbols
|
app.*.symbols
|
||||||
|
|
||||||
# Exceptions to above rules.
|
# Obfuscation related
|
||||||
!**/ios/**/default.mode1v3
|
app.*.map.json
|
||||||
!**/ios/**/default.mode2v3
|
|
||||||
!**/ios/**/default.pbxuser
|
|
||||||
!**/ios/**/default.perspectivev3
|
|
||||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
|
||||||
!/dev/ci/**/Gemfile.lock
|
|
||||||
!.vscode/settings.json
|
|
||||||
|
|
||||||
# Monorepo
|
# Android Studio will place build artifacts here
|
||||||
.cipd
|
/android/app/debug
|
||||||
.gclient
|
/android/app/profile
|
||||||
.gclient_entries
|
/android/app/release
|
||||||
.python-version
|
|
||||||
.gclient_previous_custom_vars
|
|
||||||
.gclient_previous_sync_commits
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
|
|
||||||
<application
|
<application
|
||||||
android:label="maps_bookmarks"
|
android:label="maps_bookmarks"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
const String appName = 'Maps Bookmarks';
|
|
||||||
const String jsonFileName = 'MapsBookmarksData.json';
|
|
||||||
const String defaultAndroidExportDirectory = '/storage/emulated/0/Documents';
|
|
||||||
@@ -23,21 +23,5 @@
|
|||||||
"collectionName": "Name der Sammlung",
|
"collectionName": "Name der Sammlung",
|
||||||
"bookmarkTitle": "Titel des Lesezeichens",
|
"bookmarkTitle": "Titel des Lesezeichens",
|
||||||
"url": "Url",
|
"url": "Url",
|
||||||
"description": "Beschreibung",
|
"description": "Beschreibung"
|
||||||
"settings": "Einstellungen",
|
|
||||||
"appData": "App-Daten",
|
|
||||||
"export": "Exportieren",
|
|
||||||
"import": "Importieren",
|
|
||||||
"activateJsonExport": "Immer als JSON speichern",
|
|
||||||
|
|
||||||
"@@comment": "Info",
|
|
||||||
"exportSuccess": "Daten exportiert",
|
|
||||||
"importSuccess": "Daten importiert",
|
|
||||||
|
|
||||||
"@@comment": "Errors",
|
|
||||||
"errorStoragePermisson": "Zugriff auf Speicher verwehrt",
|
|
||||||
"errorCouldNotLaunchUrl": "Konnte Url nicht öffnen",
|
|
||||||
"errorInvalidUrl": "Fehlerhafte Url",
|
|
||||||
"exportFailed": "Export fehlgeschlagen",
|
|
||||||
"importFailed": "Import fehlgeschlagen"
|
|
||||||
}
|
}
|
||||||
@@ -23,22 +23,5 @@
|
|||||||
"collectionName": "Collection Name",
|
"collectionName": "Collection Name",
|
||||||
"bookmarkTitle": "Bookmark Title",
|
"bookmarkTitle": "Bookmark Title",
|
||||||
"url": "Url",
|
"url": "Url",
|
||||||
"description": "Description",
|
"description": "Description"
|
||||||
"settings": "Settings",
|
|
||||||
"appData": "App data",
|
|
||||||
"export": "Export",
|
|
||||||
"import": "Import",
|
|
||||||
"activateJsonExport": "Always save to JSON",
|
|
||||||
|
|
||||||
|
|
||||||
"@@comment": "Info",
|
|
||||||
"exportSuccess": "Exported data",
|
|
||||||
"importSuccess": "Imported data",
|
|
||||||
|
|
||||||
"@@comment": "Errors",
|
|
||||||
"errorStoragePermisson": "Storage permissions denied",
|
|
||||||
"errorCouldNotLaunchUrl": "Could not launch Url",
|
|
||||||
"errorInvalidUrl": "Invalid Url",
|
|
||||||
"exportFailed": "Export failed",
|
|
||||||
"importFailed": "Import failed"
|
|
||||||
}
|
}
|
||||||
236
lib/l10n/app_localizations.dart
Normal file
236
lib/l10n/app_localizations.dart
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
|
import 'package:intl/intl.dart' as intl;
|
||||||
|
|
||||||
|
import 'app_localizations_de.dart';
|
||||||
|
import 'app_localizations_en.dart';
|
||||||
|
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
|
||||||
|
/// Callers can lookup localized strings with an instance of AppLocalizations
|
||||||
|
/// returned by `AppLocalizations.of(context)`.
|
||||||
|
///
|
||||||
|
/// Applications need to include `AppLocalizations.delegate()` in their app's
|
||||||
|
/// `localizationDelegates` list, and the locales they support in the app's
|
||||||
|
/// `supportedLocales` list. For example:
|
||||||
|
///
|
||||||
|
/// ```dart
|
||||||
|
/// import 'l10n/app_localizations.dart';
|
||||||
|
///
|
||||||
|
/// return MaterialApp(
|
||||||
|
/// localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||||
|
/// supportedLocales: AppLocalizations.supportedLocales,
|
||||||
|
/// home: MyApplicationHome(),
|
||||||
|
/// );
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// ## Update pubspec.yaml
|
||||||
|
///
|
||||||
|
/// Please make sure to update your pubspec.yaml to include the following
|
||||||
|
/// packages:
|
||||||
|
///
|
||||||
|
/// ```yaml
|
||||||
|
/// dependencies:
|
||||||
|
/// # Internationalization support.
|
||||||
|
/// flutter_localizations:
|
||||||
|
/// sdk: flutter
|
||||||
|
/// intl: any # Use the pinned version from flutter_localizations
|
||||||
|
///
|
||||||
|
/// # Rest of dependencies
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// ## iOS Applications
|
||||||
|
///
|
||||||
|
/// iOS applications define key application metadata, including supported
|
||||||
|
/// locales, in an Info.plist file that is built into the application bundle.
|
||||||
|
/// To configure the locales supported by your app, you’ll need to edit this
|
||||||
|
/// file.
|
||||||
|
///
|
||||||
|
/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
|
||||||
|
/// Then, in the Project Navigator, open the Info.plist file under the Runner
|
||||||
|
/// project’s Runner folder.
|
||||||
|
///
|
||||||
|
/// Next, select the Information Property List item, select Add Item from the
|
||||||
|
/// Editor menu, then select Localizations from the pop-up menu.
|
||||||
|
///
|
||||||
|
/// Select and expand the newly-created Localizations item then, for each
|
||||||
|
/// locale your application supports, add a new item and select the locale
|
||||||
|
/// you wish to add from the pop-up menu in the Value field. This list should
|
||||||
|
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
|
||||||
|
/// property.
|
||||||
|
abstract class AppLocalizations {
|
||||||
|
AppLocalizations(String locale)
|
||||||
|
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
|
||||||
|
|
||||||
|
final String localeName;
|
||||||
|
|
||||||
|
static AppLocalizations? of(BuildContext context) {
|
||||||
|
return Localizations.of<AppLocalizations>(context, AppLocalizations);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const LocalizationsDelegate<AppLocalizations> delegate =
|
||||||
|
_AppLocalizationsDelegate();
|
||||||
|
|
||||||
|
/// A list of this localizations delegate along with the default localizations
|
||||||
|
/// delegates.
|
||||||
|
///
|
||||||
|
/// Returns a list of localizations delegates containing this delegate along with
|
||||||
|
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
|
||||||
|
/// and GlobalWidgetsLocalizations.delegate.
|
||||||
|
///
|
||||||
|
/// Additional delegates can be added by appending to this list in
|
||||||
|
/// MaterialApp. This list does not have to be used at all if a custom list
|
||||||
|
/// of delegates is preferred or required.
|
||||||
|
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
|
||||||
|
<LocalizationsDelegate<dynamic>>[
|
||||||
|
delegate,
|
||||||
|
GlobalMaterialLocalizations.delegate,
|
||||||
|
GlobalCupertinoLocalizations.delegate,
|
||||||
|
GlobalWidgetsLocalizations.delegate,
|
||||||
|
];
|
||||||
|
|
||||||
|
/// A list of this localizations delegate's supported locales.
|
||||||
|
static const List<Locale> supportedLocales = <Locale>[
|
||||||
|
Locale('de'),
|
||||||
|
Locale('en'),
|
||||||
|
];
|
||||||
|
|
||||||
|
/// No description provided for @addToCollection.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Add to {collection_name}'**
|
||||||
|
String addToCollection(String collection_name);
|
||||||
|
|
||||||
|
/// No description provided for @cancel.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Cancel'**
|
||||||
|
String get cancel;
|
||||||
|
|
||||||
|
/// No description provided for @chooseCollection.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Choose Collection'**
|
||||||
|
String get chooseCollection;
|
||||||
|
|
||||||
|
/// No description provided for @collections.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Collections'**
|
||||||
|
String get collections;
|
||||||
|
|
||||||
|
/// No description provided for @tipCreateCollections.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Create your first Collection to get started!'**
|
||||||
|
String get tipCreateCollections;
|
||||||
|
|
||||||
|
/// No description provided for @search.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Search'**
|
||||||
|
String get search;
|
||||||
|
|
||||||
|
/// No description provided for @createBookmark.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Create Bookmark'**
|
||||||
|
String get createBookmark;
|
||||||
|
|
||||||
|
/// No description provided for @createCollection.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Create Collection'**
|
||||||
|
String get createCollection;
|
||||||
|
|
||||||
|
/// No description provided for @create.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Create'**
|
||||||
|
String get create;
|
||||||
|
|
||||||
|
/// No description provided for @delete.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Delete'**
|
||||||
|
String get delete;
|
||||||
|
|
||||||
|
/// No description provided for @add.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Add'**
|
||||||
|
String get add;
|
||||||
|
|
||||||
|
/// No description provided for @startSearching.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Start searching'**
|
||||||
|
String get startSearching;
|
||||||
|
|
||||||
|
/// No description provided for @tipNoResults.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'There are no results that match your search'**
|
||||||
|
String get tipNoResults;
|
||||||
|
|
||||||
|
/// No description provided for @collectionName.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Collection Name'**
|
||||||
|
String get collectionName;
|
||||||
|
|
||||||
|
/// No description provided for @bookmarkTitle.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Bookmark Title'**
|
||||||
|
String get bookmarkTitle;
|
||||||
|
|
||||||
|
/// No description provided for @url.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Url'**
|
||||||
|
String get url;
|
||||||
|
|
||||||
|
/// No description provided for @description.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Description'**
|
||||||
|
String get description;
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AppLocalizationsDelegate
|
||||||
|
extends LocalizationsDelegate<AppLocalizations> {
|
||||||
|
const _AppLocalizationsDelegate();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<AppLocalizations> load(Locale locale) {
|
||||||
|
return SynchronousFuture<AppLocalizations>(lookupAppLocalizations(locale));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool isSupported(Locale locale) =>
|
||||||
|
<String>['de', 'en'].contains(locale.languageCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool shouldReload(_AppLocalizationsDelegate old) => false;
|
||||||
|
}
|
||||||
|
|
||||||
|
AppLocalizations lookupAppLocalizations(Locale locale) {
|
||||||
|
// Lookup logic when only language code is specified.
|
||||||
|
switch (locale.languageCode) {
|
||||||
|
case 'de':
|
||||||
|
return AppLocalizationsDe();
|
||||||
|
case 'en':
|
||||||
|
return AppLocalizationsEn();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw FlutterError(
|
||||||
|
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
|
||||||
|
'an issue with the localizations generation tool. Please file an issue '
|
||||||
|
'on GitHub with a reproducible sample app and the gen-l10n configuration '
|
||||||
|
'that was used.',
|
||||||
|
);
|
||||||
|
}
|
||||||
63
lib/l10n/app_localizations_de.dart
Normal file
63
lib/l10n/app_localizations_de.dart
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
// ignore: unused_import
|
||||||
|
import 'package:intl/intl.dart' as intl;
|
||||||
|
import 'app_localizations.dart';
|
||||||
|
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
|
||||||
|
/// The translations for German (`de`).
|
||||||
|
class AppLocalizationsDe extends AppLocalizations {
|
||||||
|
AppLocalizationsDe([String locale = 'de']) : super(locale);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String addToCollection(String collection_name) {
|
||||||
|
return 'Speichern in $collection_name';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get cancel => 'Abbrechen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get chooseCollection => 'Sammlung auswählen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get collections => 'Sammlungen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get tipCreateCollections => 'Erstelle deine erste Sammlung!';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get search => 'Suche';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createBookmark => 'Lesezeichen erstellen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createCollection => 'Sammlung erstellen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get create => 'Erstellen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get delete => 'Löschen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get add => 'Hinzufügen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get startSearching => 'Suche etwas';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get tipNoResults => 'Keine Suchergebnisse gefunden';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get collectionName => 'Name der Sammlung';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get bookmarkTitle => 'Titel des Lesezeichens';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get url => 'Url';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get description => 'Beschreibung';
|
||||||
|
}
|
||||||
64
lib/l10n/app_localizations_en.dart
Normal file
64
lib/l10n/app_localizations_en.dart
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
// ignore: unused_import
|
||||||
|
import 'package:intl/intl.dart' as intl;
|
||||||
|
import 'app_localizations.dart';
|
||||||
|
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
|
||||||
|
/// The translations for English (`en`).
|
||||||
|
class AppLocalizationsEn extends AppLocalizations {
|
||||||
|
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String addToCollection(String collection_name) {
|
||||||
|
return 'Add to $collection_name';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get cancel => 'Cancel';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get chooseCollection => 'Choose Collection';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get collections => 'Collections';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get tipCreateCollections =>
|
||||||
|
'Create your first Collection to get started!';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get search => 'Search';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createBookmark => 'Create Bookmark';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createCollection => 'Create Collection';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get create => 'Create';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get delete => 'Delete';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get add => 'Add';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get startSearching => 'Start searching';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get tipNoResults => 'There are no results that match your search';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get collectionName => 'Collection Name';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get bookmarkTitle => 'Bookmark Title';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get url => 'Url';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get description => 'Description';
|
||||||
|
}
|
||||||
@@ -5,7 +5,6 @@ import 'l10n/app_localizations.dart';
|
|||||||
import 'pages/collection_page.dart';
|
import 'pages/collection_page.dart';
|
||||||
import 'pages/collections_list_page.dart';
|
import 'pages/collections_list_page.dart';
|
||||||
import 'pages/search_page.dart';
|
import 'pages/search_page.dart';
|
||||||
import 'pages/settings_page.dart';
|
|
||||||
import 'service/search_provider.dart';
|
import 'service/search_provider.dart';
|
||||||
import 'service/shared_link_provider.dart';
|
import 'service/shared_link_provider.dart';
|
||||||
import 'service/storage.dart';
|
import 'service/storage.dart';
|
||||||
@@ -84,7 +83,6 @@ class _MapsBookmarksState extends State<MapsBookmarks>
|
|||||||
CollectionsListPage.routeName: (context) => const CollectionsListPage(),
|
CollectionsListPage.routeName: (context) => const CollectionsListPage(),
|
||||||
CollectionPage.routeName: (context) => const CollectionPage(),
|
CollectionPage.routeName: (context) => const CollectionPage(),
|
||||||
SearchPage.routeName: (context) => const SearchPage(),
|
SearchPage.routeName: (context) => const SearchPage(),
|
||||||
SettingsPage.routeName: (context) => const SettingsPage(),
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import '../service/storage.dart';
|
|||||||
import '../widgets/create_bookmark_collection_dialog.dart';
|
import '../widgets/create_bookmark_collection_dialog.dart';
|
||||||
import 'collection_page.dart';
|
import 'collection_page.dart';
|
||||||
import 'search_page.dart' show SearchPage;
|
import 'search_page.dart' show SearchPage;
|
||||||
import 'settings_page.dart';
|
|
||||||
|
|
||||||
class CollectionsListPage extends StatefulWidget {
|
class CollectionsListPage extends StatefulWidget {
|
||||||
const CollectionsListPage({super.key});
|
const CollectionsListPage({super.key});
|
||||||
@@ -104,12 +103,7 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
|||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
Navigator.of(context).pushNamed(SearchPage.routeName),
|
Navigator.of(context).pushNamed(SearchPage.routeName),
|
||||||
icon: Icon(Icons.search_rounded),
|
icon: Icon(Icons.search),
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
onPressed: () =>
|
|
||||||
Navigator.of(context).pushNamed(SettingsPage.routeName),
|
|
||||||
icon: Icon(Icons.settings_rounded),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,121 +0,0 @@
|
|||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
|
||||||
|
|
||||||
import '../l10n/app_localizations.dart';
|
|
||||||
import '../service/notifying.dart';
|
|
||||||
import '../service/permission_service.dart';
|
|
||||||
import '../service/storage.dart';
|
|
||||||
|
|
||||||
class SettingsPage extends StatefulWidget {
|
|
||||||
static const routeName = '/settings';
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final titlePadding = Theme.of(context).listTileTheme.contentPadding!;
|
|
||||||
checkStoragePermission();
|
|
||||||
return Scaffold(
|
|
||||||
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: 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: () => onActivateJsonImportPressed(),
|
|
||||||
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: () => onActivateJsonExportPressed(),
|
|
||||||
trailing: Icon(Icons.arrow_forward_ios_rounded),
|
|
||||||
enabled: storagePermissionIsGranted,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void onActivateJsonExportPressed() async {
|
|
||||||
if (!await PermissionService.storagePermissionStatus.isGranted) return;
|
|
||||||
Storage.exportToJsonFile().then(showExportInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
void onActivateJsonImportPressed() async {
|
|
||||||
if (!await PermissionService.storagePermissionStatus.isGranted) return;
|
|
||||||
Storage.importFromJsonFile().then(showImportInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> checkStoragePermission() async {
|
|
||||||
PermissionService.storagePermissionStatus.then((value) {
|
|
||||||
storagePermissionIsGranted = value.isGranted;
|
|
||||||
if (context.mounted && value.isGranted != storagePermissionIsGranted) {
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
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 _directoryPath;
|
|
||||||
if (dir.isEmpty) return false;
|
|
||||||
|
|
||||||
final data = {
|
|
||||||
'collections': collections.map((c) => c.toJson()).toList(),
|
|
||||||
'bookmarks': bookmarks.map((b) => b.toJson()).toList(),
|
|
||||||
};
|
|
||||||
final json = jsonEncode(data).codeUnits;
|
|
||||||
final file = XFile.fromData(
|
|
||||||
Uint8List.fromList(json),
|
|
||||||
mimeType: 'application/json',
|
|
||||||
name: constants.jsonFileName,
|
|
||||||
);
|
|
||||||
|
|
||||||
file.saveTo('$dir/${constants.jsonFileName}');
|
|
||||||
} 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<String> get _directoryPath async {
|
|
||||||
if (Platform.isAndroid) {
|
|
||||||
return await getDirectoryPath(
|
|
||||||
initialDirectory: constants.defaultAndroidExportDirectory,
|
|
||||||
) ??
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
return await getDirectoryPath() ?? '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
|
// 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) return false;
|
if (!Platform.isAndroid) {
|
||||||
|
// 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
|
||||||
@@ -22,16 +28,36 @@ 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) return false;
|
if (!Platform.isAndroid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final intent = AndroidIntent(
|
final intent = AndroidIntent(
|
||||||
@@ -46,6 +72,7 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../l10n/app_localizations.dart';
|
|
||||||
import 'url_launcher.dart' show UrlLaunchErrorCode;
|
import 'url_launcher.dart' show UrlLaunchErrorCode;
|
||||||
|
|
||||||
class Notifying {
|
class Notifying {
|
||||||
@@ -12,7 +11,7 @@ class Notifying {
|
|||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
backgroundColor: isError ? Theme.of(context).colorScheme.error : null,
|
backgroundColor: Theme.of(context).colorScheme.error,
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -29,7 +28,7 @@ class Notifying {
|
|||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar(),
|
ScaffoldMessenger.of(context).hideCurrentSnackBar(),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.close_rounded,
|
Icons.close_rounded,
|
||||||
color: isError ? Theme.of(context).colorScheme.onError : null,
|
color: Theme.of(context).colorScheme.onError,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -47,18 +46,10 @@ class Notifying {
|
|||||||
if (errorCode == UrlLaunchErrorCode.none) {
|
if (errorCode == UrlLaunchErrorCode.none) {
|
||||||
return;
|
return;
|
||||||
} else if (errorCode == UrlLaunchErrorCode.couldNotLaunch) {
|
} else if (errorCode == UrlLaunchErrorCode.couldNotLaunch) {
|
||||||
errorText = AppLocalizations.of(context)!.errorCouldNotLaunchUrl;
|
errorText = 'Could not launch Url';
|
||||||
} else {
|
} else {
|
||||||
errorText = AppLocalizations.of(context)!.errorInvalidUrl;
|
errorText = 'Invalid Url';
|
||||||
}
|
}
|
||||||
showSnackbar(context, text: errorText, isError: true);
|
showSnackbar(context, text: errorText, isError: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showErrorSnackbar(BuildContext context, String message) {
|
|
||||||
showSnackbar(context, text: message, isError: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void showMessageSnackbar(BuildContext context, String message) {
|
|
||||||
showSnackbar(context, text: message, isError: false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
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();
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,6 @@ import 'package:shared_preferences/shared_preferences.dart';
|
|||||||
|
|
||||||
import '../model/bookmark.dart';
|
import '../model/bookmark.dart';
|
||||||
import '../model/collection.dart';
|
import '../model/collection.dart';
|
||||||
import 'json_file_service.dart';
|
|
||||||
|
|
||||||
class Storage {
|
class Storage {
|
||||||
static const String _bookmarksKey = 'bookmarks';
|
static const String _bookmarksKey = 'bookmarks';
|
||||||
@@ -164,20 +163,4 @@ class Storage {
|
|||||||
}
|
}
|
||||||
return _prefsWithCache!;
|
return _prefsWithCache!;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,5 @@ 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,8 +1,6 @@
|
|||||||
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,
|
||||||
@@ -17,10 +15,11 @@ 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(AppLocalizations.of(context)!.createBookmark)
|
Text('Create Bookmark')
|
||||||
else
|
else
|
||||||
Text(AppLocalizations.of(context)!.createCollection),
|
Text('Create Collection'),
|
||||||
|
|
||||||
if (onDeletePressed != null)
|
if (onDeletePressed != null)
|
||||||
TextButton(
|
TextButton(
|
||||||
@@ -29,7 +28,7 @@ class EditDialogTitle extends StatelessWidget {
|
|||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
AppLocalizations.of(context)!.delete,
|
'Delete',
|
||||||
style: TextStyle(color: Theme.of(context).colorScheme.error),
|
style: TextStyle(color: Theme.of(context).colorScheme.error),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
124
pubspec.lock
124
pubspec.lock
@@ -49,14 +49,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.19.1"
|
version: "1.19.1"
|
||||||
cross_file:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: cross_file
|
|
||||||
sha256: "701dcfc06da0882883a2657c445103380e53e647060ad8d9dfb710c100996608"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.3.5+1"
|
|
||||||
csslib:
|
csslib:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -97,70 +89,6 @@ 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
|
||||||
@@ -325,54 +253,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.0"
|
version: "2.3.0"
|
||||||
permission_handler:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: permission_handler
|
|
||||||
sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "12.0.1"
|
|
||||||
permission_handler_android:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_android
|
|
||||||
sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "13.0.1"
|
|
||||||
permission_handler_apple:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_apple
|
|
||||||
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "9.4.7"
|
|
||||||
permission_handler_html:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_html
|
|
||||||
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.3+5"
|
|
||||||
permission_handler_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_platform_interface
|
|
||||||
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.3.0"
|
|
||||||
permission_handler_windows:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_windows
|
|
||||||
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.2.1"
|
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -619,5 +499,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.10.0 <4.0.0"
|
dart: ">=3.9.2 <4.0.0"
|
||||||
flutter: ">=3.38.0"
|
flutter: ">=3.35.0"
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ dependencies:
|
|||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
intl: any
|
intl: any
|
||||||
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