- Fixed bug where switching room pages
(list,products,categories,about),
would result an unknown error,
due to setState being called on a widget that isn't mounted.
This was solved by surrounding the setState function,
with a condition to check if the widget is mounted
- Fixed bug where room members weren't recognized as admins
This was caused by a typedifference between the server and the app
(The server now returns booleans,
where as before a ==1 comparison was
needed)
- Fixed bug where successfully closing the admin/kick member dialog,
would crash the application.
This was caused by popping the same context twice.
We are now using two navigator (the outer and the inner one)
Similarily to categories and rooms,
the edit product screen is reused as a new-room screen,
which is especially easy, because the user is unable to select
the product id themselves.
NOTE: the dynamic value-unit input is still missing some "subunits"
The view product screen has links to the edit product page,
the view parent page (if available) and a not yet functional
view children screen.
NOTE: The parent product display should be restricted in width,
and the screen is missing value/unit information.
including the ability to
add item into the shopping cart and remove them.
The click events have been implemented,
however the routes do not exist yet.
NOTE: The shopping list item info sheet is still missing
the unit type and value
and some more advanced options, like deleting the item
NOTE: The click action is removed, if the user doesn't
have the required permission and the drag-handle is not shown.
BUG: Editing the list (in any way, other than reordering it),
wont reload the list - hopefully this will be addressed later,
by caching the categories (or removing them from the cache)
and auto-rebuilding on cache-change
Planned Flow (unimplemented):
- create new category on /edit-category page using bottom-right fab
- sort categories using the two-line hamburger-style menu on each item
- click on a category to modify/delete it
NOTE: maybe on a different screen or MBS?
Translations are provided in *.arb* format.
Some keys have descriptions
(indicated by leading @-symbol).
Descriptions should not be copied into the translation itself.
Currently only English is supported (app_en.arb),
but German is planned.
Apparently weblate merged .arb support at some time,
so it would be nice to enable community translations at some point.
NOTE: Some bugs have not been fixed, and the member screen needs fixing,
but before that can happen, localstore has to be replaced,
because it causes loops on android and linux.
It also seems like it might lead to memory leaks
Reasons for migration:
- buggy behaviour from old router
- GoRouter is a recommended flutter plugin
- ShellRoutes allow exposing Providers
to a limited scope of routes
- GoRoutes provides named routes,
and the navigator allows us to provide parameters directly.
Every page (after login) has access
to the User object via context.read/watch<User>().
This reduces localstore and asnyc operations,
as the screens do not have to load the user every time.
Additionally this prevents anyone from
using the without a user object.
The screen allows the user to change the default permission set,
that applies to every member (but not the owner nor the admins).
This screen is only accessible by the owner,
admins or members with the changeAdmin permission.
Added SingleChildScrollView to new-room, edit-room
and the about-room tab.
NOTE: Added a padding to the new and edit room pages,
to prevent widgets from touching the screen bottom
Data-fetch routine:
fetch room information from server
-> if unsuccessfull load room from disk
The room will automatically be closed,
if either of the following conditions apply:
- the user is offline and no data was found on disk
- the network request returned a server error
and rewrote the component's network requests.
showSimpleSnackbar, allows displaying a simple snackbar,
with text and one action button, that can be clicked.
doNetworkRequest is supposed to be a wrapper for the
already existing post* functions.
It aims to make network requests and error handling easier,
by containing all the try&catch blocks
and being able to show snackbars.