This commit is contained in:
Jus10sambo 2025-03-24 19:10:00 -07:00 committed by GitHub
commit 180faf2b1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8825 changed files with 2141258 additions and 6758 deletions
.metadata
.vs
.vscode
android/app/src/main
kotlin/com/example/stackwallet
res/values-night
crypto_plugins
ios
Runner.xcodeproj/project.xcworkspace/xcshareddata
RunnerTests
lib
app_config.dart
db
dto/ordinals
models
pages
pages_desktop_specific
services
utilities
wallets
widgets
linux

View file

@ -1,11 +1,11 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.
version:
revision: f92f44110e87bad5ff168335c36da6f6053036e6
channel: stable
revision: "c519ee916eaeb88923e67befb89c0f1dabfa83e6"
channel: "stable"
project_type: app
@ -13,11 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: f92f44110e87bad5ff168335c36da6f6053036e6
base_revision: f92f44110e87bad5ff168335c36da6f6053036e6
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
- platform: android
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
- platform: ios
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
- platform: linux
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
- platform: macos
create_revision: f92f44110e87bad5ff168335c36da6f6053036e6
base_revision: f92f44110e87bad5ff168335c36da6f6053036e6
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
- platform: web
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
- platform: windows
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
# User provided section

View file

@ -0,0 +1,3 @@
{
"enableCMake": false
}

3
.vs/ProjectSettings.json Normal file
View file

@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "No Configurations"
}

View file

@ -0,0 +1,9 @@
{
"ActiveTargetSystem": "WSL: Ubuntu",
"DevContainersInfoBarHidden": true,
"ExpandedNodes": [
""
],
"SelectedNode": "\\README.md",
"PreviewInSolutionExplorer": false
}

BIN
.vs/slnx.sqlite Normal file

Binary file not shown.

BIN
.vs/stackwallet/v17/.wsuo Normal file

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,23 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Nixon\\stackwallet\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
}
]
}
]
}
]
}

View file

@ -0,0 +1,41 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Nixon\\stackwallet\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Nixon\\stackwallet\\README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "README.md",
"DocumentMoniker": "C:\\Users\\Nixon\\stackwallet\\README.md",
"RelativeDocumentMoniker": "README.md",
"ToolTip": "C:\\Users\\Nixon\\stackwallet\\README.md",
"RelativeToolTip": "README.md",
"ViewState": "AgIAABsAAAAAAAAAAAAAACUAAAAgAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|",
"WhenOpened": "2025-02-04T01:33:41.717Z",
"EditorCaption": ""
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
}
]
}
]
}
]
}

Binary file not shown.

5
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"recommendations": [
"dart-code.dart-code"
]
}

19
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,19 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "flutter pub get",
"type": "shell",
"command": "flutter",
"args": [
"pub",
"get"
],
"group": "build",
"problemMatcher": [],
"presentation": {
"reveal": "silent"
}
}
]
}

View file

@ -0,0 +1,5 @@
package com.example.stackwallet
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity()

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

@ -1 +1 @@
Subproject commit 0bb1b1ced6e0d3c66e383698f89825754c692986
Subproject commit a9db9558b0d863ab8e54d5744347b10f984f3a57

@ -1 +1 @@
Subproject commit 5b08645a5b5d30955f4bde2a624ff89ef516e452
Subproject commit 61e7189c7f575fb2c88534cf13d190be6cc6120f

@ -1 +1 @@
Subproject commit 2451deab817b456ad93d5579c0d0687cb681392a
Subproject commit 1187baed0515c172ecac69b734e72eac7b4f04aa

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View file

@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}

View file

@ -1,8 +1,38 @@
import 'wallets/crypto_currency/crypto_currency.dart';
import 'wallets/crypto_currency/intermediate/frost_currency.dart';
/// This file is part of the app configuration for the StackWallet application.
///
/// The `part` directive is used to include the generated code from `app_config.g.dart`.
/// This allows for separation of generated code and manually written code,
/// making the codebase more maintainable and organized.
part 'app_config.g.dart';
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'app_config.dart';
// **************************************************************************
// AppConfigGenerator
// **************************************************************************
// Add generated code here
const _prefix = "StackWallet";
const _separator = "-";
const _suffix = "App";
const _emptyWalletsMessage = "No wallets available.";
const _appDataDirName = "stackwallet_data";
const _shortDescriptionText = "StackWallet - Your secure crypto wallet.";
const _commitHash = "abc123";
const _features = <AppFeature>{
AppFeature.themeSelection,
AppFeature.buy,
AppFeature.swap,
};
const _appIconAsset = (light: "assets/icons/light_icon.png", dark: "assets/icons/dark_icon.png");
const _supportedCoins = <CryptoCurrency>[
// Add supported cryptocurrencies here
];
const _swapDefaults = (from: "BTC", to: "ETH");
enum AppFeature {
themeSelection,
buy,

View file

@ -307,16 +307,9 @@ class DbVersionMigrator with WalletDB {
.where()
.addressStringWalletIdEqualTo(address.value, address.walletId)
.findFirst();
if (label == null) {
label = isar_models.AddressLabel(
walletId: address.walletId,
value: "",
addressString: address.value,
tags: tags,
);
} else if (label.tags == null) {
label = label.copyWith(tags: tags);
}
if (label.tags == null) {
label = label.copyWith(tags: tags);
}
labels.add(label);
}
}

View file

@ -149,7 +149,7 @@ class DB {
_boxTradeNotes = await hive.openBox<String>(boxNameTradeNotes);
_boxTradeLookup = await hive.openBox<TradeWalletLookup>(boxNameTradeLookup);
_walletInfoSource = await hive.openBox<lib_monero_compat.WalletInfo>(
lib_monero_compat.WalletInfo.boxName);
lib_monero_compat.WalletInfo.boxName,);
_boxFavoriteWallets = await hive.openBox<String>(boxNameFavoriteWallets);
await Future.wait([
@ -165,7 +165,7 @@ class DB {
try {
AppConfig.getCryptoCurrencyFor(jsonObject["coin"] as String);
return false;
} catch (e, s) {
} catch (e) {
Logging.instance.log(
"Error, ${jsonObject["coin"]} does not exist, $name wallet cannot be loaded",
level: LogLevel.Error,

View file

@ -3,7 +3,6 @@ import 'dart:convert';
import 'package:isar/isar.dart';
import '../app_config.dart';
import '../models/isar/models/blockchain_data/v2/transaction_v2.dart';
import '../models/isar/models/isar_models.dart';
import '../utilities/flutter_secure_storage_interface.dart';
import '../wallets/crypto_currency/crypto_currency.dart';

View file

@ -18,7 +18,7 @@ class AddressInscriptionResponse
status: json['status'] as int,
message: json['message'] as String,
result: AddressInscriptionResult.fromJson(
json['result'] as Map<String, dynamic>),
json['result'] as Map<String, dynamic>,),
);
}
}

View file

@ -409,7 +409,7 @@ class Output {
scriptpubkeyAddress: address,
value: _parse((json["value"] ?? 0).toString()),
);
} catch (s, e) {
} catch (s) {
return Output(
// Return output object with null values; allows wallet history to be built
scriptpubkey: "",

View file

@ -46,13 +46,13 @@ class PaynymAccount {
followers = (map["followers"] as List<dynamic>)
.map(
(e) => PaynymAccountLite.fromMap(
Map<String, dynamic>.from(e as Map)),
Map<String, dynamic>.from(e as Map),),
)
.toList(),
following = (map["following"] as List<dynamic>)
.map(
(e) => PaynymAccountLite.fromMap(
Map<String, dynamic>.from(e as Map)),
Map<String, dynamic>.from(e as Map),),
)
.toList();

View file

@ -159,7 +159,7 @@ class _AddCustomTokenViewState extends ConsumerState<AddCustomTokenView> {
context: context,
builder: (context) => StackOkDialog(
title: "Failed to look up token",
message: response!.exception?.message,
message: response.exception?.message,
),
),
);

View file

@ -110,21 +110,19 @@ class _AddWalletViewState extends ConsumerState<AddWalletView> {
);
}
if (contract != null) {
await MainDB.instance.putEthContract(contract);
unawaited(ref.read(priceAnd24hChangeNotifierProvider).updatePrice());
if (mounted) {
setState(() {
if (tokenEntities
.where((e) => e.token.address == contract!.address)
.isEmpty) {
tokenEntities.add(EthTokenEntity(contract!));
tokenEntities.sort((a, b) => a.token.name.compareTo(b.token.name));
}
});
}
await MainDB.instance.putEthContract(contract);
unawaited(ref.read(priceAnd24hChangeNotifierProvider).updatePrice());
if (mounted) {
setState(() {
if (tokenEntities
.where((e) => e.token.address == contract!.address)
.isEmpty) {
tokenEntities.add(EthTokenEntity(contract!));
tokenEntities.sort((a, b) => a.token.name.compareTo(b.token.name));
}
});
}
}
}
@override
void initState() {

View file

@ -200,7 +200,6 @@ enum _ImportOption {
class _ImportOptionCard extends StatefulWidget {
const _ImportOptionCard({
super.key,
required this.onPressed,
required this.title,
required this.description,
@ -285,7 +284,7 @@ class _ImportOptionCardState extends State<_ImportOptionCard> {
}
class _FrostJoinInfoDialog extends StatelessWidget {
const _FrostJoinInfoDialog({super.key});
const _FrostJoinInfoDialog();
@override
Widget build(BuildContext context) {

View file

@ -242,7 +242,7 @@ class _RestoreFrostMsWalletViewState
});
} catch (e, s) {
Logging.instance.log("Error processing QR code data: $e\n$s",
level: LogLevel.Error);
level: LogLevel.Error,);
}
},
);

View file

@ -103,7 +103,7 @@ class CampfireMigrateView extends StatelessWidget {
}
class _ContinueButtonGroup extends StatefulWidget {
const _ContinueButtonGroup({super.key});
const _ContinueButtonGroup();
@override
State<_ContinueButtonGroup> createState() => _ContinueButtonGroupState();
@ -148,7 +148,6 @@ class _ContinueButtonGroupState extends State<_ContinueButtonGroup> {
class _CampfireWallet extends StatefulWidget {
const _CampfireWallet({
super.key,
required this.name,
required this.mnemonic,
});

View file

@ -556,7 +556,7 @@ class _UtxoDetailsViewState extends ConsumerState<UtxoDetailsView> {
}
class _Div extends StatelessWidget {
const _Div({super.key});
const _Div();
@override
Widget build(BuildContext context) {

View file

@ -601,7 +601,7 @@ class _ConfirmChangeNowSendViewState
return Text(
" | ${value.fiatString(locale: locale)} $currency",
style: STextStyles.desktopTextExtraExtraSmall(
context)
context,)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!

View file

@ -95,7 +95,6 @@ class StepRow extends StatelessWidget {
class _SpacerRow extends StatelessWidget {
const _SpacerRow({
super.key,
required this.width,
required this.dotSize,
required this.spacing,
@ -135,7 +134,6 @@ class _SpacerRow extends StatelessWidget {
class _SpacerDot extends StatelessWidget {
const _SpacerDot({
super.key,
required this.color,
this.size = 1.5,
});

View file

@ -1409,7 +1409,7 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
}
class _Divider extends StatelessWidget {
const _Divider({super.key});
const _Divider();
@override
Widget build(BuildContext context) {

View file

@ -246,7 +246,7 @@ class PrivacyAndTOSText extends StatelessWidget {
style: STextStyles.label(context).copyWith(fontSize: fontSize),
children: [
const TextSpan(
text: "By using ${AppConfig.appName}, you agree to the "),
text: "By using ${AppConfig.appName}, you agree to the ",),
TextSpan(
text: "Terms of service",
style: STextStyles.richLink(context).copyWith(fontSize: fontSize),

View file

@ -146,7 +146,6 @@ class _OrdinalDetailsViewState extends ConsumerState<OrdinalDetailsView> {
class _DetailsItemWCopy extends StatelessWidget {
const _DetailsItemWCopy({
super.key,
required this.title,
required this.data,
});
@ -220,7 +219,6 @@ class _DetailsItemWCopy extends StatelessWidget {
class _OrdinalImageGroup extends ConsumerWidget {
const _OrdinalImageGroup({
super.key,
required this.walletId,
required this.ordinal,
});

View file

@ -90,7 +90,7 @@ class _PaynymDetailsPopupState extends ConsumerState<DesktopPaynymDetails> {
selectedTxFeeRate: rates.medium,
targetPaymentCodeString: widget.accountLite.code,
);
} on InsufficientBalanceException catch (e) {
} on InsufficientBalanceException {
if (mounted) {
canPop = true;
Navigator.of(context, rootNavigator: true).pop();

View file

@ -435,7 +435,6 @@ class _AddressDetailsViewState extends ConsumerState<AddressDetailsView> {
class _AddressDetailsTxList extends StatelessWidget {
const _AddressDetailsTxList({
super.key,
required this.walletId,
required this.address,
});
@ -490,7 +489,6 @@ class _AddressDetailsTxList extends StatelessWidget {
class _AddressDetailsTxV2List extends ConsumerWidget {
const _AddressDetailsTxV2List({
super.key,
required this.walletId,
required this.address,
});
@ -576,7 +574,6 @@ class _AddressDetailsTxV2List extends ConsumerWidget {
class _Div extends StatelessWidget {
const _Div({
super.key,
required this.height,
});
@ -600,7 +597,6 @@ class _Div extends StatelessWidget {
class _Tags extends StatelessWidget {
const _Tags({
super.key,
required this.tags,
});

View file

@ -87,7 +87,7 @@ class _FrostSendViewState extends ConsumerState<FrostSendView> {
final recipients = recipientWidgetIndexes
.map((i) => ref.read(pRecipient(i).state).state)
.map((e) => (address: e!.address, amount: e!.amount!, isChange: false))
.map((e) => (address: e!.address, amount: e.amount!, isChange: false))
.toList(growable: false);
final txData = await wallet.frostCreateSignConfig(

View file

@ -94,28 +94,23 @@ class _RecipientState extends ConsumerState<Recipient> {
Amount? cryptoAmount = ref.read(pAmountFormatter(widget.coin)).tryParse(
amountController.text,
);
if (cryptoAmount != null) {
if (ref.read(pRecipient(widget.index))?.amount != null &&
ref.read(pRecipient(widget.index))?.amount == cryptoAmount) {
return;
}
// final price = ref.read(_pPrice(widget.coin));
//
// if (price > Decimal.zero) {
// baseController.text = (cryptoAmount.decimal * price)
// .toAmount(
// fractionDigits: 2,
// )
// .fiatString(
// locale: ref.read(localeServiceChangeNotifierProvider).locale,
// );
// }
} else {
cryptoAmount = null;
// baseController.text = "";
if (ref.read(pRecipient(widget.index))?.amount != null &&
ref.read(pRecipient(widget.index))?.amount == cryptoAmount) {
return;
}
// final price = ref.read(_pPrice(widget.coin));
//
// if (price > Decimal.zero) {
// baseController.text = (cryptoAmount.decimal * price)
// .toAmount(
// fractionDigits: 2,
// )
// .fiatString(
// locale: ref.read(localeServiceChangeNotifierProvider).locale,
// );
// }
_updateRecipientData();
}
}

View file

@ -266,7 +266,6 @@ class _FrostSendStep4State extends ConsumerState<FrostSendStep4> {
class _Recipient extends StatelessWidget {
const _Recipient({
super.key,
required this.address,
required this.amount,
});

View file

@ -294,7 +294,7 @@ class _SendViewState extends ConsumerState<SendView> {
ref.read(priceAnd24hChangeNotifierProvider).getPrice(coin).item1;
if (price > Decimal.zero) {
baseAmountController.text = (amount!.decimal * price)
baseAmountController.text = (amount.decimal * price)
.toAmount(
fractionDigits: 2,
)
@ -316,7 +316,7 @@ class _SendViewState extends ConsumerState<SendView> {
_calculateFeesFuture = calculateFees(
amount == null
? 0.toAmountAsRaw(fractionDigits: coin.fractionDigits)
: amount!,
: amount,
);
});
}
@ -369,7 +369,7 @@ class _SendViewState extends ConsumerState<SendView> {
}
String? _updateInvalidAddressText(String address) {
if (_data != null && _data!.contactLabel == address) {
if (_data != null && _data.contactLabel == address) {
return null;
}
@ -695,8 +695,7 @@ class _SendViewState extends ConsumerState<SendView> {
],
feeRateType: ref.read(feeRateTypeStateProvider),
satsPerVByte: isCustomFee ? customFeeRate : null,
utxos: (wallet is CoinControlInterface &&
coinControlEnabled &&
utxos: (coinControlEnabled &&
selectedUTXOs.isNotEmpty)
? selectedUTXOs
: null,
@ -714,8 +713,7 @@ class _SendViewState extends ConsumerState<SendView> {
],
feeRateType: ref.read(feeRateTypeStateProvider),
satsPerVByte: isCustomFee ? customFeeRate : null,
utxos: (wallet is CoinControlInterface &&
coinControlEnabled &&
utxos: (coinControlEnabled &&
selectedUTXOs.isNotEmpty)
? selectedUTXOs
: null,
@ -960,9 +958,9 @@ class _SendViewState extends ConsumerState<SendView> {
baseAmountController.addListener(_baseAmountChanged);
if (_data != null) {
if (_data!.amount != null) {
if (_data.amount != null) {
final amount = Amount.fromDecimal(
_data!.amount!,
_data.amount!,
fractionDigits: coin.fractionDigits,
);
@ -971,8 +969,8 @@ class _SendViewState extends ConsumerState<SendView> {
withUnitName: false,
);
}
sendToController.text = _data!.contactLabel;
_address = _data!.address.trim();
sendToController.text = _data.contactLabel;
_address = _data.address.trim();
_addressToggleFlag = true;
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
@ -1602,9 +1600,9 @@ class _SendViewState extends ConsumerState<SendView> {
) ==
FiroType.lelantus) {
if (_data != null &&
_data!.contactLabel == _address) {
_data.contactLabel == _address) {
error = SparkInterface.validateSparkAddress(
address: _data!.address,
address: _data.address,
isTestNet: coin.network ==
CryptoCurrencyNetwork.test,
)
@ -1620,7 +1618,7 @@ class _SendViewState extends ConsumerState<SendView> {
}
} else {
if (_data != null &&
_data!.contactLabel == _address) {
_data.contactLabel == _address) {
error = null;
} else if (!ref.watch(pValidSendToAddress) &&
!ref.watch(pValidSparkSendToAddress)) {
@ -1631,7 +1629,7 @@ class _SendViewState extends ConsumerState<SendView> {
}
} else {
if (_data != null &&
_data!.contactLabel == _address) {
_data.contactLabel == _address) {
error = null;
} else if (!ref.watch(pValidSendToAddress)) {
error = "Invalid address";
@ -1815,7 +1813,7 @@ class _SendViewState extends ConsumerState<SendView> {
if (coin is! Ethereum && coin is! Tezos)
CustomTextButton(
text: _getSendAllTitle(
showCoinControl, selectedUTXOs),
showCoinControl, selectedUTXOs,),
onTap: () => _sendAllTapped(showCoinControl),
),
],

View file

@ -342,7 +342,7 @@ class _TokenSendViewState extends ConsumerState<TokenSendView> {
}
String? _updateInvalidAddressText(String address) {
if (_data != null && _data!.contactLabel == address) {
if (_data != null && _data.contactLabel == address) {
return null;
}
if (address.isNotEmpty &&
@ -609,11 +609,11 @@ class _TokenSendViewState extends ConsumerState<TokenSendView> {
baseAmountController.addListener(_baseAmountChanged);
if (_data != null) {
if (_data!.amount != null) {
cryptoAmountController.text = _data!.amount!.toString();
if (_data.amount != null) {
cryptoAmountController.text = _data.amount!.toString();
}
sendToController.text = _data!.contactLabel;
_address = _data!.address.trim();
sendToController.text = _data.contactLabel;
_address = _data.address.trim();
_addressToggleFlag = true;
}

View file

@ -409,69 +409,67 @@ class _DebugViewState extends ConsumerState<DebugView> {
);
}
if (path != null) {
final eventBus = EventBus();
bool shouldPop = false;
unawaited(
showDialog<dynamic>(
barrierDismissible: false,
context: context,
builder: (_) => WillPopScope(
onWillPop: () async {
return shouldPop;
},
child: CustomLoadingOverlay(
message:
"Generating ${AppConfig.prefix} logs file",
eventBus: eventBus,
),
final eventBus = EventBus();
bool shouldPop = false;
unawaited(
showDialog<dynamic>(
barrierDismissible: false,
context: context,
builder: (_) => WillPopScope(
onWillPop: () async {
return shouldPop;
},
child: CustomLoadingOverlay(
message:
"Generating ${AppConfig.prefix} logs file",
eventBus: eventBus,
),
),
);
),
);
bool logsSaved = true;
String? filename;
try {
filename = await ref
.read(debugServiceProvider)
.exportToFile(path, eventBus);
} catch (e, s) {
logsSaved = false;
Logging.instance
.log("$e $s", level: LogLevel.Error);
}
bool logsSaved = true;
String? filename;
try {
filename = await ref
.read(debugServiceProvider)
.exportToFile(path, eventBus);
} catch (e, s) {
logsSaved = false;
Logging.instance
.log("$e $s", level: LogLevel.Error);
}
shouldPop = true;
shouldPop = true;
if (mounted) {
Navigator.pop(context);
if (mounted) {
Navigator.pop(context);
if (Platform.isAndroid) {
unawaited(
showDialog(
context: context,
builder: (context) => StackOkDialog(
title: logsSaved
? "Logs saved to"
: "Error Saving Logs",
message: "${path!}/$filename",
),
),
);
} else {
unawaited(
showFloatingFlushBar(
type: FlushBarType.info,
context: context,
message: logsSaved
? 'Logs file saved'
if (Platform.isAndroid) {
unawaited(
showDialog(
context: context,
builder: (context) => StackOkDialog(
title: logsSaved
? "Logs saved to"
: "Error Saving Logs",
message: "${path!}/$filename",
),
);
}
),
);
} else {
unawaited(
showFloatingFlushBar(
type: FlushBarType.info,
context: context,
message: logsSaved
? 'Logs file saved'
: "Error Saving Logs",
),
);
}
}
},
},
),
],
),

View file

@ -213,12 +213,12 @@ class GlobalSettingsView extends StatelessWidget {
},
),
if (AppConfig.hasFeature(
AppFeature.themeSelection))
AppFeature.themeSelection,))
const SizedBox(
height: 8,
),
if (AppConfig.hasFeature(
AppFeature.themeSelection))
AppFeature.themeSelection,))
SettingsListButton(
iconAssetName: Assets.svg.sun,
iconSize: 18,

View file

@ -238,7 +238,7 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
),
),
key: const Key(
"createBackupSaveToFileLocationTextFieldKey"),
"createBackupSaveToFileLocationTextFieldKey",),
readOnly: true,
toolbarOptions: const ToolbarOptions(
copy: true,

View file

@ -226,7 +226,7 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
message: fileToSave,
)
: const StackOkDialog(
title: "${AppConfig.prefix} Auto Backup saved"),
title: "${AppConfig.prefix} Auto Backup saved",),
);
if (mounted) {
passwordController.text = "";

View file

@ -153,7 +153,7 @@ class WalletSyncingOptionsView extends ConsumerWidget {
Text(
info.name,
style: STextStyles.titleBold12(
context),
context,),
),
const SizedBox(
height: 2,
@ -173,7 +173,7 @@ class WalletSyncingOptionsView extends ConsumerWidget {
.total,
),
style: STextStyles.itemSubtitle(
context),
context,),
),
],
),
@ -197,7 +197,7 @@ class WalletSyncingOptionsView extends ConsumerWidget {
// .syncType;
final ids = ref
.read(
prefsChangeNotifierProvider)
prefsChangeNotifierProvider,)
.walletIdsSyncOnStartup
.toList();
if (value) {
@ -228,7 +228,7 @@ class WalletSyncingOptionsView extends ConsumerWidget {
ref
.read(
prefsChangeNotifierProvider)
prefsChangeNotifierProvider,)
.walletIdsSyncOnStartup = ids;
},
),

View file

@ -130,10 +130,8 @@ class WalletBackupView extends ConsumerWidget {
class _Mnemonic extends ConsumerWidget {
const _Mnemonic({
super.key,
required this.walletId,
required this.mnemonic,
this.clipboardInterface = const ClipboardWrapper(),
});
final String walletId;
@ -294,7 +292,6 @@ class _Mnemonic extends ConsumerWidget {
class _FrostKeys extends StatelessWidget {
const _FrostKeys({
super.key,
required this.walletId,
this.frostWalletData,
});

View file

@ -154,7 +154,6 @@ class _TokenContractDetailsViewState
class _Item extends StatelessWidget {
const _Item({
super.key,
required this.title,
required this.data,
required this.button,

View file

@ -146,7 +146,7 @@ class _TokenViewState extends ConsumerState<TokenView> {
arguments: Tuple2(
ref.watch(
pCurrentTokenWallet.select(
(value) => value!.tokenContract.address),
(value) => value!.tokenContract.address,),
),
widget.walletId,
),

View file

@ -79,7 +79,7 @@ class WalletBalanceToggleSheet extends ConsumerWidget {
}
// hack to not show lelantus balance in ui if zero
if (balanceSecondary?.spendable.raw == BigInt.zero) {
if (balanceSecondary.spendable.raw == BigInt.zero) {
balanceSecondary = null;
}
}

View file

@ -1240,7 +1240,7 @@ class _TransactionDetailsViewState
context,
).copyWith(
color: Theme.of(
context)
context,)
.extension<
StackColors>()!
.textDark,
@ -1317,7 +1317,7 @@ class _TransactionDetailsViewState
context,
).copyWith(
color: Theme.of(
context)
context,)
.extension<
StackColors>()!
.textDark,
@ -1831,7 +1831,7 @@ class _TransactionDetailsViewState
}
class _Divider extends StatelessWidget {
const _Divider({super.key});
const _Divider();
@override
Widget build(BuildContext context) {

View file

@ -295,7 +295,7 @@ class _BoostTransactionViewState extends ConsumerState<BoostTransactionView> {
}
class _Divider extends StatelessWidget {
const _Divider({super.key});
const _Divider();
@override
Widget build(BuildContext context) {

View file

@ -1494,7 +1494,7 @@ class _TransactionV2DetailsViewState
final confirmed = _transaction.isConfirmed(
currentHeight,
minConfirms,
coin.minCoinbaseConfirms);
coin.minCoinbaseConfirms,);
if (widget.coin is! Epiccash && confirmed) {
height =
"${_transaction.height == 0 ? "Unknown" : _transaction.height}";
@ -1547,7 +1547,7 @@ class _TransactionV2DetailsViewState
context,
).copyWith(
color: Theme.of(
context)
context,)
.extension<
StackColors>()!
.textDark,
@ -1624,7 +1624,7 @@ class _TransactionV2DetailsViewState
context,
).copyWith(
color: Theme.of(
context)
context,)
.extension<
StackColors>()!
.textDark,
@ -2178,7 +2178,7 @@ class OutputCard extends ConsumerWidget {
}
class _Divider extends StatelessWidget {
const _Divider({super.key});
const _Divider();
@override
Widget build(BuildContext context) {

View file

@ -94,7 +94,7 @@ class TxListItem extends ConsumerWidget {
Text(
"Trade details",
style: STextStyles.desktopH3(
context),
context,),
),
DesktopDialogCloseButton(
onPressedOverride: Navigator.of(

View file

@ -95,7 +95,7 @@ class _DesktopContactDetailsState extends ConsumerState<DesktopContactDetails> {
return Container();
}
final contact = _contact!;
final contact = _contact;
return Row(
crossAxisAlignment: CrossAxisAlignment.start,

View file

@ -81,7 +81,6 @@ class FusionProgress extends ConsumerWidget {
class _ProgressItem extends StatelessWidget {
const _ProgressItem({
super.key,
required this.iconAsset,
required this.label,
required this.state,

View file

@ -286,7 +286,6 @@ class _DesktopChooseFromStackState
class _BalanceDisplay extends ConsumerWidget {
const _BalanceDisplay({
super.key,
required this.walletId,
});

View file

@ -122,7 +122,7 @@ class _DesktopWalletSummaryRowState
if (mounted) {
final wallet = ref.read(pWallets).wallets.firstWhere(
(e) => e.cryptoCurrency.identifier == widget.coin.identifier);
(e) => e.cryptoCurrency.identifier == widget.coin.identifier,);
final canContinue = await checkShowNodeTorSettingsMismatch(
context: context,

View file

@ -367,7 +367,7 @@ class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
children: [
if (monke != null)
SvgPicture.memory(
Uint8List.fromList(monke!),
Uint8List.fromList(monke),
width: 60,
height: 60,
),

View file

@ -195,8 +195,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
ref.read(prefsChangeNotifierProvider).enableCoinControl;
if (!(wallet is CoinControlInterface && coinControlEnabled) ||
(wallet is CoinControlInterface &&
coinControlEnabled &&
(coinControlEnabled &&
ref.read(desktopUseUTXOs).isEmpty)) {
// confirm send all
if (amount == availableBalance) {
@ -372,8 +371,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
],
feeRateType: ref.read(feeRateTypeStateProvider),
satsPerVByte: isCustomFee ? customFeeRate : null,
utxos: (wallet is CoinControlInterface &&
coinControlEnabled &&
utxos: (coinControlEnabled &&
ref.read(desktopUseUTXOs).isNotEmpty)
? ref.read(desktopUseUTXOs)
: null,
@ -391,8 +389,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
],
feeRateType: ref.read(feeRateTypeStateProvider),
satsPerVByte: isCustomFee ? customFeeRate : null,
utxos: (wallet is CoinControlInterface &&
coinControlEnabled &&
utxos: (coinControlEnabled &&
ref.read(desktopUseUTXOs).isNotEmpty)
? ref.read(desktopUseUTXOs)
: null,
@ -626,7 +623,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
ref.read(priceAnd24hChangeNotifierProvider).getPrice(coin).item1;
if (price > Decimal.zero) {
final String fiatAmountString = (amount!.decimal * price)
final String fiatAmountString = (amount.decimal * price)
.toAmount(fractionDigits: 2)
.fiatString(
locale: ref.read(localeServiceChangeNotifierProvider).locale,
@ -860,7 +857,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
.log("it changed $amount $_cachedAmountToSend", level: LogLevel.Info);
final amountString = ref.read(pAmountFormatter(coin)).format(
amount!,
amount,
withUnitName: false,
);
@ -960,11 +957,11 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
cryptoAmountController.addListener(onCryptoAmountChanged);
if (_data != null) {
if (_data!.amount != null) {
cryptoAmountController.text = _data!.amount!.toString();
if (_data.amount != null) {
cryptoAmountController.text = _data.amount!.toString();
}
sendToController.text = _data!.contactLabel;
_address = _data!.address;
sendToController.text = _data.contactLabel;
_address = _data.address;
_addressToggleFlag = true;
}
@ -1584,9 +1581,9 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
error = null;
} else if (coin is Firo) {
if (firoType == FiroType.lelantus) {
if (_data != null && _data!.contactLabel == _address) {
if (_data != null && _data.contactLabel == _address) {
error = SparkInterface.validateSparkAddress(
address: _data!.address,
address: _data.address,
isTestNet: coin.network.isTestNet,
)
? "Lelantus to Spark not supported"
@ -1599,7 +1596,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
: "Invalid address";
}
} else {
if (_data != null && _data!.contactLabel == _address) {
if (_data != null && _data.contactLabel == _address) {
error = null;
} else if (!ref.watch(pValidSendToAddress) &&
!ref.watch(pValidSparkSendToAddress)) {
@ -1609,7 +1606,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
}
}
} else {
if (_data != null && _data!.contactLabel == _address) {
if (_data != null && _data.contactLabel == _address) {
error = null;
} else if (!ref.watch(pValidSendToAddress)) {
error = "Invalid address";

View file

@ -440,7 +440,7 @@ class _DesktopTokenSendState extends ConsumerState<DesktopTokenSend> {
}
String? _updateInvalidAddressText(String address) {
if (_data != null && _data!.contactLabel == address) {
if (_data != null && _data.contactLabel == address) {
return null;
}
if (address.isNotEmpty &&
@ -652,11 +652,11 @@ class _DesktopTokenSendState extends ConsumerState<DesktopTokenSend> {
cryptoAmountController.addListener(onCryptoAmountChanged);
if (_data != null) {
if (_data!.amount != null) {
cryptoAmountController.text = _data!.amount!.toString();
if (_data.amount != null) {
cryptoAmountController.text = _data.amount!.toString();
}
sendToController.text = _data!.contactLabel;
_address = _data!.address;
sendToController.text = _data.contactLabel;
_address = _data.address;
_addressToggleFlag = true;
}

View file

@ -437,7 +437,6 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
class _MoreFeaturesItem extends StatefulWidget {
const _MoreFeaturesItem({
super.key,
required this.label,
required this.detail,
required this.iconAsset,
@ -516,7 +515,6 @@ class _MoreFeaturesItemState extends State<_MoreFeaturesItem> {
class _MoreFeaturesItemBase extends StatelessWidget {
const _MoreFeaturesItemBase({
super.key,
required this.child,
this.onPressed,
});
@ -544,7 +542,6 @@ class _MoreFeaturesItemBase extends StatelessWidget {
class _MoreFeaturesClearSparkCacheItem extends StatefulWidget {
const _MoreFeaturesClearSparkCacheItem({
super.key,
required this.cryptoCurrency,
});

View file

@ -229,9 +229,7 @@ class WalletKeysDesktopPopup extends ConsumerWidget {
class _Mnemonic extends StatelessWidget {
const _Mnemonic({
super.key,
required this.words,
this.clipboardInterface = const ClipboardWrapper(),
});
final List<String> words;

View file

@ -336,7 +336,7 @@ class _DesktopOrdinalDetailsViewState
}
class _Divider extends StatelessWidget {
const _Divider({super.key});
const _Divider();
@override
Widget build(BuildContext context) {
@ -354,7 +354,6 @@ class _Divider extends StatelessWidget {
class _DetailsItemWCopy extends StatelessWidget {
const _DetailsItemWCopy({
super.key,
required this.title,
required this.data,
});

View file

@ -140,7 +140,7 @@ class DesktopManageBlockExplorersDialog extends ConsumerWidget {
}
class _DesktopEditBlockExplorerDialog extends ConsumerStatefulWidget {
const _DesktopEditBlockExplorerDialog({super.key, required this.coin});
const _DesktopEditBlockExplorerDialog({required this.coin});
final CryptoCurrency coin;

View file

@ -148,7 +148,7 @@ class _LanguageDialog extends ConsumerState<LanguageDialog> {
sliver: SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 16, horizontal: 32),
vertical: 16, horizontal: 32,),
child: Column(
children: [
Padding(

View file

@ -15,7 +15,6 @@ import '../../models/isar/models/ethereum/eth_contract.dart';
import 'ethereum_api.dart';
import '../../utilities/amount/amount.dart';
import '../../utilities/logger.dart';
import '../../wallets/isar/models/token_wallet_info.dart';
class CachedEthTokenBalance {
final String walletId;

View file

@ -71,7 +71,7 @@ class ChangeNowAPI {
final parsed = jsonDecode(data);
return parsed;
} on FormatException catch (e) {
} on FormatException {
return {
"error": "Dart format exception",
"message": data,

View file

@ -62,7 +62,7 @@ class TrocadorExchange extends Exchange {
receivingMemo: null,
refundAddress: addressRefund,
refundMemo: null,
exchangeProvider: estimate!.exchangeProvider!,
exchangeProvider: estimate!.exchangeProvider,
isFixedRate: fixedRate,
)
: await TrocadorAPI.createNewStandardRateTrade(
@ -77,7 +77,7 @@ class TrocadorExchange extends Exchange {
receivingMemo: null,
refundAddress: addressRefund,
refundMemo: null,
exchangeProvider: estimate!.exchangeProvider!,
exchangeProvider: estimate!.exchangeProvider,
isFixedRate: fixedRate,
);

View file

@ -219,7 +219,7 @@ class NotificationsService extends ChangeNotifier {
// TODO: check non electrumx coins
}
}
} on NoSuchTransactionException catch (e, s) {
} on NoSuchTransactionException catch (e) {
await _deleteWatchedTxNotification(notification);
} catch (e, s) {
Logging.instance.log("$e $s", level: LogLevel.Error);

View file

@ -92,7 +92,7 @@ class WalletsService extends ChangeNotifier {
try {
AppConfig.getCryptoCurrencyFor(jsonObject["coin"] as String);
return false;
} catch (e, s) {
} catch (e) {
Logging.instance.log(
"Error, ${jsonObject["coin"]} does not exist",
level: LogLevel.Error,

View file

@ -50,7 +50,7 @@ class Biometrics {
// debugPrint("isDeviceSupported: $isDeviceSupported");
if (canCheckBiometrics && isDeviceSupported) {
List<BiometricType> availableSystems =
final List<BiometricType> availableSystems =
await localAuth.getAvailableBiometrics();
Logging.instance.log(

View file

@ -161,7 +161,7 @@ abstract class GitStatus {
Logging.instance
.log("isThereCommit $isThereCommit", level: LogLevel.Info);
return isThereCommit;
} catch (e, s) {
} catch (e) {
return false;
}
} catch (e, s) {
@ -198,7 +198,7 @@ abstract class GitStatus {
isHead = response['sha'] == commit;
Logging.instance.log("isHead $isHead", level: LogLevel.Info);
return isHead;
} catch (e, s) {
} catch (e) {
return false;
}
} catch (e, s) {

View file

@ -76,7 +76,7 @@ Future<MoneroNodeConnectionResponse> testMoneroNodeConnection(
print("Request sent: $request");
final buffer = StringBuffer();
await for (var response in socket.inputStream) {
await for (final response in socket.inputStream) {
buffer.write(utf8.decode(response));
if (buffer.toString().contains("\r\n\r\n")) {
break;

View file

@ -1,7 +1,6 @@
import 'package:isar/isar.dart';
import '../db/isar/main_db.dart';
import '../models/isar/models/blockchain_data/v2/transaction_v2.dart';
import '../wallets/crypto_currency/crypto_currency.dart';
import 'amount/amount.dart';
import 'amount/amount_formatter.dart';

View file

@ -52,7 +52,7 @@ class Cardano extends Bip39Currency {
switch (network) {
case CryptoCurrencyNetwork.main:
return Uri.parse(
"https://explorer.cardano.org/en/transaction?id=$txid");
"https://explorer.cardano.org/en/transaction?id=$txid",);
default:
throw Exception(
"Unsupported network for defaultBlockExplorer(): $network",

View file

@ -669,7 +669,7 @@ class BitcoinFrostWallet<T extends FrostCurrency> extends Wallet<T>
if (index >= someSaneMaximum) {
throw Exception(
"index < kFrostSecureStartingIndex hit someSaneMaximum");
"index < kFrostSecureStartingIndex hit someSaneMaximum",);
}
} else {
Logging.instance.log(

View file

@ -190,7 +190,7 @@ class CardanoWallet extends Bip39Wallet<Cardano> {
}
final bip32 = CardanoIcarusBip32.fromSeed(
CardanoIcarusSeedGenerator(await getMnemonic()).generate());
CardanoIcarusSeedGenerator(await getMnemonic()).generate(),);
final spend = bip32.derivePath("1852'/1815'/0'/0/0");
final privateKey = AdaPrivateKey.fromBytes(spend.privateKey.raw);
@ -198,18 +198,18 @@ class CardanoWallet extends Bip39Wallet<Cardano> {
final exampleFee = ADAHelper.toLovelaces("0.10");
final change = TransactionOutput(
address: ADABaseAddress((await getCurrentReceivingAddress())!.value),
amount: Value(coin: totalBalance - (txData.amount!.raw)));
amount: Value(coin: totalBalance - (txData.amount!.raw)),);
final body = TransactionBody(
inputs: listOfUtxosToBeUsed
.map((e) => TransactionInput(
transactionId: TransactionHash.fromHex(e.txHash),
index: e.outputIndex))
index: e.outputIndex,),)
.toList(),
outputs: [
change,
TransactionOutput(
address: ADABaseAddress(txData.recipients!.first.address),
amount: Value(coin: txData.amount!.raw - exampleFee))
amount: Value(coin: txData.amount!.raw - exampleFee),),
],
fee: exampleFee,
);
@ -253,7 +253,7 @@ class CardanoWallet extends Bip39Wallet<Cardano> {
if (totalBalance - (txData.amount!.raw + fee) <
ADAHelper.toLovelaces("1")) {
throw Exception(
"Not enough balance for change. By network rules, please either send all balance or leave at least 1 ADA change.");
"Not enough balance for change. By network rules, please either send all balance or leave at least 1 ADA change.",);
}
return txData.copyWith(
@ -305,34 +305,34 @@ class CardanoWallet extends Bip39Wallet<Cardano> {
}
final bip32 = CardanoIcarusBip32.fromSeed(
CardanoIcarusSeedGenerator(await getMnemonic()).generate());
CardanoIcarusSeedGenerator(await getMnemonic()).generate(),);
final spend = bip32.derivePath("1852'/1815'/0'/0/0");
final privateKey = AdaPrivateKey.fromBytes(spend.privateKey.raw);
final change = TransactionOutput(
address: ADABaseAddress((await getCurrentReceivingAddress())!.value),
amount: Value(
coin: totalUtxoAmount - (txData.amount!.raw + txData.fee!.raw)));
coin: totalUtxoAmount - (txData.amount!.raw + txData.fee!.raw),),);
List<TransactionOutput> outputs = [];
if (totalBalance == (txData.amount!.raw + txData.fee!.raw)) {
outputs = [
TransactionOutput(
address: ADABaseAddress(txData.recipients!.first.address),
amount: Value(coin: txData.amount!.raw))
amount: Value(coin: txData.amount!.raw),),
];
} else {
outputs = [
change,
TransactionOutput(
address: ADABaseAddress(txData.recipients!.first.address),
amount: Value(coin: txData.amount!.raw))
amount: Value(coin: txData.amount!.raw),),
];
}
final body = TransactionBody(
inputs: listOfUtxosToBeUsed
.map((e) => TransactionInput(
transactionId: TransactionHash.fromHex(e.txHash),
index: e.outputIndex))
index: e.outputIndex,),)
.toList(),
outputs: outputs,
fee: txData.fee!.raw,

View file

@ -271,7 +271,7 @@ class DashWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
Map<String, dynamic> jsonTX,
String? utxoOwnerAddress,
) async {
bool blocked = false;
final bool blocked = false;
String? blockedReason;
// // check for bip47 notification

View file

@ -1,7 +1,6 @@
import 'package:isar/isar.dart';
import '../../../dto/ordinals/inscription_data.dart';
import '../../../models/isar/models/blockchain_data/utxo.dart';
import '../../../models/isar/ordinal.dart';
import '../../../services/litescribe_api.dart';
import '../../../utilities/logger.dart';

View file

@ -90,7 +90,7 @@ mixin RbfInterface<T extends ElectrumXCurrencyInterface>
address: address,
amount: Amount(
rawValue: output.value,
fractionDigits: cryptoCurrency.fractionDigits),
fractionDigits: cryptoCurrency.fractionDigits,),
isChange: isChange,
),
);

View file

@ -69,7 +69,7 @@ class _AddressBookCardState extends ConsumerState<AddressBookCard> {
return Container();
}
final contact = _contact!;
final contact = _contact;
final List<CryptoCurrency> coins = [];

View file

@ -83,7 +83,6 @@ class CustomSliverFillViewport extends StatelessWidget {
class _SliverFillViewportRenderObjectWidget
extends SliverMultiBoxAdaptorWidget {
const _SliverFillViewportRenderObjectWidget({
super.key,
required super.delegate,
this.viewportFraction = 1.0,
}) : assert(viewportFraction > 0.0);
@ -340,7 +339,6 @@ class SliverFillRemaining extends StatelessWidget {
class _SliverFillRemainingWithScrollable extends SingleChildRenderObjectWidget {
const _SliverFillRemainingWithScrollable({
super.key,
super.child,
});
@ -354,7 +352,6 @@ class _SliverFillRemainingWithScrollable extends SingleChildRenderObjectWidget {
class _SliverFillRemainingWithoutScrollable
extends SingleChildRenderObjectWidget {
const _SliverFillRemainingWithoutScrollable({
super.key,
super.child,
});
@ -365,7 +362,6 @@ class _SliverFillRemainingWithoutScrollable
class _SliverFillRemainingAndOverscroll extends SingleChildRenderObjectWidget {
const _SliverFillRemainingAndOverscroll({
super.key,
super.child,
});

View file

@ -88,7 +88,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
// await _cameraWindowsPlugin!.onCameraInitialized(_cameraId).first;
// TODO [prio=low]: Make this work. ^^^
Logging.instance.log("Windows Camera initialized with ID: $_cameraId",
level: LogLevel.Info);
level: LogLevel.Info,);
} else if (Platform.isMacOS) {
final List<CameraMacOSDevice> videoDevices = await CameraMacOS.instance
.listDevices(deviceType: CameraMacOSDeviceType.video);
@ -105,7 +105,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
Logging.instance.log(
"macOS Camera initialized with ID: $_macOSDeviceId",
level: LogLevel.Info);
level: LogLevel.Info,);
}
if (mounted) {
setState(() {
@ -135,7 +135,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
// if (_cameraId >= 0) {
await _cameraWindowsPlugin!.dispose(_cameraId);
Logging.instance.log("Windows Camera stopped with ID: $_cameraId",
level: LogLevel.Info);
level: LogLevel.Info,);
// } else {
// Logging.instance.log("Windows Camera ID is null. Cannot dispose.",
// level: LogLevel.Error);
@ -144,7 +144,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
// if (_macOSDeviceId != null) {
await CameraMacOS.instance.stopImageStream();
Logging.instance.log("macOS Camera stopped with ID: $_macOSDeviceId",
level: LogLevel.Info);
level: LogLevel.Info,);
// } else {
// Logging.instance.log("macOS Camera ID is null. Cannot stop.",
// level: LogLevel.Error);
@ -234,7 +234,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
}
await Future.delayed(Duration(milliseconds: _imageDelayInMs));
} catch (e, s) {
} catch (e) {
// Logging.instance.log("Failed to capture and scan image: $e\n$s", level: LogLevel.Error);
// Spammy.
@ -266,7 +266,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
return null;
}
return qrDecode.text;
} catch (e, s) {
} catch (e) {
// Logging.instance.log("Failed to decode QR code: $e\n$s", level: LogLevel.Error);
// Spammy.
return null;
@ -369,7 +369,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
}
} catch (e, s) {
Logging.instance.log("Failed to decode image: $e\n$s",
level: LogLevel.Error);
level: LogLevel.Error,);
await showFloatingFlushBar(
type: FlushBarType.info,
message:

View file

@ -18,7 +18,7 @@ class FrostStepExplanationDialog extends StatelessWidget {
final String title;
final String body;
const FrostStepExplanationDialog(
{super.key, required this.title, required this.body});
{super.key, required this.title, required this.body,});
@override
Widget build(BuildContext context) {

View file

@ -33,7 +33,7 @@ Future<void> showOneTimeTorHasBeenAddedDialogIfRequired(
}
class _TorHasBeenAddedDialog extends StatefulWidget {
const _TorHasBeenAddedDialog({super.key});
const _TorHasBeenAddedDialog();
@override
State<_TorHasBeenAddedDialog> createState() => _TorHasBeenAddedDialogState();

View file

@ -103,7 +103,7 @@ class _FrostStepFieldState extends State<FrostStepField> {
_changed(widget.controller.text);
} catch (e, s) {
Logging.instance.log("Error processing QR code data: $e\n$s",
level: LogLevel.Error);
level: LogLevel.Error,);
}
},
);

View file

@ -151,7 +151,6 @@ class TrocadorKYCRatingInfo extends StatelessWidget {
class _Rating extends StatelessWidget {
const _Rating({
super.key,
required this.kycType,
required this.text,
});

View file

@ -6,46 +6,6 @@
#include "generated_plugin_registrant.h"
#include <cs_monero_flutter_libs_linux/cs_monero_flutter_libs_linux_plugin.h>
#include <desktop_drop/desktop_drop_plugin.h>
#include <devicelocale/devicelocale_plugin.h>
#include <flutter_libepiccash/flutter_libepiccash_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <stack_wallet_backup/stack_wallet_backup_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
#include <window_size/window_size_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) cs_monero_flutter_libs_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "CsMoneroFlutterLibsLinuxPlugin");
cs_monero_flutter_libs_linux_plugin_register_with_registrar(cs_monero_flutter_libs_linux_registrar);
g_autoptr(FlPluginRegistrar) desktop_drop_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopDropPlugin");
desktop_drop_plugin_register_with_registrar(desktop_drop_registrar);
g_autoptr(FlPluginRegistrar) devicelocale_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DevicelocalePlugin");
devicelocale_plugin_register_with_registrar(devicelocale_registrar);
g_autoptr(FlPluginRegistrar) flutter_libepiccash_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLibepiccashPlugin");
flutter_libepiccash_plugin_register_with_registrar(flutter_libepiccash_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin");
isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) stack_wallet_backup_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "StackWalletBackupPlugin");
stack_wallet_backup_plugin_register_with_registrar(stack_wallet_backup_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
g_autoptr(FlPluginRegistrar) window_size_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowSizePlugin");
window_size_plugin_register_with_registrar(window_size_registrar);
}

View file

@ -3,24 +3,9 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
cs_monero_flutter_libs_linux
desktop_drop
devicelocale
flutter_libepiccash
flutter_secure_storage_linux
isar_flutter_libs
sqlite3_flutter_libs
stack_wallet_backup
url_launcher_linux
window_size
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
camera_linux
coinlib_flutter
flutter_libsparkmobile
frostdart
tor_ffi_plugin
)
set(PLUGIN_BUNDLED_LIBRARIES)

View file

@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.13)
project(runner LANGUAGES CXX)
# Define the application target. To change its name, change BINARY_NAME in the
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
# work.
#
# Any new source files that you add to the application should be added here.
add_executable(${BINARY_NAME}
"main.cc"
"my_application.cc"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings(${BINARY_NAME})
# Add preprocessor definitions for the application ID.
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
# Add dependency libraries. Add any application-specific dependencies here.
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")

Some files were not shown because too many files have changed in this diff Show more