10 Commits

Author SHA1 Message Date
06a76afc42 Merge pull request 'Theme changes' (#4) from development into main
All checks were successful
Flutter APK Build / Build Flutter APK (push) Successful in 6m46s
Reviewed-on: #4
2026-01-21 16:38:03 +01:00
3032e13dc9 Added dismiss button
Some checks failed
Flutter APK Build / Build Flutter APK (pull_request) Has been cancelled
2026-01-21 16:37:03 +01:00
d0492b2f79 changed snackbar styling 2026-01-21 16:31:43 +01:00
c2506fab7a refactored code so change in bookmark count is visible immediately 2026-01-21 16:30:30 +01:00
dca8c64555 Merge pull request 'small theme changes' (#3) from development into main
All checks were successful
Flutter APK Build / Build Flutter APK (push) Successful in 6m48s
Reviewed-on: #3
2026-01-21 15:05:11 +01:00
c80606b7d0 changed appearance of lists
All checks were successful
Flutter APK Build / Build Flutter APK (pull_request) Successful in 6m44s
2026-01-21 15:04:24 +01:00
be6020d6c5 added label text 2026-01-21 14:44:36 +01:00
5eb58d7cf2 Changed theme to globally enable rounded borders for textfields 2026-01-21 14:43:02 +01:00
1aaea5f6d9 Merge pull request '[fix] Added basic locatlization' (#2) from development into main
All checks were successful
Flutter APK Build / Calculate Version (push) Successful in 13s
Flutter APK Build / Build Flutter APK (push) Successful in 6m34s
Flutter APK Build / Create Release (push) Has been skipped
Reviewed-on: #2
2026-01-21 14:12:41 +01:00
3a54a077f3 Merge pull request '[fix] added bookmark count number to collections page' (#1) from development into main
All checks were successful
Flutter APK Build / Calculate Version (push) Successful in 15s
Flutter APK Build / Build Flutter APK (push) Successful in 6m37s
Flutter APK Build / Create Release (push) Has been skipped
Reviewed-on: #1
2026-01-21 13:20:49 +01:00
9 changed files with 90 additions and 47 deletions

View File

@@ -102,10 +102,16 @@ class _CollectionPageState extends State<CollectionPage> {
), ),
], ],
), ),
body: ListView.builder( body: Center(
itemBuilder: (context, index) => child: SizedBox(
bookmarksListItemBuilder(context, bookmarks.elementAt(index)), width: MediaQuery.of(context).size.width * 0.9,
itemCount: bookmarks.length, child: ListView.separated(
itemBuilder: (context, index) =>
bookmarksListItemBuilder(context, bookmarks.elementAt(index)),
itemCount: bookmarks.length,
separatorBuilder: (context, index) => SizedBox(height: 10),
),
),
), ),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
onPressed: onAddButtonPressed, onPressed: onAddButtonPressed,

View File

@@ -21,7 +21,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 +84,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,7 +95,8 @@ 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
@@ -110,12 +112,18 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
child: Icon(Icons.add), child: Icon(Icons.add),
), ),
body: collections.isNotEmpty body: collections.isNotEmpty
? ListView.builder( ? Center(
itemBuilder: (context, index) => collectionsListItemBuilder( child: SizedBox(
context, width: MediaQuery.of(context).size.width * 0.9,
collections.elementAt(index), child: ListView.separated(
itemBuilder: (context, index) => collectionsListItemBuilder(
context,
collections.elementAt(index),
),
itemCount: collections.length,
separatorBuilder: (context, index) => SizedBox(height: 10),
),
), ),
itemCount: collections.length,
) )
: Center( : Center(
child: Text(AppLocalizations.of(context)!.tipCreateCollections), child: Text(AppLocalizations.of(context)!.tipCreateCollections),

View File

@@ -14,14 +14,21 @@ class SearchPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar(title: Text(AppLocalizations.of(context)!.search)), appBar: AppBar(title: Text(AppLocalizations.of(context)!.search)),
body: Column( body: Center(
children: [ child: SizedBox(
SearchBarWidget( width: MediaQuery.of(context).size.width * 0.9,
onEditingComplete: context.read<SearchProvider>().setSearchText, child: Column(
onResetSearch: context.read<SearchProvider>().removeSearchText, children: [
Padding(padding: EdgeInsetsGeometry.only(top: 10)),
SearchBarWidget(
onEditingComplete: context.read<SearchProvider>().setSearchText,
onResetSearch: context.read<SearchProvider>().removeSearchText,
),
Padding(padding: EdgeInsetsGeometry.only(top: 10)),
Expanded(child: SearchResultsWidget()),
],
), ),
Expanded(child: SearchResultsWidget()), ),
],
), ),
); );
} }

View File

@@ -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,
),
),
],
),
), ),
), ),
); );

View File

@@ -1,15 +1,26 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
ThemeData get lightTheme => ThemeData.from(colorScheme: _lightColorScheme); const _seed = Colors.deepPurple;
ThemeData get darkTheme => ThemeData.from(colorScheme: _darkColorScheme); ColorScheme get _lightColorScheme =>
ColorScheme.fromSeed(seedColor: _seed, brightness: Brightness.light);
ColorScheme get _darkColorScheme => ColorScheme.fromSeed( ColorScheme get _darkColorScheme =>
seedColor: Colors.deepPurple, ColorScheme.fromSeed(seedColor: _seed, brightness: Brightness.dark);
brightness: Brightness.dark,
);
ColorScheme get _lightColorScheme => ColorScheme.fromSeed( ThemeData get lightTheme => _baseTheme(_lightColorScheme);
seedColor: Colors.deepPurple,
brightness: Brightness.light, ThemeData get darkTheme => _baseTheme(_darkColorScheme);
);
ThemeData _baseTheme(ColorScheme scheme) =>
ThemeData.from(colorScheme: scheme, useMaterial3: true).copyWith(
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
),
listTileTheme: ListTileThemeData(
tileColor: scheme.surfaceContainer,
shape: RoundedRectangleBorder(
borderRadius: BorderRadiusGeometry.circular(12),
),
),
);

View File

@@ -41,9 +41,7 @@ class CreateBookmarkCollectionDialog extends StatelessWidget {
FilteringTextInputFormatter.deny(RegExp(r'\s\s+')), FilteringTextInputFormatter.deny(RegExp(r'\s\s+')),
], ],
decoration: InputDecoration( decoration: InputDecoration(
// TODO: Localize
labelText: AppLocalizations.of(context)!.collectionName, labelText: AppLocalizations.of(context)!.collectionName,
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
), ),
), ),
actions: [ actions: [

View File

@@ -61,9 +61,6 @@ class CreateBookmarkDialog extends StatelessWidget {
], ],
decoration: InputDecoration( decoration: InputDecoration(
labelText: AppLocalizations.of(context)!.bookmarkTitle, labelText: AppLocalizations.of(context)!.bookmarkTitle,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
), ),
), ),
TextField( TextField(
@@ -78,9 +75,6 @@ class CreateBookmarkDialog extends StatelessWidget {
], ],
decoration: InputDecoration( decoration: InputDecoration(
labelText: AppLocalizations.of(context)!.url, labelText: AppLocalizations.of(context)!.url,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
), ),
), ),
TextField( TextField(
@@ -95,9 +89,6 @@ class CreateBookmarkDialog extends StatelessWidget {
], ],
decoration: InputDecoration( decoration: InputDecoration(
labelText: AppLocalizations.of(context)!.description, labelText: AppLocalizations.of(context)!.description,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
), ),
), ),
], ],

View File

@@ -1,5 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../l10n/app_localizations.dart';
class SearchBarWidget extends StatelessWidget { class SearchBarWidget extends StatelessWidget {
const SearchBarWidget({ const SearchBarWidget({
super.key, super.key,
@@ -28,6 +30,7 @@ class SearchBarWidget extends StatelessWidget {
}, },
icon: Icon(Icons.delete_outline_outlined), icon: Icon(Icons.delete_outline_outlined),
), ),
labelText: AppLocalizations.of(context)!.search,
), ),
); );
} }

View File

@@ -47,9 +47,10 @@ class _SearchResultsWidgetState extends State<SearchResultsWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (filteredBookmarks.isNotEmpty) { if (filteredBookmarks.isNotEmpty) {
return ListView.builder( return ListView.separated(
itemBuilder: bookmarkListItemBuilder, itemBuilder: bookmarkListItemBuilder,
itemCount: filteredBookmarks.length, itemCount: filteredBookmarks.length,
separatorBuilder: (context, index) => SizedBox(height: 10),
); );
} }
return Center(child: Text(AppLocalizations.of(context)!.tipNoResults)); return Center(child: Text(AppLocalizations.of(context)!.tipNoResults));