What changed, and why it matters
This commit is purely a code-style reformat. It changes whitespace, line breaks, and indentation in four Dart files to satisfy the project's continuous integration (CI) formatter. No program logic, behavior, or security-sensitive code was altered.
No security action needed. Treat as a routine formatting commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows only formatting changes produced by an autoformatter (likely dart format). Examples include collapsing multi-line variable declarations onto fewer lines, rewrapping ternary expressions, and adjusting trailing commas and indentation. There are no functional edits, no new imports, no changed constants, and no modifications to control flow or data handling.
Changed components
lib/pages/coin_control/coin_control_view.dartlib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dartlib/pages_desktop_specific/coin_control/desktop_coin_control_view.dartlib/providers/exchange/exchange_form_state_provider.dartInspect captured patch +785 / −852
diff --git a/lib/pages/coin_control/coin_control_view.dart b/lib/pages/coin_control/coin_control_view.dart
index d6954cc..730001c 100644
--- a/lib/pages/coin_control/coin_control_view.dart
+++ b/lib/pages/coin_control/coin_control_view.dart
@@ -124,12 +124,11 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
- final minConfirms =
- ref
- .watch(pWallets)
- .getWallet(widget.walletId)
- .cryptoCurrency
- .minConfirms;
+ final minConfirms = ref
+ .watch(pWallets)
+ .getWallet(widget.walletId)
+ .cryptoCurrency
+ .minConfirms;
final coin = ref.watch(pWalletCoin(widget.walletId));
final currentHeight = ref.watch(pWalletChainHeight(widget.walletId));
@@ -151,12 +150,11 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
_map = null;
_list = MainDB.instance.queryUTXOsSync(
walletId: widget.walletId,
- filter:
- _isSearching
- ? CCFilter.all
- : _showBlocked
- ? CCFilter.frozen
- : CCFilter.available,
+ filter: _isSearching
+ ? CCFilter.all
+ : _showBlocked
+ ? CCFilter.frozen
+ : CCFilter.available,
sort: _sort,
searchTerm: _isSearching ? searchController.text : "",
locale: locale,
@@ -174,115 +172,107 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
},
child: Background(
child: Scaffold(
- backgroundColor:
- Theme.of(context).extension<StackColors>()!.background,
+ backgroundColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.background,
appBar: AppBar(
automaticallyImplyLeading: false,
- leading:
- _isSearching
- ? null
- : widget.type == CoinControlViewType.use &&
- _selectedAvailable.isNotEmpty
- ? AppBarIconButton(
- icon: XIcon(
- width: 24,
- height: 24,
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.topNavIconPrimary,
- ),
- onPressed: () {
- setState(() {
- _selectedAvailable.clear();
- });
- },
- )
- : AppBarBackButton(
- onPressed: () {
- unawaited(_refreshBalance());
- Navigator.of(context).pop(
- widget.type == CoinControlViewType.use
- ? _selectedAvailable
- : null,
- );
- },
- ),
- title:
- _isSearching
- ? AppBarSearchField(
- controller: searchController,
- focusNode: searchFocus,
- )
- : Text(
- "Coin control",
- style: STextStyles.navBarTitle(context),
+ leading: _isSearching
+ ? null
+ : widget.type == CoinControlViewType.use &&
+ _selectedAvailable.isNotEmpty
+ ? AppBarIconButton(
+ icon: XIcon(
+ width: 24,
+ height: 24,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.topNavIconPrimary,
),
+ onPressed: () {
+ setState(() {
+ _selectedAvailable.clear();
+ });
+ },
+ )
+ : AppBarBackButton(
+ onPressed: () {
+ unawaited(_refreshBalance());
+ Navigator.of(context).pop(
+ widget.type == CoinControlViewType.use
+ ? _selectedAvailable
+ : null,
+ );
+ },
+ ),
+ title: _isSearching
+ ? AppBarSearchField(
+ controller: searchController,
+ focusNode: searchFocus,
+ )
+ : Text("Coin control", style: STextStyles.navBarTitle(context)),
titleSpacing: 0,
- actions:
- _isSearching
- ? [
- AspectRatio(
- aspectRatio: 1,
- child: AppBarIconButton(
- size: 36,
- icon: SvgPicture.asset(
- Assets.svg.x,
- width: 20,
- height: 20,
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.topNavIconPrimary,
- ),
- onPressed: () {
- // show search
- setState(() {
- _isSearching = false;
- });
- },
+ actions: _isSearching
+ ? [
+ AspectRatio(
+ aspectRatio: 1,
+ child: AppBarIconButton(
+ size: 36,
+ icon: SvgPicture.asset(
+ Assets.svg.x,
+ width: 20,
+ height: 20,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.topNavIconPrimary,
),
+ onPressed: () {
+ // show search
+ setState(() {
+ _isSearching = false;
+ });
+ },
),
- ]
- : [
- AspectRatio(
- aspectRatio: 1,
- child: AppBarIconButton(
- size: 36,
- icon: SvgPicture.asset(
- Assets.svg.search,
- width: 20,
- height: 20,
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.topNavIconPrimary,
- ),
- onPressed: () {
- // show search
- setState(() {
- _isSearching = true;
- });
- },
+ ),
+ ]
+ : [
+ AspectRatio(
+ aspectRatio: 1,
+ child: AppBarIconButton(
+ size: 36,
+ icon: SvgPicture.asset(
+ Assets.svg.search,
+ width: 20,
+ height: 20,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.topNavIconPrimary,
),
+ onPressed: () {
+ // show search
+ setState(() {
+ _isSearching = true;
+ });
+ },
),
- AspectRatio(
- aspectRatio: 1,
- child: JDropdownIconButton(
- mobileAppBar: true,
- groupValue: _sort,
- items: CCSortDescriptor.values.toSet(),
- onSelectionChanged: (CCSortDescriptor? newValue) {
- if (newValue != null && newValue != _sort) {
- setState(() {
- _sort = newValue;
- });
- }
- },
- displayPrefix: "Sort by",
- ),
+ ),
+ AspectRatio(
+ aspectRatio: 1,
+ child: JDropdownIconButton(
+ mobileAppBar: true,
+ groupValue: _sort,
+ items: CCSortDescriptor.values.toSet(),
+ onSelectionChanged: (CCSortDescriptor? newValue) {
+ if (newValue != null && newValue != _sort) {
+ setState(() {
+ _sort = newValue;
+ });
+ }
+ },
+ displayPrefix: "Sort by",
),
- ],
+ ),
+ ],
),
body: SafeArea(
child: Column(
@@ -300,10 +290,9 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
"outputs at your discretion. Tap the output circle to "
"select.",
style: STextStyles.w500_14(context).copyWith(
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.textSubtitle1,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle1,
),
),
),
@@ -313,15 +302,13 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
height: 48,
child: Toggle(
key: UniqueKey(),
- onColor:
- Theme.of(
- context,
- ).extension<StackColors>()!.popupBG,
+ onColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.popupBG,
onText: "Available outputs",
- offColor:
- Theme.of(context)
- .extension<StackColors>()!
- .textFieldDefaultBG,
+ offColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.textFieldDefaultBG,
offText: "Frozen outputs",
isOn: _showBlocked,
onValueChanged: (value) {
@@ -342,14 +329,13 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
Expanded(
child: ListView.separated(
itemCount: _list!.length,
- separatorBuilder:
- (context, _) => const SizedBox(height: 10),
+ separatorBuilder: (context, _) =>
+ const SizedBox(height: 10),
itemBuilder: (context, index) {
- final utxo =
- MainDB.instance.isar.utxos
- .where()
- .idEqualTo(_list![index])
- .findFirstSync()!;
+ final utxo = MainDB.instance.isar.utxos
+ .where()
+ .idEqualTo(_list![index])
+ .findFirstSync()!;
final isSelected =
_selectedBlocked.contains(utxo) ||
@@ -391,15 +377,14 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
setState(() {});
},
onPressed: () async {
- final result = await Navigator.of(
- context,
- ).pushNamed(
- UtxoDetailsView.routeName,
- arguments: Tuple2(
- utxo.id,
- widget.walletId,
- ),
- );
+ final result = await Navigator.of(context)
+ .pushNamed(
+ UtxoDetailsView.routeName,
+ arguments: Tuple2(
+ utxo.id,
+ widget.walletId,
+ ),
+ );
if (mounted && result == "refresh") {
setState(() {});
}
@@ -411,244 +396,236 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
if (!_isSearching)
_list != null
? Expanded(
- child: ListView.separated(
- itemCount: _list!.length,
- separatorBuilder:
- (context, _) =>
- const SizedBox(height: 10),
- itemBuilder: (context, index) {
- final utxo =
- MainDB.instance.isar.utxos
- .where()
- .idEqualTo(_list![index])
- .findFirstSync()!;
+ child: ListView.separated(
+ itemCount: _list!.length,
+ separatorBuilder: (context, _) =>
+ const SizedBox(height: 10),
+ itemBuilder: (context, index) {
+ final utxo = MainDB.instance.isar.utxos
+ .where()
+ .idEqualTo(_list![index])
+ .findFirstSync()!;
- final isSelected =
- _showBlocked
- ? _selectedBlocked.contains(utxo)
- : _selectedAvailable.contains(utxo);
+ final isSelected = _showBlocked
+ ? _selectedBlocked.contains(utxo)
+ : _selectedAvailable.contains(utxo);
- return UtxoCard(
- key: Key(
- "${utxo.walletId}_${utxo.id}_$isSelected",
- ),
- walletId: widget.walletId,
- utxo: utxo,
- canSelect:
- widget.type ==
- CoinControlViewType.manage ||
- (widget.type ==
- CoinControlViewType.use &&
- !_showBlocked &&
- _isConfirmed(
- utxo,
- currentHeight,
- ref.watch(
- pWallets.select(
- (s) => s.getWallet(
- widget.walletId,
+ return UtxoCard(
+ key: Key(
+ "${utxo.walletId}_${utxo.id}_$isSelected",
+ ),
+ walletId: widget.walletId,
+ utxo: utxo,
+ canSelect:
+ widget.type ==
+ CoinControlViewType.manage ||
+ (widget.type ==
+ CoinControlViewType.use &&
+ !_showBlocked &&
+ _isConfirmed(
+ utxo,
+ currentHeight,
+ ref.watch(
+ pWallets.select(
+ (s) => s.getWallet(
+ widget.walletId,
+ ),
),
),
- ),
- )),
- initialSelectedState: isSelected,
- onSelectedChanged: (value) {
- if (value) {
- _showBlocked
- ? _selectedBlocked.add(utxo)
- : _selectedAvailable.add(utxo);
- } else {
- _showBlocked
- ? _selectedBlocked.remove(utxo)
- : _selectedAvailable.remove(utxo);
- }
- setState(() {});
- },
- onPressed: () async {
- final result = await Navigator.of(
- context,
- ).pushNamed(
- UtxoDetailsView.routeName,
- arguments: Tuple2(
- utxo.id,
- widget.walletId,
- ),
- );
- if (mounted && result == "refresh") {
+ )),
+ initialSelectedState: isSelected,
+ onSelectedChanged: (value) {
+ if (value) {
+ _showBlocked
+ ? _selectedBlocked.add(utxo)
+ : _selectedAvailable.add(utxo);
+ } else {
+ _showBlocked
+ ? _selectedBlocked.remove(utxo)
+ : _selectedAvailable.remove(
+ utxo,
+ );
+ }
setState(() {});
- }
- },
- );
- },
- ),
- )
+ },
+ onPressed: () async {
+ final result =
+ await Navigator.of(
+ context,
+ ).pushNamed(
+ UtxoDetailsView.routeName,
+ arguments: Tuple2(
+ utxo.id,
+ widget.walletId,
+ ),
+ );
+ if (mounted && result == "refresh") {
+ setState(() {});
+ }
+ },
+ );
+ },
+ ),
+ )
: Expanded(
- child: ListView.separated(
- itemCount: _map!.entries.length,
- separatorBuilder:
- (context, _) =>
- const SizedBox(height: 10),
- itemBuilder: (context, index) {
- final entry = _map!.entries.elementAt(
- index,
- );
- final _controller = RotateIconController();
+ child: ListView.separated(
+ itemCount: _map!.entries.length,
+ separatorBuilder: (context, _) =>
+ const SizedBox(height: 10),
+ itemBuilder: (context, index) {
+ final entry = _map!.entries.elementAt(
+ index,
+ );
+ final _controller =
+ RotateIconController();
- return Expandable2(
- border:
- Theme.of(context)
- .extension<StackColors>()!
- .backgroundAppBar,
- background:
- Theme.of(
- context,
- ).extension<StackColors>()!.popupBG,
- animationDurationMultiplier:
- 0.2 * entry.value.length,
- onExpandWillChange: (state) {
- if (state ==
- Expandable2State.expanded) {
- _controller.forward?.call();
- } else {
- _controller.reverse?.call();
- }
- },
- header: RoundedContainer(
- padding: const EdgeInsets.all(14),
- color: Colors.transparent,
- child: Row(
- children: [
- Expanded(
- child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
- children: [
- Text(
- entry.key,
- style: STextStyles.w600_14(
- context,
+ return Expandable2(
+ border: Theme.of(context)
+ .extension<StackColors>()!
+ .backgroundAppBar,
+ background: Theme.of(
+ context,
+ ).extension<StackColors>()!.popupBG,
+ animationDurationMultiplier:
+ 0.2 * entry.value.length,
+ onExpandWillChange: (state) {
+ if (state ==
+ Expandable2State.expanded) {
+ _controller.forward?.call();
+ } else {
+ _controller.reverse?.call();
+ }
+ },
+ header: RoundedContainer(
+ padding: const EdgeInsets.all(14),
+ color: Colors.transparent,
+ child: Row(
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text(
+ entry.key,
+ style:
+ STextStyles.w600_14(
+ context,
+ ),
),
- ),
- const SizedBox(height: 2),
- Text(
- "${entry.value.length} "
- "output${entry.value.length > 1 ? "s" : ""}",
- style: STextStyles.w500_12(
- context,
- ).copyWith(
- color:
- Theme.of(context)
- .extension<
- StackColors
- >()!
- .textSubtitle1,
+ const SizedBox(height: 2),
+ Text(
+ "${entry.value.length} "
+ "output${entry.value.length > 1 ? "s" : ""}",
+ style:
+ STextStyles.w500_12(
+ context,
+ ).copyWith(
+ color: Theme.of(context)
+ .extension<
+ StackColors
+ >()!
+ .textSubtitle1,
+ ),
),
- ),
- ],
+ ],
+ ),
),
- ),
- RotateIcon(
- animationDurationMultiplier:
- 0.2 * entry.value.length,
- icon: SvgPicture.asset(
- Assets.svg.chevronDown,
- width: 14,
- color:
- Theme.of(context)
- .extension<
- StackColors
- >()!
- .textSubtitle1,
+ RotateIcon(
+ animationDurationMultiplier:
+ 0.2 * entry.value.length,
+ icon: SvgPicture.asset(
+ Assets.svg.chevronDown,
+ width: 14,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .textSubtitle1,
+ ),
+ curve: Curves.easeInOut,
+ controller: _controller,
),
- curve: Curves.easeInOut,
- controller: _controller,
- ),
- ],
+ ],
+ ),
),
- ),
- children:
- entry.value.map((id) {
- final utxo =
- MainDB.instance.isar.utxos
- .where()
- .idEqualTo(id)
- .findFirstSync()!;
+ children: entry.value.map((id) {
+ final utxo = MainDB
+ .instance
+ .isar
+ .utxos
+ .where()
+ .idEqualTo(id)
+ .findFirstSync()!;
- final isSelected =
- _selectedBlocked.contains(
- utxo,
- ) ||
- _selectedAvailable.contains(
- utxo,
- );
+ final isSelected =
+ _selectedBlocked.contains(utxo) ||
+ _selectedAvailable.contains(utxo);
- return UtxoCard(
- key: Key(
- "${utxo.walletId}_${utxo.id}_$isSelected",
- ),
- walletId: widget.walletId,
- utxo: utxo,
- canSelect:
- widget.type ==
- CoinControlViewType
- .manage ||
- (widget.type ==
- CoinControlViewType
- .use &&
- !utxo.isBlocked &&
- _isConfirmed(
- utxo,
- currentHeight,
- ref.watch(
- pWallets.select(
- (s) => s.getWallet(
- widget.walletId,
- ),
+ return UtxoCard(
+ key: Key(
+ "${utxo.walletId}_${utxo.id}_$isSelected",
+ ),
+ walletId: widget.walletId,
+ utxo: utxo,
+ canSelect:
+ widget.type ==
+ CoinControlViewType
+ .manage ||
+ (widget.type ==
+ CoinControlViewType
+ .use &&
+ !utxo.isBlocked &&
+ _isConfirmed(
+ utxo,
+ currentHeight,
+ ref.watch(
+ pWallets.select(
+ (s) => s.getWallet(
+ widget.walletId,
),
),
- )),
- initialSelectedState: isSelected,
- onSelectedChanged: (value) {
- if (value) {
- utxo.isBlocked
- ? _selectedBlocked.add(
- utxo,
- )
- : _selectedAvailable.add(
+ ),
+ )),
+ initialSelectedState: isSelected,
+ onSelectedChanged: (value) {
+ if (value) {
+ utxo.isBlocked
+ ? _selectedBlocked.add(utxo)
+ : _selectedAvailable.add(
utxo,
);
- } else {
- utxo.isBlocked
- ? _selectedBlocked.remove(
+ } else {
+ utxo.isBlocked
+ ? _selectedBlocked.remove(
utxo,
)
- : _selectedAvailable
- .remove(utxo);
- }
+ : _selectedAvailable.remove(
+ utxo,
+ );
+ }
+ setState(() {});
+ },
+ onPressed: () async {
+ final result =
+ await Navigator.of(
+ context,
+ ).pushNamed(
+ UtxoDetailsView.routeName,
+ arguments: Tuple2(
+ utxo.id,
+ widget.walletId,
+ ),
+ );
+ if (mounted &&
+ result == "refresh") {
setState(() {});
- },
- onPressed: () async {
- final result =
- await Navigator.of(
- context,
- ).pushNamed(
- UtxoDetailsView.routeName,
- arguments: Tuple2(
- utxo.id,
- widget.walletId,
- ),
- );
- if (mounted &&
- result == "refresh") {
- setState(() {});
- }
- },
- );
- }).toList(),
- );
- },
+ }
+ },
+ );
+ }).toList(),
+ );
+ },
+ ),
),
- ),
],
),
),
@@ -658,10 +635,9 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
widget.type == CoinControlViewType.manage)
Container(
decoration: BoxDecoration(
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.backgroundAppBar,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.backgroundAppBar,
boxShadow: [
Theme.of(
context,
@@ -696,10 +672,9 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
if (!_showBlocked && widget.type == CoinControlViewType.use)
Container(
decoration: BoxDecoration(
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.backgroundAppBar,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.backgroundAppBar,
boxShadow: [
Theme.of(
context,
@@ -728,13 +703,13 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
builder: (context) {
final int selectedSumInt =
_selectedAvailable.isEmpty
- ? 0
- : _selectedAvailable
- .map((e) => e.value)
- .reduce(
- (value, element) =>
- value += element,
- );
+ ? 0
+ : _selectedAvailable
+ .map((e) => e.value)
+ .reduce(
+ (value, element) =>
+ value += element,
+ );
final selectedSum = selectedSumInt
.toAmountAsRaw(
fractionDigits:
@@ -744,33 +719,26 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
ref
.watch(pAmountFormatter(coin))
.format(selectedSum),
- style:
- widget.requestedTotal == null
- ? STextStyles.w600_14(
- context,
- )
- : STextStyles.w600_14(
- context,
- ).copyWith(
- color:
- selectedSum >=
- widget
- .requestedTotal!
- ? Theme.of(
- context,
- )
- .extension<
- StackColors
- >()!
- .accentColorGreen
- : Theme.of(
- context,
- )
- .extension<
- StackColors
- >()!
- .accentColorRed,
- ),
+ style: widget.requestedTotal == null
+ ? STextStyles.w600_14(context)
+ : STextStyles.w600_14(
+ context,
+ ).copyWith(
+ color:
+ selectedSum >=
+ widget
+ .requestedTotal!
+ ? Theme.of(context)
+ .extension<
+ StackColors
+ >()!
+ .accentColorGreen
+ : Theme.of(context)
+ .extension<
+ StackColors
+ >()!
+ .accentColorRed,
+ ),
);
},
),
@@ -781,10 +749,9 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
Container(
width: double.infinity,
height: 1.5,
- color:
- Theme.of(context)
- .extension<StackColors>()!
- .backgroundAppBar,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .backgroundAppBar,
),
if (widget.requestedTotal != null)
Padding(
diff --git a/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart b/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart
index 57295f4..255c334 100644
--- a/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart
+++ b/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart
@@ -139,18 +139,16 @@ class _DesktopCoinControlUseDialogState
.map((e) => e.value)
.fold(
Amount(rawValue: BigInt.zero, fractionDigits: coin.fractionDigits),
- (value, element) =>
- value += Amount(
- rawValue: BigInt.from(element),
- fractionDigits: coin.fractionDigits,
- ),
+ (value, element) => value += Amount(
+ rawValue: BigInt.from(element),
+ fractionDigits: coin.fractionDigits,
+ ),
);
- final enableApply =
- widget.amountToSend == null
- ? selectedChanged(_selectedUTXOs)
- : selectedChanged(_selectedUTXOs) &&
- widget.amountToSend! <= selectedSum;
+ final enableApply = widget.amountToSend == null
+ ? selectedChanged(_selectedUTXOs)
+ : selectedChanged(_selectedUTXOs) &&
+ widget.amountToSend! <= selectedSum;
return DesktopDialog(
maxWidth: 700,
@@ -170,10 +168,9 @@ class _DesktopCoinControlUseDialogState
children: [
RoundedContainer(
color: Colors.transparent,
- borderColor:
- Theme.of(
- context,
- ).extension<StackColors>()!.textFieldDefaultBG,
+ borderColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.textFieldDefaultBG,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -205,56 +202,55 @@ class _DesktopCoinControlUseDialogState
_searchString = value;
});
},
- style: STextStyles.desktopTextExtraSmall(
- context,
- ).copyWith(
- color:
- Theme.of(context)
+ style: STextStyles.desktopTextExtraSmall(context)
+ .copyWith(
+ color: Theme.of(context)
.extension<StackColors>()!
.textFieldActiveText,
- height: 1.8,
- ),
- decoration: standardInputDecoration(
- "Search...",
- searchFieldFocusNode,
- context,
- desktopMed: true,
- ).copyWith(
- prefixIcon: Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 18,
+ height: 1.8,
),
- child: SvgPicture.asset(
- Assets.svg.search,
- width: 20,
- height: 20,
- ),
- ),
- suffixIcon:
- _searchController.text.isNotEmpty
+ decoration:
+ standardInputDecoration(
+ "Search...",
+ searchFieldFocusNode,
+ context,
+ desktopMed: true,
+ ).copyWith(
+ prefixIcon: Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 12,
+ vertical: 18,
+ ),
+ child: SvgPicture.asset(
+ Assets.svg.search,
+ width: 20,
+ height: 20,
+ ),
+ ),
+ suffixIcon: _searchController.text.isNotEmpty
? Padding(
- padding: const EdgeInsets.only(
- right: 0,
- ),
- child: UnconstrainedBox(
- child: Row(
- children: [
- TextFieldIconButton(
- child: const XIcon(),
- onTap: () async {
- setState(() {
- _searchController.text = "";
- _searchString = "";
- });
- },
- ),
- ],
+ padding: const EdgeInsets.only(
+ right: 0,
),
- ),
- )
+ child: UnconstrainedBox(
+ child: Row(
+ children: [
+ TextFieldIconButton(
+ child: const XIcon(),
+ onTap: () async {
+ setState(() {
+ _searchController.text =
+ "";
+ _searchString = "";
+ });
+ },
+ ),
+ ],
+ ),
+ ),
+ )
: null,
- ),
+ ),
),
),
),
@@ -264,14 +260,12 @@ class _DesktopCoinControlUseDialogState
width: 240,
child: Toggle(
isOn: _filter == CCFilter.frozen,
- onColor:
- Theme.of(context)
- .extension<StackColors>()!
- .rateTypeToggleDesktopColorOn,
- offColor:
- Theme.of(context)
- .extension<StackColors>()!
- .rateTypeToggleDesktopColorOff,
+ onColor: Theme.of(context)
+ .extension<StackColors>()!
+ .rateTypeToggleDesktopColorOn,
+ offColor: Theme.of(context)
+ .extension<StackColors>()!
+ .rateTypeToggleDesktopColorOff,
onIcon: Assets.svg.coinControl.unBlocked,
onText: "Available",
offIcon: Assets.svg.coinControl.blocked,
@@ -310,167 +304,151 @@ class _DesktopCoinControlUseDialogState
),
const SizedBox(height: 16),
Expanded(
- child:
- _list != null
- ? ListView.separated(
- shrinkWrap: true,
- primary: false,
- itemCount: _list!.length,
- separatorBuilder:
- (context, _) => const SizedBox(height: 10),
- itemBuilder: (context, index) {
- final utxo =
- MainDB.instance.isar.utxos
- .where()
- .idEqualTo(_list![index])
- .findFirstSync()!;
- final data = UtxoRowData(utxo.id, false);
- data.selected = _selectedUTXOsData.contains(
- data,
- );
+ child: _list != null
+ ? ListView.separated(
+ shrinkWrap: true,
+ primary: false,
+ itemCount: _list!.length,
+ separatorBuilder: (context, _) =>
+ const SizedBox(height: 10),
+ itemBuilder: (context, index) {
+ final utxo = MainDB.instance.isar.utxos
+ .where()
+ .idEqualTo(_list![index])
+ .findFirstSync()!;
+ final data = UtxoRowData(utxo.id, false);
+ data.selected = _selectedUTXOsData.contains(data);
- return UtxoRow(
- key: Key(
- "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
- ),
- data: data,
- compact: true,
- walletId: widget.walletId,
- onSelectionChanged: (value) {
- setState(() {
- if (data.selected) {
- _selectedUTXOsData.add(value);
- _selectedUTXOs.add(utxo);
- } else {
- _selectedUTXOsData.remove(value);
- _selectedUTXOs.remove(utxo);
- }
- });
- },
- );
- },
- )
- : ListView.separated(
- itemCount: _map!.entries.length,
- separatorBuilder:
- (context, _) => const SizedBox(height: 10),
- itemBuilder: (context, index) {
- final entry = _map!.entries.elementAt(index);
- final _controller = RotateIconController();
-
- return Expandable2(
- border:
- Theme.of(context)
- .extension<StackColors>()!
- .backgroundAppBar,
- background:
- Theme.of(
- context,
- ).extension<StackColors>()!.popupBG,
- animationDurationMultiplier:
- 0.2 * entry.value.length,
- onExpandWillChange: (state) {
- if (state == Expandable2State.expanded) {
- _controller.forward?.call();
+ return UtxoRow(
+ key: Key(
+ "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
+ ),
+ data: data,
+ compact: true,
+ walletId: widget.walletId,
+ onSelectionChanged: (value) {
+ setState(() {
+ if (data.selected) {
+ _selectedUTXOsData.add(value);
+ _selectedUTXOs.add(utxo);
} else {
- _controller.reverse?.call();
+ _selectedUTXOsData.remove(value);
+ _selectedUTXOs.remove(utxo);
}
- },
- header: RoundedContainer(
- padding: const EdgeInsets.all(20),
- color: Colors.transparent,
- child: Row(
- children: [
- SvgPicture.file(
- File(
- ref.watch(coinIconProvider(coin)),
- ),
- width: 24,
- height: 24,
- ),
- const SizedBox(width: 12),
- Expanded(
- flex: 3,
- child: Text(
- entry.key,
- style: STextStyles.w600_14(context),
- ),
+ });
+ },
+ );
+ },
+ )
+ : ListView.separated(
+ itemCount: _map!.entries.length,
+ separatorBuilder: (context, _) =>
+ const SizedBox(height: 10),
+ itemBuilder: (context, index) {
+ final entry = _map!.entries.elementAt(index);
+ final _controller = RotateIconController();
+
+ return Expandable2(
+ border: Theme.of(
+ context,
+ ).extension<StackColors>()!.backgroundAppBar,
+ background: Theme.of(
+ context,
+ ).extension<StackColors>()!.popupBG,
+ animationDurationMultiplier:
+ 0.2 * entry.value.length,
+ onExpandWillChange: (state) {
+ if (state == Expandable2State.expanded) {
+ _controller.forward?.call();
+ } else {
+ _controller.reverse?.call();
+ }
+ },
+ header: RoundedContainer(
+ padding: const EdgeInsets.all(20),
+ color: Colors.transparent,
+ child: Row(
+ children: [
+ SvgPicture.file(
+ File(ref.watch(coinIconProvider(coin))),
+ width: 24,
+ height: 24,
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ flex: 3,
+ child: Text(
+ entry.key,
+ style: STextStyles.w600_14(context),
),
- Expanded(
- child: Text(
- "${entry.value.length} "
- "output${entry.value.length > 1 ? "s" : ""}",
- style:
- STextStyles.desktopTextExtraExtraSmall(
- context,
- ),
- ),
+ ),
+ Expanded(
+ child: Text(
+ "${entry.value.length} "
+ "output${entry.value.length > 1 ? "s" : ""}",
+ style:
+ STextStyles.desktopTextExtraExtraSmall(
+ context,
+ ),
),
- RotateIcon(
- animationDurationMultiplier:
- 0.2 * entry.value.length,
- icon: SvgPicture.asset(
- Assets.svg.chevronDown,
- width: 14,
- color:
- Theme.of(context)
- .extension<StackColors>()!
- .textSubtitle1,
- ),
- curve: Curves.easeInOut,
- controller: _controller,
+ ),
+ RotateIcon(
+ animationDurationMultiplier:
+ 0.2 * entry.value.length,
+ icon: SvgPicture.asset(
+ Assets.svg.chevronDown,
+ width: 14,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .textSubtitle1,
),
- ],
- ),
+ curve: Curves.easeInOut,
+ controller: _controller,
+ ),
+ ],
),
- children:
- entry.value.map((id) {
- final utxo =
- MainDB.instance.isar.utxos
- .where()
- .idEqualTo(id)
- .findFirstSync()!;
- final data = UtxoRowData(
- utxo.id,
- false,
- );
- data.selected = _selectedUTXOsData
- .contains(data);
+ ),
+ children: entry.value.map((id) {
+ final utxo = MainDB.instance.isar.utxos
+ .where()
+ .idEqualTo(id)
+ .findFirstSync()!;
+ final data = UtxoRowData(utxo.id, false);
+ data.selected = _selectedUTXOsData.contains(
+ data,
+ );
- return UtxoRow(
- key: Key(
- "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
- ),
- data: data,
- compact: true,
- compactWithBorder: false,
- raiseOnSelected: false,
- walletId: widget.walletId,
- onSelectionChanged: (value) {
- setState(() {
- if (data.selected) {
- _selectedUTXOsData.add(value);
- _selectedUTXOs.add(utxo);
- } else {
- _selectedUTXOsData.remove(
- value,
- );
- _selectedUTXOs.remove(utxo);
- }
- });
- },
- );
- }).toList(),
- );
- },
- ),
+ return UtxoRow(
+ key: Key(
+ "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
+ ),
+ data: data,
+ compact: true,
+ compactWithBorder: false,
+ raiseOnSelected: false,
+ walletId: widget.walletId,
+ onSelectionChanged: (value) {
+ setState(() {
+ if (data.selected) {
+ _selectedUTXOsData.add(value);
+ _selectedUTXOs.add(utxo);
+ } else {
+ _selectedUTXOsData.remove(value);
+ _selectedUTXOs.remove(utxo);
+ }
+ });
+ },
+ );
+ }).toList(),
+ );
+ },
+ ),
),
const SizedBox(height: 16),
RoundedContainer(
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.textFieldDefaultBG,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textFieldDefaultBG,
padding: EdgeInsets.zero,
child: ConditionalParent(
condition: widget.amountToSend != null,
@@ -481,10 +459,9 @@ class _DesktopCoinControlUseDialogState
child,
Container(
height: 1.2,
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.popupBG,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.popupBG,
),
Padding(
padding: const EdgeInsets.all(16),
@@ -498,10 +475,9 @@ class _DesktopCoinControlUseDialogState
STextStyles.desktopTextExtraExtraSmall(
context,
).copyWith(
- color:
- Theme.of(context)
- .extension<StackColors>()!
- .textDark,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textDark,
),
),
SelectableText(
@@ -511,10 +487,9 @@ class _DesktopCoinControlUseDialogState
STextStyles.desktopTextExtraExtraSmall(
context,
).copyWith(
- color:
- Theme.of(context)
- .extension<StackColors>()!
- .textDark,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textDark,
),
),
],
@@ -530,33 +505,33 @@ class _DesktopCoinControlUseDialogState
children: [
Text(
"Selected amount",
- style: STextStyles.desktopTextExtraExtraSmall(
- context,
- ).copyWith(
- color:
- Theme.of(
+ style:
+ STextStyles.desktopTextExtraExtraSmall(
+ context,
+ ).copyWith(
+ color: Theme.of(
context,
).extension<StackColors>()!.textDark,
- ),
+ ),
),
SelectableText(
"${selectedSum.decimal.toStringAsFixed(coin.fractionDigits)} ${coin.ticker}",
- style: STextStyles.desktopTextExtraExtraSmall(
- context,
- ).copyWith(
- color:
- widget.amountToSend == null
+ style:
+ STextStyles.desktopTextExtraExtraSmall(
+ context,
+ ).copyWith(
+ color: widget.amountToSend == null
? Theme.of(
- context,
- ).extension<StackColors>()!.textDark
+ context,
+ ).extension<StackColors>()!.textDark
: selectedSum < widget.amountToSend!
? Theme.of(context)
- .extension<StackColors>()!
- .accentColorRed
+ .extension<StackColors>()!
+ .accentColorRed
: Theme.of(context)
- .extension<StackColors>()!
- .accentColorGreen,
- ),
+ .extension<StackColors>()!
+ .accentColorGreen,
+ ),
),
],
),
@@ -570,10 +545,9 @@ class _DesktopCoinControlUseDialogState
child: SecondaryButton(
enabled: _selectedUTXOsData.isNotEmpty,
buttonHeight: ButtonHeight.l,
- label:
- _selectedUTXOsData.isEmpty
- ? "Clear selection"
- : "Clear selection (${_selectedUTXOsData.length})",
+ label: _selectedUTXOsData.isEmpty
+ ? "Clear selection"
+ : "Clear selection (${_selectedUTXOsData.length})",
onPressed: () {
setState(() {
_selectedUTXOsData.clear();
diff --git a/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart b/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart
index e9f2b93..06c10a3 100644
--- a/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart
+++ b/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart
@@ -121,19 +121,17 @@ class _DesktopCoinControlViewState
const SizedBox(width: 32),
AppBarIconButton(
size: 32,
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.textFieldDefaultBG,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textFieldDefaultBG,
shadows: const [],
icon: SvgPicture.asset(
Assets.svg.arrowLeft,
width: 18,
height: 18,
- color:
- Theme.of(
- context,
- ).extension<StackColors>()!.topNavIconPrimary,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.topNavIconPrimary,
),
onPressed: Navigator.of(context).pop,
),
@@ -142,8 +140,9 @@ class _DesktopCoinControlViewState
Assets.svg.coinControl.gamePad,
width: 32,
height: 32,
- color:
- Theme.of(context).extension<StackColors>()!.textSubtitle1,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle1,
),
const SizedBox(width: 12),
Text("Coin control", style: STextStyles.desktopH3(context)),
@@ -174,54 +173,52 @@ class _DesktopCoinControlViewState
_searchString = value;
});
},
- style: STextStyles.desktopTextExtraSmall(
- context,
- ).copyWith(
- color:
- Theme.of(
+ style: STextStyles.desktopTextExtraSmall(context)
+ .copyWith(
+ color: Theme.of(
context,
).extension<StackColors>()!.textFieldActiveText,
- height: 1.8,
- ),
- decoration: standardInputDecoration(
- "Search...",
- searchFieldFocusNode,
- context,
- desktopMed: true,
- ).copyWith(
- prefixIcon: Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 18,
+ height: 1.8,
),
- child: SvgPicture.asset(
- Assets.svg.search,
- width: 20,
- height: 20,
- ),
- ),
- suffixIcon:
- _searchController.text.isNotEmpty
+ decoration:
+ standardInputDecoration(
+ "Search...",
+ searchFieldFocusNode,
+ context,
+ desktopMed: true,
+ ).copyWith(
+ prefixIcon: Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 12,
+ vertical: 18,
+ ),
+ child: SvgPicture.asset(
+ Assets.svg.search,
+ width: 20,
+ height: 20,
+ ),
+ ),
+ suffixIcon: _searchController.text.isNotEmpty
? Padding(
- padding: const EdgeInsets.only(right: 0),
- child: UnconstrainedBox(
- child: Row(
- children: [
- TextFieldIconButton(
- child: const XIcon(),
- onTap: () async {
- setState(() {
- _searchController.text = "";
- _searchString = "";
- });
- },
- ),
- ],
+ padding: const EdgeInsets.only(right: 0),
+ child: UnconstrainedBox(
+ child: Row(
+ children: [
+ TextFieldIconButton(
+ child: const XIcon(),
+ onTap: () async {
+ setState(() {
+ _searchController.text = "";
+ _searchString = "";
+ });
+ },
+ ),
+ ],
+ ),
),
- ),
- )
+ )
: null,
- ),
+ ),
),
),
),
@@ -245,10 +242,9 @@ class _DesktopCoinControlViewState
key: Key("${_selectedUTXOs.length}"),
selectedUTXOs: _selectedUTXOs,
),
- crossFadeState:
- _selectedUTXOs.isEmpty
- ? CrossFadeState.showFirst
- : CrossFadeState.showSecond,
+ crossFadeState: _selectedUTXOs.isEmpty
+ ? CrossFadeState.showFirst
+ : CrossFadeState.showSecond,
duration: const Duration(milliseconds: 200),
),
const SizedBox(width: 24),
@@ -273,10 +269,9 @@ class _DesktopCoinControlViewState
label: "Clear selection (${_selectedUTXOs.length})",
onPressed: () => setState(() => _selectedUTXOs.clear()),
),
- crossFadeState:
- _selectedUTXOs.isEmpty
- ? CrossFadeState.showFirst
- : CrossFadeState.showSecond,
+ crossFadeState: _selectedUTXOs.isEmpty
+ ? CrossFadeState.showFirst
+ : CrossFadeState.showSecond,
duration: const Duration(milliseconds: 200),
),
],
@@ -285,140 +280,132 @@ class _DesktopCoinControlViewState
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
- child:
- _list != null
- ? ListView.separated(
- itemCount: _list!.length,
- separatorBuilder:
- (context, _) => const SizedBox(height: 10),
- itemBuilder: (context, index) {
- final utxo =
- MainDB.instance.isar.utxos
- .where()
- .idEqualTo(_list![index])
- .findFirstSync()!;
- final data = UtxoRowData(utxo.id, false);
- data.selected = _selectedUTXOs.contains(data);
-
- return UtxoRow(
- key: Key(
- "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
- ),
- data: data,
- walletId: widget.walletId,
- onSelectionChanged: (value) {
- setState(() {
- if (data.selected) {
- _selectedUTXOs.add(value);
- } else {
- _selectedUTXOs.remove(value);
- }
- });
- },
- );
- },
- )
- : ListView.separated(
- itemCount: _map!.entries.length,
- separatorBuilder:
- (context, _) => const SizedBox(height: 10),
- itemBuilder: (context, index) {
- final entry = _map!.entries.elementAt(index);
- final _controller = RotateIconController();
+ child: _list != null
+ ? ListView.separated(
+ itemCount: _list!.length,
+ separatorBuilder: (context, _) =>
+ const SizedBox(height: 10),
+ itemBuilder: (context, index) {
+ final utxo = MainDB.instance.isar.utxos
+ .where()
+ .idEqualTo(_list![index])
+ .findFirstSync()!;
+ final data = UtxoRowData(utxo.id, false);
+ data.selected = _selectedUTXOs.contains(data);
- return Expandable2(
- border:
- Theme.of(
- context,
- ).extension<StackColors>()!.backgroundAppBar,
- background:
- Theme.of(
- context,
- ).extension<StackColors>()!.popupBG,
- animationDurationMultiplier:
- 0.2 * entry.value.length,
- onExpandWillChange: (state) {
- if (state == Expandable2State.expanded) {
- _controller.forward?.call();
+ return UtxoRow(
+ key: Key(
+ "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
+ ),
+ data: data,
+ walletId: widget.walletId,
+ onSelectionChanged: (value) {
+ setState(() {
+ if (data.selected) {
+ _selectedUTXOs.add(value);
} else {
- _controller.reverse?.call();
+ _selectedUTXOs.remove(value);
}
- },
- header: RoundedContainer(
- padding: const EdgeInsets.all(20),
- color: Colors.transparent,
- child: Row(
- children: [
- SvgPicture.file(
- File(ref.watch(coinIconProvider(coin))),
- width: 24,
- height: 24,
- ),
- const SizedBox(width: 12),
- Expanded(
- child: Text(
- entry.key,
- style: STextStyles.w600_14(context),
- ),
+ });
+ },
+ );
+ },
+ )
+ : ListView.separated(
+ itemCount: _map!.entries.length,
+ separatorBuilder: (context, _) =>
+ const SizedBox(height: 10),
+ itemBuilder: (context, index) {
+ final entry = _map!.entries.elementAt(index);
+ final _controller = RotateIconController();
+
+ return Expandable2(
+ border: Theme.of(
+ context,
+ ).extension<StackColors>()!.backgroundAppBar,
+ background: Theme.of(
+ context,
+ ).extension<StackColors>()!.popupBG,
+ animationDurationMultiplier: 0.2 * entry.value.length,
+ onExpandWillChange: (state) {
+ if (state == Expandable2State.expanded) {
+ _controller.forward?.call();
+ } else {
+ _controller.reverse?.call();
+ }
+ },
+ header: RoundedContainer(
+ padding: const EdgeInsets.all(20),
+ color: Colors.transparent,
+ child: Row(
+ children: [
+ SvgPicture.file(
+ File(ref.watch(coinIconProvider(coin))),
+ width: 24,
+ height: 24,
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ entry.key,
+ style: STextStyles.w600_14(context),
),
- Expanded(
- child: Text(
- "${entry.value.length} "
- "output${entry.value.length > 1 ? "s" : ""}",
- style:
- STextStyles.desktopTextExtraExtraSmall(
- context,
- ),
- ),
+ ),
+ Expanded(
+ child: Text(
+ "${entry.value.length} "
+ "output${entry.value.length > 1 ? "s" : ""}",
+ style:
+ STextStyles.desktopTextExtraExtraSmall(
+ context,
+ ),
),
- RotateIcon(
- animationDurationMultiplier:
- 0.2 * entry.value.length,
- icon: SvgPicture.asset(
- Assets.svg.chevronDown,
- width: 14,
- color:
- Theme.of(context)
- .extension<StackColors>()!
- .textSubtitle1,
- ),
- curve: Curves.easeInOut,
- controller: _controller,
+ ),
+ RotateIcon(
+ animationDurationMultiplier:
+ 0.2 * entry.value.length,
+ icon: SvgPicture.asset(
+ Assets.svg.chevronDown,
+ width: 14,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle1,
),
- ],
- ),
+ curve: Curves.easeInOut,
+ controller: _controller,
+ ),
+ ],
),
- children:
- entry.value.map((id) {
- final utxo =
- MainDB.instance.isar.utxos
- .where()
- .idEqualTo(id)
- .findFirstSync()!;
- final data = UtxoRowData(utxo.id, false);
- data.selected = _selectedUTXOs.contains(data);
+ ),
+ children: entry.value.map((id) {
+ final utxo = MainDB.instance.isar.utxos
+ .where()
+ .idEqualTo(id)
+ .findFirstSync()!;
+ final data = UtxoRowData(utxo.id, false);
+ data.selected = _selectedUTXOs.contains(data);
- return UtxoRow(
- key: Key(
- "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
- ),
- data: data,
- walletId: widget.walletId,
- raiseOnSelected: false,
- onSelectionChanged: (value) {
- setState(() {
- if (data.selected) {
- _selectedUTXOs.add(value);
- } else {
- _selectedUTXOs.remove(value);
- }
- });
- },
- );
- }).toList(),
- );
- },
- ),
+ return UtxoRow(
+ key: Key(
+ "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}",
+ ),
+ data: data,
+ walletId: widget.walletId,
+ raiseOnSelected: false,
+ onSelectionChanged: (value) {
+ setState(() {
+ if (data.selected) {
+ _selectedUTXOs.add(value);
+ } else {
+ _selectedUTXOs.remove(value);
+ }
+ });
+ },
+ );
+ }).toList(),
+ );
+ },
+ ),
),
),
],
diff --git a/lib/providers/exchange/exchange_form_state_provider.dart b/lib/providers/exchange/exchange_form_state_provider.dart
index f25414e..e9e73e9 100644
--- a/lib/providers/exchange/exchange_form_state_provider.dart
+++ b/lib/providers/exchange/exchange_form_state_provider.dart
@@ -21,17 +21,22 @@ import '../../utilities/amount/amount.dart';
import '../../utilities/enums/exchange_rate_type_enum.dart';
import '../global/locale_provider.dart';
-final efEstimatesListProvider = StateProvider.family<
- Tuple2<ExchangeResponse<List<Estimate>>, Range?>?,
- String>((ref, exchangeName) => null);
-
-final efRateTypeProvider =
- StateProvider<ExchangeRateType>((ref) => ExchangeRateType.estimated);
+final efEstimatesListProvider =
+ StateProvider.family<
+ Tuple2<ExchangeResponse<List<Estimate>>, Range?>?,
+ String
+ >((ref, exchangeName) => null);
+
+final efRateTypeProvider = StateProvider<ExchangeRateType>(
+ (ref) => ExchangeRateType.estimated,
+);
-final efExchangeProvider =
- StateProvider<Exchange>((ref) => Exchange.defaultExchange);
-final efExchangeProviderNameProvider =
- StateProvider<String>((ref) => Exchange.defaultExchange.name);
+final efExchangeProvider = StateProvider<Exchange>(
+ (ref) => Exchange.defaultExchange,
+);
+final efExchangeProviderNameProvider = StateProvider<String>(
+ (ref) => Exchange.defaultExchange.name,
+);
final currentCombinedExchangeIdProvider = Provider<String>((ref) {
return "${ref.watch(efExchangeProvider).name}"
@@ -92,10 +97,10 @@ final efEstimateProvider = StateProvider<Estimate?>((ref) {
?.item1
.value
?.where((e) {
- return e.exchangeProvider == provider &&
- e.fixedRate == fixedRate &&
- e.reversed == reversed;
- });
+ return e.exchangeProvider == provider &&
+ e.fixedRate == fixedRate &&
+ e.reversed == reversed;
+ });
Estimate? result;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.