@@ -109,8 +109,8 @@ class TradeScreen extends StatelessWidget {
109
109
selectedIndex: 0 ,
110
110
keys: const [
111
111
tradeScreenTabsPositions,
112
- tradeScreenTabsTrades ,
113
- tradeScreenTabsOrders
112
+ tradeScreenTabsOrders ,
113
+ tradeScreenTabsTrades
114
114
],
115
115
tabBarViewChildren: [
116
116
ListView .builder (
@@ -192,13 +192,14 @@ class TradeScreen extends StatelessWidget {
192
192
);
193
193
},
194
194
),
195
- tradeChangeNotifier.trades.isEmpty
195
+ // If there are no orders we early-return with placeholder
196
+ orderChangeNotifier.orders.isEmpty
196
197
? RichText (
197
198
text: TextSpan (
198
199
style: DefaultTextStyle .of (context).style,
199
200
children: < TextSpan > [
200
201
const TextSpan (
201
- text: "You don't have any trades yet.\n\n " ,
202
+ text: "You don't have any orders yet.\n\n " ,
202
203
style: TextStyle (color: Colors .grey)),
203
204
TextSpan (
204
205
text: "Buy" ,
@@ -215,19 +216,18 @@ class TradeScreen extends StatelessWidget {
215
216
: SingleChildScrollView (
216
217
physics: const AlwaysScrollableScrollPhysics (),
217
218
child: Card (
218
- child: Column (
219
- children: tradeChangeNotifier.trades
220
- .map ((trade) => TradeListItem (trade: trade))
221
- .toList (),
222
- ))),
223
- // If there are no positions we early-return with placeholder
224
- orderChangeNotifier.orders.isEmpty
219
+ child: Column (
220
+ children: orderChangeNotifier.orders.values
221
+ .map ((e) => OrderListItem (order: e))
222
+ .toList ()),
223
+ )),
224
+ tradeChangeNotifier.trades.isEmpty
225
225
? RichText (
226
226
text: TextSpan (
227
227
style: DefaultTextStyle .of (context).style,
228
228
children: < TextSpan > [
229
229
const TextSpan (
230
- text: "You don't have any orders yet.\n\n " ,
230
+ text: "You don't have any trades yet.\n\n " ,
231
231
style: TextStyle (color: Colors .grey)),
232
232
TextSpan (
233
233
text: "Buy" ,
@@ -244,11 +244,11 @@ class TradeScreen extends StatelessWidget {
244
244
: SingleChildScrollView (
245
245
physics: const AlwaysScrollableScrollPhysics (),
246
246
child: Card (
247
- child: Column (
248
- children: orderChangeNotifier.orders.values
249
- .map ((e ) => OrderListItem (order : e ))
250
- .toList () ),
251
- ))
247
+ child: Column (
248
+ children: tradeChangeNotifier.trades
249
+ .map ((trade ) => TradeListItem (trade : trade ))
250
+ .toList (),
251
+ ))),
252
252
],
253
253
),
254
254
)
0 commit comments