This project demonstrates a simplified shopping app interface using Flutter. The app features a main screen with multiple sections: displaying products, hot offers, and recently purchased products. The UI is responsive and utilizes widgets such as PageView, GridView, and ListView to showcase product items and hot offers. includes a SignUp page with form validation and navigation to a Shopping screen.
We enhanced the user experience by adding fade-out and fade-in animations between the SignUp page and the Shopping page.
We added localization support to the app using JSON files (en-US.json and ar-EG.json). This allows the app to display text in English or Arabic dynamically. A language switch button in the AppBar lets users toggle between languages without restarting the app.
-
AppBar: A title bar with the name "Shopping App."
-
Product Section:
- A heading "Our Products" followed by a
PageViewthat shows images of products.
- A heading "Our Products" followed by a
-
GridView: Displays products in two columns with an image, text, and an "Add to Cart" icon. Tapping the icon displays a Snackbar with a confirmation message.
-
Hot Offers:
- A heading "Hot Offers" followed by a
ListViewwith horizontal scrolling that lists 5 items. Each item displays an image and description.
- A heading "Hot Offers" followed by a
-
Responsive Design:
- The layout adjusts based on screen size using
MediaQuery.
- The layout adjusts based on screen size using
-
Sign Up Page:
- Full name validation (first letter must be capitalized)
- Email validation (must contain @)
- Password validation (at least 6 characters)
- Confirm password validation (must match the password)
- Success dialog and error snackbar messages
- Navigation to the Shopping screen after successful signup
-
ADD ANIMATIONS: Fade-Out Animation on SignUp Page:
- When the user clicks the "OK" button in the success dialog, the SignUp page fades out smoothly.
- This was achieved using the
flutter_animatepackage and anAnimationController.
Fade-In Animation on Shopping Page:
- After the SignUp page fades out, the Shopping page fades in with a smooth transition.
- This was implemented using
PageRouteBuilderand theflutter_animatepackage.
-
Localization Support: Localized Strings:
- All text in the app is loaded from JSON files based on the selected locale.
- Supported languages: English (
en-US) and Arabic (ar-EG).
Language Switch Button:
- Added an
IconButtonto theAppBarto toggle between English and Arabic.
Dynamic Updates:
- The app updates all text dynamically when the language is changed.