-
Notifications
You must be signed in to change notification settings - Fork 7
/
app_resources.dart
206 lines (187 loc) · 6.19 KB
/
app_resources.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
import 'package:country_flags/country_flags.dart';
import 'package:flutter/widgets.dart';
import 'package:genesix/features/wallet/domain/asset.dart';
import 'package:genesix/features/wallet/domain/node_address.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:xelis_dart_sdk/xelis_dart_sdk.dart' as sdk;
// import 'package:jovial_svg/jovial_svg.dart';
class AppResources {
static const String xelisWalletName = 'Genesix';
static const String userWalletsFolderName = 'Genesix wallets';
static const String zeroBalance = '0.00000000';
static const Map<String, String> defaultAssets = {
sdk.xelisAsset: zeroBalance,
};
static const int xelisDecimals = 8;
static const Asset xelisAsset = Asset(
hash: sdk.xelisAsset,
name: 'XELIS',
imagePath: greenBackgroundBlackIconPath,
// imageURL:
// "https://raw.githubusercontent.com/xelis-project/xelis-assets/master/icons/png/circle/green_background_black_logo.png",
decimals: xelisDecimals,
ticker: 'XEL',
);
static List<NodeAddress> mainnetNodes = [
// const NodeAddress(
// name: 'Official Seed Node #1',
// url: 'https://${sdk.mainnetNodeURL}',
// ),
const NodeAddress(
name: 'Seed Node US #1',
url: 'https://us-node.xelis.io/',
),
const NodeAddress(
name: 'Seed Node France #1',
url: 'https://fr-node.xelis.io/',
),
const NodeAddress(
name: 'Seed Node Germany #1',
url: 'https://de-node.xelis.io/',
),
const NodeAddress(
name: 'Seed Node Poland #1',
url: 'https://pl-node.xelis.io/',
),
const NodeAddress(
name: 'Seed Node Singapore #1',
url: 'https://sg-node.xelis.io/',
),
const NodeAddress(
name: 'Seed Node United Kingdom #1',
url: 'https://uk-node.xelis.io/',
),
const NodeAddress(
name: 'Seed Node Canada #1',
url: 'https://ca-node.xelis.io/',
),
];
static List<NodeAddress> testnetNodes = [
const NodeAddress(
name: 'Official XELIS Testnet',
url: 'https://${sdk.testnetNodeURL}',
)
];
static List<NodeAddress> devNodes = [
const NodeAddress(
name: 'Default Local Node',
url: 'http://${sdk.localhostAddress}',
),
];
static String explorerMainnetUrl = 'https://explorer.xelis.io/';
static String explorerTestnetUrl = 'https://testnet-explorer.xelis.io/';
/*static String svgIconGreenTarget =
'https://raw.githubusercontent.com/xelis-project/xelis-assets/master/icons/svg/transparent/green.svg';
static String svgIconBlackTarget =
'https://raw.githubusercontent.com/xelis-project/xelis-assets/master/icons/svg/transparent/black.svg';
static String svgIconWhiteTarget =
'https://raw.githubusercontent.com/xelis-project/xelis-assets/master/icons/svg/transparent/white.svg';
static late ScalableImage svgIconGreen;
static late ScalableImage svgIconWhite;
static late ScalableImage svgIconBlack;
static ScalableImageWidget svgIconGreenWidget = ScalableImageWidget(
si: AppResources.svgIconGreen,
scale: 0.06,
);
static ScalableImageWidget svgIconBlackWidget = ScalableImageWidget(
si: AppResources.svgIconBlack,
scale: 0.06,
);
static ScalableImageWidget svgIconWhiteWidget = ScalableImageWidget(
si: AppResources.svgIconWhite,
scale: 0.06,
);*/
// static String svgBannerGreenPath =
// 'assets/banners/svg/transparent_background_green_logo.svg';
// static String svgBannerBlackPath =
// 'assets/banners/svg/transparent_background_black_logo.svg';
// static String svgBannerWhitePath =
// 'assets/banners/svg/transparent_background_white_logo.svg';
static const String greenBackgroundBlackIconPath =
'assets/icons/png/circle/green_background_black_logo.png';
static const String bgDotsPath = 'assets/bg_dots.png';
// static late ScalableImage svgBannerGreen;
// static late ScalableImage svgBannerWhite;
// static late ScalableImage svgBannerBlack;
static late Image bgDots;
// static ScalableImageWidget svgBannerGreenWidget = ScalableImageWidget(
// si: AppResources.svgBannerGreen,
// scale: 0.15,
// );
//
// static ScalableImageWidget svgBannerBlackWidget = ScalableImageWidget(
// si: AppResources.svgBannerBlack,
// scale: 0.15,
// );
//
// static ScalableImageWidget svgBannerWhiteWidget = ScalableImageWidget(
// si: AppResources.svgBannerWhite,
// scale: 0.15,
// );
static List<CountryFlag> countryFlags = List.generate(
AppLocalizations.supportedLocales.length,
(int index) {
String languageCode =
AppLocalizations.supportedLocales[index].languageCode;
switch (languageCode) {
case 'zh':
return CountryFlag.fromCountryCode(
'CN',
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
case 'ru' || 'pt' || 'nl' || 'pl':
return CountryFlag.fromCountryCode(
languageCode,
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
case 'ko':
return CountryFlag.fromCountryCode(
'KR',
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
case 'ms':
return CountryFlag.fromCountryCode(
'MY',
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
case 'uk':
return CountryFlag.fromCountryCode(
'UA',
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
case 'ja':
return CountryFlag.fromCountryCode(
'JP',
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
case 'ar':
return CountryFlag.fromCountryCode(
'SA',
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
default:
return CountryFlag.fromLanguageCode(
AppLocalizations.supportedLocales[index].languageCode,
height: 24,
width: 30,
shape: const RoundedRectangle(8),
);
}
},
growable: false,
);
}