The Update Collection page should be reusable to allow its usage when creating a new collection or when updating an existing one.
This task involves creating the AppBar with the screen title and close button, the Details <-> MemosThemedTabBar and the bottom actionable button.
Important: This task doesn't implicate in creating both tabs - Details and Memos - content. Just the wrapper page
Business Rules
The page must adapts its AppBar title if the user is creating a new collection or updating an existing one. If the user is updating an existing collection, it must have this collection content.
The page must support async state by placing a centered CircularProgressIndicator.
When editing an existing collection, its id must be used to fetch the Collection from the database and its first 10 Memos. After the fetching is complete, the tabs Details and Memos are ready to be shown.
The bottom actionable button must update based on the selected tab and its content:
Details tab selected:
Next (blocked) - When the user hasn't finished writing the obligatory fields.
Next - When the user has finished all obligatory fields and hasn't created memos yet.
Save Collection - When the user has finished all obligatory fields and has at least one memo created in Memos tab.
Save Collection (blocked) - When the user hasn't finished all obligatory fields and has at least one memo created in Memos tab.
Memos tab selected:
Save Collection (blocked) - When the user hasn't finished writing the obligatory fields in Details tab OR it doesn't have any memo created in Memos.
Save Collection - When the user has finished all obligatory fields in Details tab and has at least one Memo created in Memos tab.
Page Screenshot
![CleanShot 2021-10-27 at 16 12 20](https://user-images.githubusercontent.com/11745745/139131471-5d303785-6218-4ad7-95df-99393e4fde2d.png)
Summary
The
Update Collection
page should be reusable to allow its usage when creating a new collection or when updating an existing one.This task involves creating the
AppBar
with the screen title and close button, the Details <-> MemosThemedTabBar
and the bottom actionable button.Important: This task doesn't implicate in creating both tabs - Details and Memos - content. Just the wrapper page
Business Rules
AppBar
title if the user is creating a new collection or updating an existing one. If the user is updating an existing collection, it must have this collection content.async
state by placing a centeredCircularProgressIndicator
.Collection
from the database and its first 10Memos
. After the fetching is complete, the tabsDetails
andMemos
are ready to be shown.The bottom actionable button must update based on the selected tab and its content:
Details
tab selected:Memos
tab.Memos
tab.Memos
tab selected:Details
tab OR it doesn't have any memo created inMemos
.Details
tab and has at least one Memo created inMemos
tab.Page Screenshot
![CleanShot 2021-10-27 at 16 12 20](https://user-images.githubusercontent.com/11745745/139131471-5d303785-6218-4ad7-95df-99393e4fde2d.png)A subtask of https://github.com/olmps/memo/issues/214