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