Closed vpranavkrishna closed 2 years ago
Looks like you are using an image file for cancel button. There's already a TertiaryButton
component. Use that instead
Few other things not related to open orders:
NewsDetail
to NewsDetailPage
, and the file to news_detail_page.dart
NewsDetail
is accepting these as params:
final String text;
final String imagePath;
final String headline;
final String dur;
Just pass a MarketEvent
object instead. It's the same thing
String dur
. I'm guessing it's supposed to mean duration. Anyway that field will be removed after above change, but give better names to variables from now.Navigator.push(NewsDetail(args))
everywhere. All individual pages must to be declared in route_generator.dart
. And navigate to them using Navigator.pushNamed
and pass in the route and required argsLooks like you are using an image file for cancel button. There's already a
TertiaryButton
component. Use that instead
Even if there wasn't a widget, you could just create one. Or just inline the required styles. It's not hard. Don't use images or svg files for simple things like buttons
Few other things not related to open orders:
- Rename
NewsDetail
toNewsDetailPage
, and the file tonews_detail_page.dart
NewsDetail
is accepting these as params:final String text; final String imagePath; final String headline; final String dur;
Just pass a
MarketEvent
object instead. It's the same thing- There's a field in NewsDetail widget called
String dur
. I'm guessing it's supposed to mean duration. Anyway that field will be removed after above change, but give better names to variables from now.- You are going from news page to news detail page by doing a manual
Navigator.push(NewsDetail(args))
everywhere. All individual pages must to be declared inroute_generator.dart
. And navigate to them usingNavigator.pushNamed
and pass in the route and required args
Better do these things in a separate pr, after open orders in done
Cancelling orders is working but it would be better if it cancelled order real-time. So, when user long presses an item, try emitting the state again to make it look real-time
Also, remove the tertiary.png since you are not using it currently.
openOrder implementation looks good, one more thing we need add is real-time updates in open orders page
GetMyOrderUpdates
server side rpc should be used for real-time updatescan be added with globalStreams similar to notfication stream.
with that you have to update/add open orders