Compare commits
6 Commits
v0.1.24
...
bc20593661
| Author | SHA1 | Date | |
|---|---|---|---|
| bc20593661 | |||
| 045f8b5b6b | |||
| 81f7b45619 | |||
| 3032e13dc9 | |||
| d0492b2f79 | |||
| c2506fab7a |
@@ -23,5 +23,7 @@
|
|||||||
"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",
|
||||||
|
"activateJsonExport": "Json-Export aktivieren"
|
||||||
}
|
}
|
||||||
@@ -23,5 +23,7 @@
|
|||||||
"collectionName": "Collection Name",
|
"collectionName": "Collection Name",
|
||||||
"bookmarkTitle": "Bookmark Title",
|
"bookmarkTitle": "Bookmark Title",
|
||||||
"url": "Url",
|
"url": "Url",
|
||||||
"description": "Description"
|
"description": "Description",
|
||||||
|
"settings": "Settings",
|
||||||
|
"activateJsonExport": "Activate json export"
|
||||||
}
|
}
|
||||||
@@ -199,6 +199,18 @@ abstract class AppLocalizations {
|
|||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Description'**
|
/// **'Description'**
|
||||||
String get description;
|
String get description;
|
||||||
|
|
||||||
|
/// No description provided for @settings.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Settings'**
|
||||||
|
String get settings;
|
||||||
|
|
||||||
|
/// No description provided for @activateJsonExport.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Activate json export'**
|
||||||
|
String get activateJsonExport;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AppLocalizationsDelegate
|
class _AppLocalizationsDelegate
|
||||||
|
|||||||
@@ -60,4 +60,10 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String get description => 'Beschreibung';
|
String get description => 'Beschreibung';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get settings => 'Einstellungen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get activateJsonExport => 'Json-Export aktivieren';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,4 +61,10 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String get description => 'Description';
|
String get description => 'Description';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get settings => 'Settings';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get activateJsonExport => 'Activate json export';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ 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';
|
||||||
@@ -83,6 +84,7 @@ 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,6 +9,7 @@ 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});
|
||||||
@@ -21,7 +22,7 @@ class CollectionsListPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _CollectionsListPageState extends State<CollectionsListPage> {
|
class _CollectionsListPageState extends State<CollectionsListPage> {
|
||||||
bool addingNewBookmark = false;
|
bool addingNewBookmark = false;
|
||||||
final bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
var bookmarkCountMap = <int, int>{};
|
||||||
|
|
||||||
Widget bottomSheetBuilder(BuildContext context) {
|
Widget bottomSheetBuilder(BuildContext context) {
|
||||||
final titleTextFieldController = TextEditingController(
|
final titleTextFieldController = TextEditingController(
|
||||||
@@ -84,8 +85,9 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final collections = Storage.loadCollections();
|
final collections = Storage.loadCollections();
|
||||||
final provider = context.watch<SharedLinkProvider>();
|
bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
||||||
addingNewBookmark = provider.currentMapsLinkMetadata != null;
|
addingNewBookmark =
|
||||||
|
context.watch<SharedLinkProvider>().currentMapsLinkMetadata != null;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: addingNewBookmark
|
title: addingNewBookmark
|
||||||
@@ -94,15 +96,21 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
|||||||
actions: [
|
actions: [
|
||||||
if (addingNewBookmark)
|
if (addingNewBookmark)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => provider.removeCurrentMapsLink(),
|
onPressed: () =>
|
||||||
|
context.read<SharedLinkProvider>().removeCurrentMapsLink(),
|
||||||
child: Text(AppLocalizations.of(context)!.cancel),
|
child: Text(AppLocalizations.of(context)!.cancel),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
Navigator.of(context).pushNamed(SearchPage.routeName),
|
Navigator.of(context).pushNamed(SearchPage.routeName),
|
||||||
icon: Icon(Icons.search),
|
icon: Icon(Icons.search_rounded),
|
||||||
),
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () =>
|
||||||
|
Navigator.of(context).pushNamed(SettingsPage.routeName),
|
||||||
|
icon: Icon(Icons.settings_rounded),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
|||||||
15
lib/pages/settings_page.dart
Normal file
15
lib/pages/settings_page.dart
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../l10n/app_localizations.dart';
|
||||||
|
|
||||||
|
class SettingsPage extends StatelessWidget {
|
||||||
|
static const routeName = '/settings';
|
||||||
|
const SettingsPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(title: Text(AppLocalizations.of(context)!.settings)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,13 +8,31 @@ class Notifying {
|
|||||||
required String text,
|
required String text,
|
||||||
bool isError = false,
|
bool isError = false,
|
||||||
}) {
|
}) {
|
||||||
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
backgroundColor: Theme.of(context).colorScheme.error,
|
||||||
text,
|
content: SizedBox(
|
||||||
style: isError
|
height: 30,
|
||||||
? TextStyle(color: Theme.of(context).colorScheme.error)
|
child: Row(
|
||||||
: null,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
text,
|
||||||
|
style: isError
|
||||||
|
? TextStyle(color: Theme.of(context).colorScheme.onError)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () =>
|
||||||
|
ScaffoldMessenger.of(context).hideCurrentSnackBar(),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.close_rounded,
|
||||||
|
color: Theme.of(context).colorScheme.onError,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user