fix: double is not int; remove useless typed
This commit is contained in:
parent
f19a441af3
commit
826dcf7c7c
|
@ -136,7 +136,7 @@ Future<void> waitFor(String text,
|
|||
Finder finder = exactMatch ? find.text(text) : find.textContaining(text);
|
||||
log.d('INTEGRATION TEST: Wait for: $text');
|
||||
|
||||
final String searchType = reverse ? 'reversed text' : 'text';
|
||||
final searchType = reverse ? 'reversed text' : 'text';
|
||||
|
||||
do {
|
||||
if (DateTime.now().isAfter(end)) {
|
||||
|
|
|
@ -368,8 +368,8 @@ class DuniterIndexer with ChangeNotifier {
|
|||
transBC.add(i);
|
||||
transBC[i] = [];
|
||||
transBC[i].add(DateTime.parse(transaction['created_at']));
|
||||
final int amountBrut = transaction['amount'];
|
||||
final double amount = removeDecimalZero(amountBrut / 100);
|
||||
final amountBrut = transaction['amount'];
|
||||
final amount = removeDecimalZero(amountBrut / 100);
|
||||
if (direction == "RECEIVED") {
|
||||
transBC[i].add(transaction['issuer_pubkey']);
|
||||
transBC[i].add(transaction['issuer']['identity']?['name'] ?? '');
|
||||
|
|
|
@ -160,7 +160,7 @@ class CommonElements {
|
|||
}
|
||||
|
||||
Widget offlineInfo(BuildContext context) {
|
||||
final double screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
final screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return Visibility(
|
||||
visible: !sub.nodeConnected,
|
||||
|
|
|
@ -187,7 +187,7 @@ Widget geckHome(context) {
|
|||
|
||||
WalletsProfilesProvider historyProvider =
|
||||
Provider.of<WalletsProfilesProvider>(context);
|
||||
final double statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
final statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
@ -433,7 +433,7 @@ Widget geckHome(context) {
|
|||
}
|
||||
|
||||
Widget welcomeHome(context) {
|
||||
final double statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
final statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
|
|
|
@ -95,7 +95,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
|||
}
|
||||
|
||||
List listWallets = myWalletProvider.listWallets;
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
int nTule = 2;
|
||||
|
||||
if (screenWidth >= 900) {
|
||||
|
|
|
@ -45,7 +45,7 @@ class WalletOptions extends StatelessWidget {
|
|||
|
||||
log.d(walletOptions.address.text);
|
||||
|
||||
final int currentChest = myWalletProvider.getCurrentChest();
|
||||
final currentChest = myWalletProvider.getCurrentChest();
|
||||
|
||||
// final currentWallet = _myWalletProvider.getDefaultWallet();
|
||||
// log.d(_walletOptions.getAddress(_currentChest, 3));
|
||||
|
@ -360,7 +360,7 @@ class WalletOptions extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget pubkeyWidget(WalletOptionsProvider walletProvider, BuildContext ctx) {
|
||||
final String shortPubkey = getShortPubkey(walletProvider.address.text);
|
||||
final shortPubkey = getShortPubkey(walletProvider.address.text);
|
||||
return GestureDetector(
|
||||
key: keyCopyAddress,
|
||||
onTap: () {
|
||||
|
|
|
@ -23,6 +23,7 @@ import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
|
|||
import 'package:gecko/screens/myWallets/wallet_options.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
class WalletsHome extends StatelessWidget {
|
||||
const WalletsHome({Key? key}) : super(key: key);
|
||||
|
@ -33,7 +34,7 @@ class WalletsHome extends StatelessWidget {
|
|||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
|
||||
final int currentChestNumber = myWalletProvider.getCurrentChest();
|
||||
final currentChestNumber = myWalletProvider.getCurrentChest();
|
||||
final ChestData currentChest = chestBox.get(currentChestNumber)!;
|
||||
myWalletProvider.listWallets =
|
||||
myWalletProvider.readAllWallets(currentChestNumber);
|
||||
|
@ -88,7 +89,7 @@ class WalletsHome extends StatelessWidget {
|
|||
final bool isSameAddress =
|
||||
myWalletProvider.dragAddress == myWalletProvider.lastFlyBy;
|
||||
|
||||
final double screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
final screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
return Container(
|
||||
color: yellowC,
|
||||
width: screenWidth,
|
||||
|
@ -138,28 +139,39 @@ class WalletsHome extends StatelessWidget {
|
|||
),
|
||||
)),
|
||||
const SizedBox(height: 30),
|
||||
InkWell(
|
||||
key: keyImportG1v1,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ImportG1v1();
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 400,
|
||||
height: 60,
|
||||
child: Center(
|
||||
child: Text('importG1v1'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: Colors.blue[900],
|
||||
fontWeight: FontWeight.w500))),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
'assets/cesium_bw2.svg',
|
||||
semanticsLabel: 'CS',
|
||||
height: 50,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
InkWell(
|
||||
key: keyImportG1v1,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ImportG1v1();
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 350,
|
||||
height: 60,
|
||||
child: Center(
|
||||
child: Text('importG1v1'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: Colors.blue[900],
|
||||
fontWeight: FontWeight.w500))),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
const SizedBox(height: 20),
|
||||
InkWell(
|
||||
key: keyChangeChest,
|
||||
onTap: () {
|
||||
|
@ -209,7 +221,7 @@ class WalletsHome extends StatelessWidget {
|
|||
|
||||
List listWallets = myWalletProvider.listWallets;
|
||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
int nTule = 2;
|
||||
|
||||
if (screenWidth >= 900) {
|
||||
|
|
|
@ -33,7 +33,7 @@ class OnboardingStepTen extends StatelessWidget {
|
|||
Provider.of<GenerateWalletsProvider>(context);
|
||||
final walletOptions = Provider.of<WalletOptionsProvider>(context);
|
||||
CommonElements common = CommonElements();
|
||||
final int pinLenght = generateWalletProvider.pin.text.length;
|
||||
final pinLenght = generateWalletProvider.pin.text.length;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
@ -142,7 +142,7 @@ class OnboardingStepTen extends StatelessWidget {
|
|||
Provider.of<GenerateWalletsProvider>(context);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
final int currentChest = myWalletProvider.getCurrentChest();
|
||||
final currentChest = myWalletProvider.getCurrentChest();
|
||||
|
||||
return Form(
|
||||
key: formKey,
|
||||
|
|
|
@ -17,7 +17,7 @@ class SearchScreen extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final searchProvider = Provider.of<SearchProvider>(context);
|
||||
final double screenHeight = MediaQuery.of(context).size.height;
|
||||
final screenHeight = MediaQuery.of(context).size.height;
|
||||
// final _homeProvider =
|
||||
// Provider.of<HomeProvider>(context, listen: false);
|
||||
|
||||
|
|
|
@ -161,8 +161,8 @@ class WalletViewScreen extends StatelessWidget {
|
|||
final Duration durationSeconds = Duration(
|
||||
seconds: snapshot.data!['certDelay'] ??
|
||||
snapshot.data!['certRenewable']!);
|
||||
final int seconds = durationSeconds.inSeconds;
|
||||
final int minutes = durationSeconds.inMinutes;
|
||||
final seconds = durationSeconds.inSeconds;
|
||||
final minutes = durationSeconds.inMinutes;
|
||||
|
||||
if (seconds <= 0) {
|
||||
duration = 'seconds'.tr(args: ['0']);
|
||||
|
@ -171,8 +171,8 @@ class WalletViewScreen extends StatelessWidget {
|
|||
} else if (seconds <= 3600) {
|
||||
duration = 'minutes'.tr(args: [minutes.toString()]);
|
||||
} else if (seconds <= 86400) {
|
||||
final int hours = durationSeconds.inHours;
|
||||
final int minutesLeft = minutes - hours * 60;
|
||||
final hours = durationSeconds.inHours;
|
||||
final minutesLeft = minutes - hours * 60;
|
||||
String showMinutes = '';
|
||||
if (minutesLeft < 60) {}
|
||||
showMinutes =
|
||||
|
@ -180,11 +180,10 @@ class WalletViewScreen extends StatelessWidget {
|
|||
duration =
|
||||
'hours'.tr(args: [hours.toString(), showMinutes]);
|
||||
} else if (seconds <= 2592000) {
|
||||
final int days = durationSeconds.inDays;
|
||||
final days = durationSeconds.inDays;
|
||||
duration = 'days'.tr(args: [days.toString()]);
|
||||
} else {
|
||||
final int months =
|
||||
(durationSeconds.inDays / 30).round();
|
||||
final months = (durationSeconds.inDays / 30).round();
|
||||
duration = 'months'.tr(args: [months.toString()]);
|
||||
}
|
||||
}
|
||||
|
|
14
pubspec.lock
14
pubspec.lock
|
@ -429,6 +429,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
flutter_svg:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_svg
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
@ -841,6 +848,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
path_drawing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_drawing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
path_parsing:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -58,6 +58,7 @@ dependencies:
|
|||
hex: ^0.2.0
|
||||
flutter_dotenv: ^5.0.2
|
||||
accordion: ^2.5.1
|
||||
flutter_svg: ^1.1.6
|
||||
|
||||
dev_dependencies:
|
||||
# flutter_launcher_icons: ^0.9.2
|
||||
|
|
Loading…
Reference in New Issue