-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See docs/release_notes/v0.1.2a release notes.md for changes
- Loading branch information
1 parent
84edf15
commit 7a0665a
Showing
95 changed files
with
3,092 additions
and
1,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,126 @@ | ||
# Bayya | ||
|
||
An e-commerce flutter application. | ||
The application features: | ||
|
||
## Features | ||
* Shopping Cart & Watchlist tracking | ||
* User Login and registration support | ||
* Reviewing the products | ||
* Different views | ||
* Dynamic search mechanism | ||
|
||
## Challenges | ||
* Build list views on demand - less memory | ||
Using ```ListView.builder()``` instead of ```ListView()``` default constructor | ||
Example: | ||
More-memory consuming code | ||
|
||
```dart | ||
Widget _listOfProducts() { | ||
return ListView( | ||
padding: EdgeInsets.symmetric(vertical: 8.0), | ||
children: //Check if the list is empty | ||
Provider.of<ShoppingCart>(context).shoppingItemQuantites.isNotEmpty | ||
? Provider.of<ShoppingCart>(context) | ||
.shoppingItemQuantites | ||
.keys | ||
.map((e) { | ||
return ShoppingCartItem(productId: e); | ||
}).toList() | ||
: []); | ||
} | ||
``` | ||
|
||
Less-memory consuming code | ||
|
||
```dart | ||
Widget _listOfProducts() { | ||
return ListView.builder( | ||
padding: EdgeInsets.symmetric(vertical: 8.0), | ||
// Get items count using Provider | ||
itemCount: Provider.of<ShoppingCart>(context) | ||
.shoppingItemQuantites | ||
.keys | ||
.length, | ||
itemBuilder: (context, index) { | ||
return ShoppingCartItem( | ||
productId: Provider.of<ShoppingCart>(context) | ||
.shoppingItemQuantites | ||
.keys | ||
.elementAt(index)); | ||
}); | ||
} | ||
``` | ||
|
||
* Future code organization | ||
Using ```FutureBuilder``` instead of setting the state manually | ||
Example: | ||
Manual state management | ||
|
||
```dart | ||
String _vendor = 'Vendor not provided'; | ||
Widget _vendorCard() { | ||
_getVendorName(); | ||
return Container( | ||
padding: const EdgeInsets.all(4), | ||
margin: const EdgeInsets.only(bottom: 2), | ||
color: Colors.white, | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Row( | ||
children: [Text('Vendor:')], | ||
), | ||
Row( | ||
children: [Text(_vendor)], | ||
) | ||
], | ||
), | ||
); | ||
} | ||
Future<void> _getVendorName() async { | ||
var _result = await Provider.of<VendorsList>(context).getVendorNameByUid( | ||
Provider.of<Catalog>(context).productsCatalog[widget.productId].vendor); | ||
_vendor = _result; | ||
} | ||
``` | ||
|
||
Future state managemet | ||
```dart | ||
Widget _vendorText() { | ||
return FutureBuilder( | ||
future: Provider.of<VendorsList>(context).getVendorNameByUid( | ||
Provider.of<Catalog>(context) | ||
.productsCatalog[widget.productId] | ||
.vendor), | ||
builder: (context, snapshot) { | ||
if (snapshot.hasData) { | ||
return Text(snapshot.data, | ||
style: TextStyle(fontWeight: FontWeight.bold)); | ||
} else { | ||
return Text("Vendor isn't provieded"); | ||
} | ||
}); | ||
} | ||
``` | ||
|
||
## Demo & Images | ||
### Video Demo | ||
[![Demo](https://img.youtube.com/vi/mIx5fLc2f2E/0.jpg)](https://www.youtube.com/watch?v=mIx5fLc2f2E) | ||
|
||
### Main screen | ||
![List view](docs\homepage_screenshot_listview.jpg) | ||
![Grid view](docs\homepage_screenshot_gridview.jpg) | ||
|
||
### Sidebar | ||
![Sidebar](docs\application_sidebar.jpg) | ||
|
||
### Product page | ||
![Product main screen](docs\product_screenshot.jpg) | ||
![Added to cart](docs\product_added_to_shopping_cart.jpg) | ||
![Watchlist](docs\product_watchlisted.jpg) | ||
![Reviews](docs\product_reviews.jpg) | ||
|
||
## Demo | ||
[![Demo](https://img.youtube.com/vi/mIx5fLc2f2E/0.jpg)](https://www.youtube.com/watch?v=mIx5fLc2f2E) | ||
### Search page | ||
![Search](docs\search_page.jpg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
android/app/src/main/kotlin/com/mohammadkamal/bayya/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.mohammadkamal.bayya | ||
|
||
import io.flutter.embedding.android.FlutterActivity | ||
|
||
class MainActivity: FlutterActivity() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Bayya 0.1.2 release notes | ||
|
||
## Fixes | ||
* Added internet permission for android | ||
* Replaced manual getters for async functions with FutureBuilders | ||
* Replaced ListViews with ListViewBuilders to decrease memory consuming | ||
* Fixed decrement button on shopping cart items | ||
* Enabled action buttons (search, submit... etc) on keyboard inputs | ||
|
||
## Features | ||
* Designed a new UI | ||
* Applied Tween animation to navigations | ||
* Added number of products indicator floating over shopping cart icon | ||
* Added grid items for product lists | ||
* Added refresh functionality to shopping list | ||
* Added product reviews | ||
|
||
## Issues | ||
* Review on a product might not appear after adding it | ||
|
||
## Others | ||
* Removed local pictures of products | ||
* Updated dependencies | ||
* Updated gradle to 6.7 | ||
* Abstracted image and vendor widget at product views and list items | ||
* Deleted adding and editing products for vendors | ||
* Added future support for windows desktop application |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.