Assignment:
Displaying Products, Viewing Product Details, Adding to Cart, Removing from Cart, and Navigating between Screens
The objective of this assignment is to familiarize students with Flutter and provide hands-on practice in key concepts such as displaying products, viewing product details on separate screens, adding products to a cart, removing products from the cart, and navigating between screens.
-
Displaying Products on the Main Page:
- Design and implement the main page of a Flutter application.
- Create a list of products containing their names, images, and brief descriptions.
- Display all the products on the main page using appropriate Flutter widgets.
- Ensure the main page has an appealing and user-friendly interface.
-
Viewing Product Details on a Separate Screen:
- Implement functionality that allows users to view detailed information about a specific product.
- When a user taps on a product from the main page, navigate to a separate screen that displays the product's details.
- On the product details screen, show the product name, image, description, and any other relevant information.
- Utilize Flutter's navigation capabilities to enable seamless transitions between screens.
-
Adding Products to the Cart:
- Add an "Add to Cart" button on the product details screen.
- Implement functionality that adds the selected product to a cart when the "Add to Cart" button is pressed.
- Maintain a data structure, such as a list or a data model, to represent the items in the cart.
- Provide visual feedback to the user to indicate that the product has been successfully added to the cart.
-
Removing Products from the Cart:
- Design and implement a cart screen that displays the products added to the cart.
- Show the product name, image, and any other relevant information for each item in the cart.
- Add a delete icon or button next to each product in the cart.
- Implement functionality that removes a product from the cart when the delete icon or button is pressed.
-
Navigating between the Main Page and the Cart:
- Implement navigation capabilities that allow users to switch between the main page and the cart screen.
- Include buttons, tabs, or any other suitable UI elements to enable seamless navigation.
- Flutter Project:
- Submit the complete Flutter project folder, including all necessary files such as the main.dart file and any additional screens or components you have created.
-
Flutter Implementation: (40%)
- Proper use of Flutter widgets for designing screens.
- Error-free implementation.
- Appropriate navigation between screens.
-
Displaying Products: (20%)
- Correct display of product names, images, and descriptions on the main page.
- Overall visual appeal and usability.
-
Viewing Product Details: (15%)
- Accurate display of detailed product information on a separate screen.
- Proper implementation of navigation to the product details screen.
-
Adding and Removing from the Cart: (15%)
- Correct implementation of adding products to the cart.
- Proper removal of products from the cart.
-
Navigation: (10%)
- Proper implementation of navigation between the main page and the cart screen.
Note: This assignment is to be completed individually. Plagiarism or collaboration with others will result in disciplinary action.