foivz / pop-app-flutter

Mobile application for the course Entrepreneurial venture.
2 stars 0 forks source link

Show SELL screen (Products and Packages) #8

Closed mislavmatijevic closed 1 year ago

mislavmatijevic commented 1 year ago

Application enables seller user to see a screen with products and packages. Products are what the seller offers, and packages are special offers which include multiple products with a discount on amount.

Acceptance Criteria

Condition Description
Given User is logged in as a seller and on menu page
When Seller selects SELL option in the menu
Then A screen with two tabs opens. One tab is PRODUCTS and the other is PACKAGES. Automatically, PRODUCTS tab is selected. In the bottom, there are two floating action buttons: an ADD button (plus icon, #9) and a SELL button (tick icon, #10).
If PRODUCTS tab is selected A list of products is shown in form of cards. Each card contains product's image, name and description. Each card is selectable. Image
If PACKAGES tab is selected A list of packages is shown in form of cards. Each card contains package's image, name and description. Each card is selectable. Image
When Seller selects a product or a package card by tapping on it once
Then Pressed card receives a tick in the top-right cornerImage
Then Product is passed on to the COMMIT SALES screen by pressing the SELL button.
mislavmatijevic commented 1 year ago

Heads up, @jfletcher20! Products do not seem to support UTF-8 for whatever reason! Proof: slika

Beware that it's not a server-side issue: slika

jfletcher20 commented 1 year ago

I've discovered the issue:

Causes bug Fixed
image Every API call wrapped in the _executeWIthToken method image Every API call wrapped in the _executeWIthToken method
image _executeWIthToken method image _executeWIthToken method

The issue was the body wasn't returning UTF-8 decoded data properly for some reason. To fix this, I had to add a utf8.decode call, but now all APIs that go through the _executeWithToken method have to return not the body of the response, but bodyBytes.