forked from axiom-team/gecko
apply const colors
This commit is contained in:
parent
bf58e8e3d1
commit
6443e04191
|
@ -33,16 +33,16 @@ late double ratio;
|
||||||
late BuildContext homeContext;
|
late BuildContext homeContext;
|
||||||
|
|
||||||
// Logger
|
// Logger
|
||||||
var log = Logger();
|
final log = Logger();
|
||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
Color orangeC = const Color(0xffd07316);
|
const Color orangeC = Color(0xffd07316);
|
||||||
Color yellowC = const Color(0xffFFD68E);
|
const Color yellowC = Color(0xffFFD68E);
|
||||||
Color floattingYellow = const Color(0xffEFEFBF);
|
const Color floattingYellow = Color(0xffEFEFBF);
|
||||||
Color backgroundColor = const Color(0xFFF5F5F5);
|
const Color backgroundColor = Color(0xFFF5F5F5);
|
||||||
|
|
||||||
// Substrate settings
|
// Substrate settings
|
||||||
String currencyName = 'ĞD';
|
const String currencyName = 'ĞD';
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
const debugPin = true;
|
const debugPin = true;
|
||||||
|
|
|
@ -718,10 +718,12 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
if (isUdUnit) {
|
if (isUdUnit) {
|
||||||
palette = 'universalDividend';
|
palette = 'universalDividend';
|
||||||
call = 'transferUd';
|
call = 'transferUd';
|
||||||
|
// amount is milliUds
|
||||||
amountUnit = (amount * 1000).toInt();
|
amountUnit = (amount * 1000).toInt();
|
||||||
} else {
|
} else {
|
||||||
palette = 'balances';
|
palette = 'balances';
|
||||||
call = 'transferKeepAlive';
|
call = 'transferKeepAlive';
|
||||||
|
// amount is double at 2 decimals
|
||||||
amountUnit = (amount * 100).toInt();
|
amountUnit = (amount * 100).toInt();
|
||||||
}
|
}
|
||||||
txOptions = [destAddress, amountUnit];
|
txOptions = [destAddress, amountUnit];
|
||||||
|
|
|
@ -195,7 +195,6 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
BuildContext context, DuniterIndexer duniterIndexer) {
|
BuildContext context, DuniterIndexer duniterIndexer) {
|
||||||
CesiumPlusProvider cesiumPlusProvider =
|
CesiumPlusProvider cesiumPlusProvider =
|
||||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
|
||||||
|
|
||||||
int keyID = 0;
|
int keyID = 0;
|
||||||
String? dateDelimiter;
|
String? dateDelimiter;
|
||||||
|
@ -293,7 +292,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||||
child: Text(
|
child: Text(
|
||||||
dateDelimiter!,
|
dateDelimiter!,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 23, color: orangeC, fontWeight: FontWeight.w300),
|
fontSize: 23, color: orangeC, fontWeight: FontWeight.w300),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -54,7 +54,7 @@ class HomeScreen extends StatelessWidget {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
|
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
|
||||||
DrawerHeader(
|
DrawerHeader(
|
||||||
decoration: BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
),
|
),
|
||||||
child: Column(children: const <Widget>[
|
child: Column(children: const <Widget>[
|
||||||
|
@ -568,7 +568,7 @@ Widget welcomeHome(context) {
|
||||||
child: OutlinedButton(
|
child: OutlinedButton(
|
||||||
key: keyRestoreChest,
|
key: keyRestoreChest,
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
side: BorderSide(width: 4, color: orangeC)),
|
side: const BorderSide(width: 4, color: orangeC)),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
|
@ -581,7 +581,7 @@ Widget welcomeHome(context) {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
"restoreWallet".tr(),
|
"restoreWallet".tr(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
fontWeight: FontWeight.w600),
|
fontWeight: FontWeight.w600),
|
||||||
|
|
|
@ -98,7 +98,7 @@ class ChestOptions extends StatelessWidget {
|
||||||
const SizedBox(width: 15),
|
const SizedBox(width: 15),
|
||||||
Text(
|
Text(
|
||||||
'displayMnemonic'.tr(),
|
'displayMnemonic'.tr(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
),
|
),
|
||||||
|
|
|
@ -144,7 +144,7 @@ class _ChooseChestState extends State<ChooseChest> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'openThisChest'.tr(),
|
'openThisChest'.tr(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
color: backgroundColor,
|
color: backgroundColor,
|
||||||
fontWeight: FontWeight.w600),
|
fontWeight: FontWeight.w600),
|
||||||
|
@ -170,7 +170,7 @@ class _ChooseChestState extends State<ChooseChest> {
|
||||||
height: 50,
|
height: 50,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text('createChest'.tr(),
|
child: Text('createChest'.tr(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
fontWeight: FontWeight.w600))),
|
fontWeight: FontWeight.w600))),
|
||||||
|
@ -193,7 +193,7 @@ class _ChooseChestState extends State<ChooseChest> {
|
||||||
height: 50,
|
height: 50,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text('importChest'.tr(),
|
child: Text('importChest'.tr(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
fontWeight: FontWeight.w600))),
|
fontWeight: FontWeight.w600))),
|
||||||
|
|
|
@ -72,7 +72,7 @@ class _CustomDerivationState extends State<CustomDerivation> {
|
||||||
menuMaxHeight: 300,
|
menuMaxHeight: 300,
|
||||||
icon: const Icon(Icons.arrow_downward),
|
icon: const Icon(Icons.arrow_downward),
|
||||||
elevation: 16,
|
elevation: 16,
|
||||||
style: TextStyle(color: orangeC),
|
style: const TextStyle(color: orangeC),
|
||||||
underline: Container(
|
underline: Container(
|
||||||
height: 2,
|
height: 2,
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
|
|
|
@ -66,7 +66,7 @@ class ImportG1v1 extends StatelessWidget {
|
||||||
const SizedBox(height: 80),
|
const SizedBox(height: 80),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: const [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 35,
|
height: 35,
|
||||||
width: 35,
|
width: 35,
|
||||||
|
|
|
@ -82,7 +82,7 @@ class MigrateIdentityScreen extends StatelessWidget {
|
||||||
if (status.data == null) {
|
if (status.data == null) {
|
||||||
return Column(children: [
|
return Column(children: [
|
||||||
const SizedBox(height: 80),
|
const SizedBox(height: 80),
|
||||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
Row(mainAxisAlignment: MainAxisAlignment.center, children: const [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 35,
|
height: 35,
|
||||||
width: 35,
|
width: 35,
|
||||||
|
|
|
@ -49,7 +49,7 @@ class ShowSeed extends StatelessWidget {
|
||||||
builder: (BuildContext context, AsyncSnapshot<String?> seed) {
|
builder: (BuildContext context, AsyncSnapshot<String?> seed) {
|
||||||
if (seed.connectionState != ConnectionState.done ||
|
if (seed.connectionState != ConnectionState.done ||
|
||||||
seed.hasError) {
|
seed.hasError) {
|
||||||
return SizedBox(
|
return const SizedBox(
|
||||||
height: 15,
|
height: 15,
|
||||||
width: 15,
|
width: 15,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
|
|
|
@ -144,7 +144,7 @@ class UnlockingWallet extends StatelessWidget {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'changeChest'.tr(),
|
'changeChest'.tr(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
fontWeight: FontWeight.w600),
|
fontWeight: FontWeight.w600),
|
||||||
|
|
|
@ -111,7 +111,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
Consumer<WalletOptionsProvider>(
|
Consumer<WalletOptionsProvider>(
|
||||||
builder: (context, walletProvider, _) {
|
builder: (context, walletProvider, _) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
|
|
|
@ -178,7 +178,7 @@ class WalletsHome extends StatelessWidget {
|
||||||
height: 60,
|
height: 60,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text('changeChest'.tr(),
|
child: Text('changeChest'.tr(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
color: orangeC,
|
color: orangeC,
|
||||||
fontWeight: FontWeight.w500))),
|
fontWeight: FontWeight.w500))),
|
||||||
|
@ -468,10 +468,10 @@ class WalletsHome extends StatelessWidget {
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
decoration: BoxDecoration(color: floattingYellow),
|
decoration: const BoxDecoration(color: floattingYellow),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: myWalletProvider.isNewDerivationLoading
|
child: myWalletProvider.isNewDerivationLoading
|
||||||
? SizedBox(
|
? const SizedBox(
|
||||||
height: 60,
|
height: 60,
|
||||||
width: 60,
|
width: 60,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
|
|
|
@ -70,7 +70,7 @@ class OnboardingStepTen extends StatelessWidget {
|
||||||
'${generateWalletProvider.numberScan + 1}'
|
'${generateWalletProvider.numberScan + 1}'
|
||||||
])),
|
])),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 22,
|
height: 22,
|
||||||
width: 22,
|
width: 22,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
|
|
|
@ -24,7 +24,7 @@ class QrCodeFullscreen extends StatelessWidget {
|
||||||
backgroundColor: color ?? Colors.black,
|
backgroundColor: color ?? Colors.black,
|
||||||
toolbarHeight: 60 * ratio,
|
toolbarHeight: 60 * ratio,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back, color: orangeC),
|
icon:const Icon(Icons.arrow_back, color: orangeC),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}),
|
}),
|
||||||
|
@ -32,7 +32,7 @@ class QrCodeFullscreen extends StatelessWidget {
|
||||||
height: 22,
|
height: 22,
|
||||||
child: Text(
|
child: Text(
|
||||||
'QR Code de ${getShortPubkey(address)}',
|
'QR Code de ${getShortPubkey(address)}',
|
||||||
style: TextStyle(color: orangeC),
|
style: const TextStyle(color: orangeC),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
|
|
|
@ -160,7 +160,7 @@ class SearchResultScreen extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Center(
|
return const Center(
|
||||||
heightFactor: 5,
|
heightFactor: 5,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 3,
|
strokeWidth: 3,
|
||||||
|
|
|
@ -188,7 +188,7 @@ class SettingsScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const Spacer(flex: 5),
|
const Spacer(flex: 5),
|
||||||
sub.isLoadingEndpoint
|
sub.isLoadingEndpoint
|
||||||
? CircularProgressIndicator(color: orangeC)
|
? const CircularProgressIndicator(color: orangeC)
|
||||||
: Consumer<SettingsProvider>(builder: (context, set, _) {
|
: Consumer<SettingsProvider>(builder: (context, set, _) {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
key: keyConnectToEndpoint,
|
key: keyConnectToEndpoint,
|
||||||
|
@ -331,7 +331,7 @@ class SettingsScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const Spacer(flex: 5),
|
const Spacer(flex: 5),
|
||||||
indexer.isLoadingIndexer
|
indexer.isLoadingIndexer
|
||||||
? CircularProgressIndicator(color: orangeC)
|
? const CircularProgressIndicator(color: orangeC)
|
||||||
: Consumer<SettingsProvider>(builder: (context, set, _) {
|
: Consumer<SettingsProvider>(builder: (context, set, _) {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|
|
@ -184,7 +184,7 @@ class TransactionInProgress extends StatelessWidget {
|
||||||
child: Column(children: <Widget>[
|
child: Column(children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
|
@ -236,7 +236,7 @@ class TransactionInProgress extends StatelessWidget {
|
||||||
Column(children: [
|
Column(children: [
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: isLoading,
|
visible: isLoading,
|
||||||
child: SizedBox(
|
child: const SizedBox(
|
||||||
height: 18,
|
height: 18,
|
||||||
width: 18,
|
width: 18,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
|
|
Loading…
Reference in New Issue