Compare commits
3 Commits
3032e13dc9
...
v0.1.24
| Author | SHA1 | Date | |
|---|---|---|---|
| dca8c64555 | |||
| 1aaea5f6d9 | |||
| 3a54a077f3 |
@@ -21,7 +21,7 @@ class CollectionsListPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _CollectionsListPageState extends State<CollectionsListPage> {
|
class _CollectionsListPageState extends State<CollectionsListPage> {
|
||||||
bool addingNewBookmark = false;
|
bool addingNewBookmark = false;
|
||||||
var bookmarkCountMap = <int, int>{};
|
final bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
||||||
|
|
||||||
Widget bottomSheetBuilder(BuildContext context) {
|
Widget bottomSheetBuilder(BuildContext context) {
|
||||||
final titleTextFieldController = TextEditingController(
|
final titleTextFieldController = TextEditingController(
|
||||||
@@ -84,9 +84,8 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final collections = Storage.loadCollections();
|
final collections = Storage.loadCollections();
|
||||||
bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
final provider = context.watch<SharedLinkProvider>();
|
||||||
addingNewBookmark =
|
addingNewBookmark = provider.currentMapsLinkMetadata != null;
|
||||||
context.watch<SharedLinkProvider>().currentMapsLinkMetadata != null;
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: addingNewBookmark
|
title: addingNewBookmark
|
||||||
@@ -95,8 +94,7 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
|||||||
actions: [
|
actions: [
|
||||||
if (addingNewBookmark)
|
if (addingNewBookmark)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () =>
|
onPressed: () => provider.removeCurrentMapsLink(),
|
||||||
context.read<SharedLinkProvider>().removeCurrentMapsLink(),
|
|
||||||
child: Text(AppLocalizations.of(context)!.cancel),
|
child: Text(AppLocalizations.of(context)!.cancel),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,31 +8,13 @@ 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(
|
||||||
backgroundColor: Theme.of(context).colorScheme.error,
|
content: Text(
|
||||||
content: SizedBox(
|
text,
|
||||||
height: 30,
|
style: isError
|
||||||
child: Row(
|
? TextStyle(color: Theme.of(context).colorScheme.error)
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
: null,
|
||||||
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