Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 2d060db

Browse files
bors[bot]bonomat
andauthored
Merge #378
378: chore: rename services a bit r=luckysori a=bonomat - cfd --> trading - exchange --> combined in trading - betting --> removed - DCA --> added Services updated ![simulator_screenshot_FD250FCB-E0E1-4D05-8F49-7866DB93B629](https://user-images.githubusercontent.com/224613/203896858-a1c01eb6-0c7e-45d0-a1b0-07232f00fd43.png) Menu updated ![simulator_screenshot_B34EE2D7-D2FD-4463-BEC9-58D652CC89AE](https://user-images.githubusercontent.com/224613/203896872-42590e2d-e375-4d8d-a353-6157891ee4f0.png) `My CFD` --> `Positions` ![simulator_screenshot_CC3A6D43-BB77-4710-A1BF-4DCFDB415ADC](https://user-images.githubusercontent.com/224613/203896892-e490c671-7cd7-421e-a312-18adcbb0f6a5.png) ![simulator_screenshot_8C03E01E-E18A-4BC0-867C-E2B5671053F7](https://user-images.githubusercontent.com/224613/203896901-0c4f951c-550f-44a3-a2b3-728bd2dbca2a.png) Co-authored-by: Philipp Hoenisch <philipp@coblox.tech>
2 parents faf87db + 06936d9 commit 2d060db

File tree

9 files changed

+38
-75
lines changed

9 files changed

+38
-75
lines changed

lib/cfd_trading/cfd_order_confirmation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class _CfdOrderConfirmationState extends State<CfdOrderConfirmation> {
7272
final contractSymbol = order.contractSymbol.name.toUpperCase();
7373

7474
return Scaffold(
75-
appBar: AppBar(title: const Text('CFD Order Confirmation')),
75+
appBar: AppBar(title: const Text('Order Confirmation')),
7676
body: SafeArea(
7777
child: Container(
7878
padding: const EdgeInsets.all(20.0),

lib/cfd_trading/cfd_order_detail.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class _CfdOrderDetailState extends State<CfdOrderDetail> {
100100
}
101101

102102
return Scaffold(
103-
appBar: AppBar(title: const Text('CFD Order Details')),
103+
appBar: AppBar(title: const Text('Order Details')),
104104
body: SafeArea(
105105
child: Container(
106106
padding: const EdgeInsets.all(20.0),

lib/cfd_trading/cfd_trading.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'package:ten_ten_one/app_bar_with_balance.dart';
1111
import '../models/service_model.dart';
1212

1313
class CfdTrading extends StatefulWidget {
14-
static final route = Service.cfd.route;
14+
static final route = Service.trade.route;
1515

1616
const CfdTrading({Key? key}) : super(key: key);
1717

@@ -47,7 +47,7 @@ class _CfdTradingState extends State<CfdTrading> {
4747
),
4848
BottomNavigationBarItem(
4949
icon: Icon(Icons.format_list_bulleted_sharp),
50-
label: 'My CFDs',
50+
label: 'Positions',
5151
),
5252
BottomNavigationBarItem(
5353
icon: Icon(Icons.candlestick_chart_sharp),

lib/main.dart

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,21 +179,12 @@ class _TenTenOneState extends State<TenTenOneApp> {
179179
},
180180
),
181181
GoRoute(
182-
path: Service.exchange.route,
182+
path: Service.dca.route,
183183
builder: (BuildContext context, GoRouterState state) {
184184
return const ServicePlaceholder(
185-
service: Service.exchange,
185+
service: Service.dca,
186186
description:
187-
"Have you heard of Taro? We sure did - and yes, we are planning to build a non custodial exchange using Taro!");
188-
},
189-
),
190-
GoRoute(
191-
path: Service.sportsbet.route,
192-
builder: (BuildContext context, GoRouterState state) {
193-
return const ServicePlaceholder(
194-
service: Service.sportsbet,
195-
description:
196-
"Pick your favourite team and place a bet! Binary sports-bets are in the works - more complex bets to come - soon!");
187+
"When is the best time to buy Bitcoin? Now! DCA is a constant investment strategy to buy smaller amounts of Bitcoin over a period of time, no matter what price. DCA is coming soon!");
197188
},
198189
),
199190
],

lib/menu.dart

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,46 +41,25 @@ class Menu extends StatelessWidget {
4141
GoRouter.of(context).go("/");
4242
},
4343
),
44-
ExpansionTile(
45-
title: Text(ServiceGroup.trade.label),
46-
leading: Icon(ServiceGroup.trade.icon),
47-
initiallyExpanded: true,
48-
children: [
49-
ListTile(
50-
title: Text(Service.cfd.label),
51-
leading: Icon(Service.cfd.icon),
52-
onTap: () {
53-
GoRouter.of(context).go(Service.cfd.route);
54-
},
55-
),
56-
ListTile(
57-
title: Text(Service.exchange.label),
58-
leading: Icon(Service.exchange.icon),
59-
onTap: () {
60-
GoRouter.of(context).go(Service.exchange.route);
61-
},
62-
),
63-
],
44+
ListTile(
45+
title: Text(Service.trade.label),
46+
leading: Icon(Service.trade.icon),
47+
onTap: () {
48+
GoRouter.of(context).go(Service.trade.route);
49+
},
6450
),
6551
ExpansionTile(
66-
title: Text(ServiceGroup.bets.label),
67-
leading: Icon(ServiceGroup.bets.icon),
52+
title: Text(ServiceGroup.invest.label),
53+
leading: Icon(ServiceGroup.invest.icon),
6854
initiallyExpanded: true,
6955
children: [
7056
ListTile(
71-
title: Text(Service.sportsbet.label),
72-
leading: Icon(Service.sportsbet.icon),
57+
title: Text(Service.dca.label),
58+
leading: Icon(Service.dca.icon),
7359
onTap: () {
74-
GoRouter.of(context).go(Service.sportsbet.route);
60+
GoRouter.of(context).go(Service.dca.route);
7561
},
7662
),
77-
],
78-
),
79-
ExpansionTile(
80-
title: Text(ServiceGroup.invest.label),
81-
leading: Icon(ServiceGroup.invest.icon),
82-
initiallyExpanded: true,
83-
children: [
8463
ListTile(
8564
title: Text(Service.savings.label),
8665
leading: Icon(Service.savings.icon),

lib/models/service_model.dart

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,47 @@
11
import 'package:flutter/material.dart';
2+
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
23

3-
enum ServiceGroup { wallet, trade, bets, invest }
4+
enum ServiceGroup { wallet, trade, dca, invest }
45

56
extension ServiceGroupExtension on ServiceGroup {
67
static const labels = {
78
ServiceGroup.wallet: "Wallet",
89
ServiceGroup.trade: "Trading",
9-
ServiceGroup.bets: "Bets",
10+
ServiceGroup.dca: "DCA",
1011
ServiceGroup.invest: "Stacking"
1112
};
1213
static const icons = {
1314
ServiceGroup.wallet: Icons.wallet,
1415
ServiceGroup.trade: Icons.query_stats,
15-
ServiceGroup.bets: Icons.casino,
16+
ServiceGroup.dca: FontAwesomeIcons.moneyBill1,
1617
ServiceGroup.invest: Icons.table_rows
1718
};
1819

1920
String get label => labels[this]!;
2021
IconData get icon => icons[this]!;
2122
}
2223

23-
enum Service { cfd, sportsbet, exchange, savings }
24+
enum Service { trade, dca, savings }
2425

2526
extension ServiceExtension on Service {
2627
static const labels = {
27-
Service.cfd: "CFD Trading",
28-
Service.sportsbet: "Sports Bets",
29-
Service.exchange: "Taro Exchange",
28+
Service.trade: "Trading",
29+
Service.dca: "Dollar Cost Average",
3030
Service.savings: "Saving"
3131
};
3232
static const shortLabels = {
33-
Service.cfd: "CFDs",
34-
Service.sportsbet: "Bets",
35-
Service.exchange: "Exchange",
33+
Service.trade: "Trade",
34+
Service.dca: "DCA",
3635
Service.savings: "Savings"
3736
};
3837
static const icons = {
39-
Service.cfd: Icons.insights,
40-
Service.sportsbet: Icons.sports_football,
41-
Service.exchange: Icons.currency_exchange,
38+
Service.trade: Icons.insights,
39+
Service.dca: FontAwesomeIcons.moneyBill1,
4240
Service.savings: Icons.savings
4341
};
4442
static const routes = {
45-
Service.cfd: "/cfd-trading",
46-
Service.sportsbet: "/sports-bet",
47-
Service.exchange: "/exchange",
43+
Service.trade: "/trading",
44+
Service.dca: "/dca",
4845
Service.savings: "/savings"
4946
};
5047

lib/wallet/wallet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:ten_ten_one/wallet/wallet_dashboard.dart';
77
import 'package:ten_ten_one/wallet/wallet_lightning.dart';
88

99
class Wallet extends StatefulWidget {
10-
static const route = '/cfd-trading';
10+
static const route = '/trading';
1111

1212
const Wallet({Key? key}) : super(key: key);
1313

lib/wallet/wallet_dashboard.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,12 @@ class ServiceNavigation extends StatelessWidget {
116116
scrollDirection: Axis.horizontal,
117117
children: [
118118
GestureDetector(
119-
onTap: () => {GoRouter.of(context).go(Service.cfd.route)},
120-
child: const ServiceCard(Service.cfd),
119+
onTap: () => {GoRouter.of(context).go(Service.trade.route)},
120+
child: const ServiceCard(Service.trade),
121121
),
122122
GestureDetector(
123-
onTap: () => {GoRouter.of(context).go(Service.sportsbet.route)},
124-
child: const ServiceCard(Service.sportsbet),
125-
),
126-
GestureDetector(
127-
onTap: () => {GoRouter.of(context).go(Service.exchange.route)},
128-
child: const ServiceCard(Service.exchange),
123+
onTap: () => {GoRouter.of(context).go(Service.dca.route)},
124+
child: const ServiceCard(Service.dca),
129125
),
130126
GestureDetector(
131127
onTap: () => {GoRouter.of(context).go(Service.savings.route)},

lib/wallet/wallet_lightning.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ class ServiceNavigation extends StatelessWidget {
116116
children: [
117117
GestureDetector(
118118
onTap: () => {GoRouter.of(context).go(CfdTrading.route)},
119-
child: const ServiceCard(Service.cfd),
119+
child: const ServiceCard(Service.trade),
120120
),
121-
const ServiceCard(Service.sportsbet),
121+
const ServiceCard(Service.dca),
122122
],
123123
),
124124
);

0 commit comments

Comments
 (0)