All posts
Coffee & Code - Quote Keeper's Edit Quote UI Update
Enhancing Quote Keeper's edit quote UI with form validation and the ability to update quote text, isHidden, and isComplete flags.
Another significant task for Quote Keeper involves updating the UI for editing quotes. The goal is to create a dedicated page for editing a quote, complete with form validation in case the user exits while changes are still active. Now, it’s possible to update the book’s quote text, the isHidden flag, and the isComplete flag.
/// Method for updating quote.
Future updateQuote({required String quote}) async {
await _bookService.update(
id: _book.id!,
data: {
'quote': quote,
'hidden': _isHidden,
'complete': _isComplete,
},
);
_book BookModel(
id: _book.id!,
quote: quote,
title: _book.title,
author: _book.author,
imgPath: _book.imgPath,
hidden: _isHidden,
uid: _book.uid,
complete: _isComplete,
);
update();
}