Compare commits
3 Commits
bc20593661
...
v0.1.25
| Author | SHA1 | Date | |
|---|---|---|---|
| dca8c64555 | |||
| 1aaea5f6d9 | |||
| 3a54a077f3 |
@@ -23,7 +23,5 @@
|
||||
"collectionName": "Name der Sammlung",
|
||||
"bookmarkTitle": "Titel des Lesezeichens",
|
||||
"url": "Url",
|
||||
"description": "Beschreibung",
|
||||
"settings": "Einstellungen",
|
||||
"activateJsonExport": "Json-Export aktivieren"
|
||||
"description": "Beschreibung"
|
||||
}
|
||||
@@ -23,7 +23,5 @@
|
||||
"collectionName": "Collection Name",
|
||||
"bookmarkTitle": "Bookmark Title",
|
||||
"url": "Url",
|
||||
"description": "Description",
|
||||
"settings": "Settings",
|
||||
"activateJsonExport": "Activate json export"
|
||||
"description": "Description"
|
||||
}
|
||||
@@ -199,18 +199,6 @@ abstract class AppLocalizations {
|
||||
/// In en, this message translates to:
|
||||
/// **'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
|
||||
|
||||
@@ -60,10 +60,4 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get description => 'Beschreibung';
|
||||
|
||||
@override
|
||||
String get settings => 'Einstellungen';
|
||||
|
||||
@override
|
||||
String get activateJsonExport => 'Json-Export aktivieren';
|
||||
}
|
||||
|
||||
@@ -61,10 +61,4 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get description => 'Description';
|
||||
|
||||
@override
|
||||
String get settings => 'Settings';
|
||||
|
||||
@override
|
||||
String get activateJsonExport => 'Activate json export';
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'l10n/app_localizations.dart';
|
||||
import 'pages/collection_page.dart';
|
||||
import 'pages/collections_list_page.dart';
|
||||
import 'pages/search_page.dart';
|
||||
import 'pages/settings_page.dart';
|
||||
import 'service/search_provider.dart';
|
||||
import 'service/shared_link_provider.dart';
|
||||
import 'service/storage.dart';
|
||||
@@ -84,7 +83,6 @@ class _MapsBookmarksState extends State<MapsBookmarks>
|
||||
CollectionsListPage.routeName: (context) => const CollectionsListPage(),
|
||||
CollectionPage.routeName: (context) => const CollectionPage(),
|
||||
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 'collection_page.dart';
|
||||
import 'search_page.dart' show SearchPage;
|
||||
import 'settings_page.dart';
|
||||
|
||||
class CollectionsListPage extends StatefulWidget {
|
||||
const CollectionsListPage({super.key});
|
||||
@@ -22,7 +21,7 @@ class CollectionsListPage extends StatefulWidget {
|
||||
|
||||
class _CollectionsListPageState extends State<CollectionsListPage> {
|
||||
bool addingNewBookmark = false;
|
||||
var bookmarkCountMap = <int, int>{};
|
||||
final bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
||||
|
||||
Widget bottomSheetBuilder(BuildContext context) {
|
||||
final titleTextFieldController = TextEditingController(
|
||||
@@ -85,9 +84,8 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final collections = Storage.loadCollections();
|
||||
bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
||||
addingNewBookmark =
|
||||
context.watch<SharedLinkProvider>().currentMapsLinkMetadata != null;
|
||||
final provider = context.watch<SharedLinkProvider>();
|
||||
addingNewBookmark = provider.currentMapsLinkMetadata != null;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: addingNewBookmark
|
||||
@@ -96,21 +94,15 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
||||
actions: [
|
||||
if (addingNewBookmark)
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
context.read<SharedLinkProvider>().removeCurrentMapsLink(),
|
||||
onPressed: () => provider.removeCurrentMapsLink(),
|
||||
child: Text(AppLocalizations.of(context)!.cancel),
|
||||
)
|
||||
else
|
||||
IconButton(
|
||||
onPressed: () =>
|
||||
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),
|
||||
),
|
||||
],
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
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,31 +8,13 @@ class Notifying {
|
||||
required String text,
|
||||
bool isError = false,
|
||||
}) {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
backgroundColor: Theme.of(context).colorScheme.error,
|
||||
content: SizedBox(
|
||||
height: 30,
|
||||
child: Row(
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
content: Text(
|
||||
text,
|
||||
style: isError
|
||||
? TextStyle(color: Theme.of(context).colorScheme.error)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user