Skip to content
This repository was archived by the owner on Nov 22, 2023. It is now read-only.

Conversation

romanoprid
Copy link
Collaborator

Working in a team, we made the shopping app where you can order some furniture. Below you can see some screens from our app which was developed by each team member.

So, this is the home page, where you can see two lists with furniture. The first list shows us the name of the item and its price, below this list you can filter all the lists on the screen by some characteristics. The second list gives us more details about the item and the ability to add it to the cart. On this screen are some other icons, but they are not usable for now. This screen was developed by Roman Oprysk.

image

The next one is the item screen? which was developed by Nikita Vyzhol. This screen appears as soon as we click on the item which is on the home page. So here you can some info about the item, you can add it to the cart or return when clicking on the top-left icon.

image

And the last one which was developed by Max Levytskiy is the My Bag screen or another name cart. Here you can see your added items and you can delete them as well by clicking on the delete icon.

image

image

Copy link

@igor-leshkevych igor-leshkevych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi guys. Good job. Your UI is not ideal, but cart and filtering works, that's nice.

@maximlev0-9 has 10/10 for implementing global state
@romanoprid has 10/10 for doing a big chunk of work + local state + global state

@FlameNV: the only thing you've added is romanoprid/Lab4_Flutter@d8b8d40
there is no state usage there at all, so I can only give you 2/10 for this lab

@override
Widget build(BuildContext context) {
return Scaffold(body: Text("Item"));
return Consumer<CartModel>(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're using Consumer way too high in your widget hierarchy: your cart is only used by ElevatedButton + it only uses it for write, so you could just use provider.of. With your current approach, your entire page will be rebuild each time the cart is changed

const Padding(padding: EdgeInsets.only(top: 100)),
Column(
children: [
Image.asset(selectedCategory!.imgName + '.jpg'),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to store images with extensions, instead of using concatenation on the UI

fontWeight: FontWeight.bold, fontSize: 20),
),
Text(
selectedCategory!.price.toString() +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use string interpolation ("some $variable") instead of concatenation

padding: const EdgeInsets.all(20),
alignment: Alignment.centerRight,
width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.height-90,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't leave commented code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants