@@ -56,10 +56,9 @@ class _SelectableCustomFeeListItemState
5656 void _onValueChanged (String text) {
5757 final parsed = num .tryParse (text);
5858 if (parsed != null ) {
59- final fee =
60- _isAbsolute
61- ? NetworkFee .absolute (parsed.toInt ())
62- : NetworkFee .relative (parsed.toDouble ());
59+ final fee = _isAbsolute
60+ ? NetworkFee .absolute (parsed.toInt ())
61+ : NetworkFee .relative (parsed.toDouble ());
6362 setState (() {
6463 _customFee = fee;
6564 });
@@ -82,32 +81,29 @@ class _SelectableCustomFeeListItemState
8281 final fastestAbsValue = (feeOptions? .fastest.value ?? 0 ) * txSize;
8382 final economicAbsValue = (feeOptions? .economic.value ?? 0 ) * txSize;
8483 final slowAbsValue = (feeOptions? .slow.value ?? 0 ) * txSize;
85- final customAbsValue =
86- _customFee == null
87- ? 0
88- : _customFee is AbsoluteFee
89- ? _customFee! .value
90- : (_customFee? .value ?? 0 ) * txSize;
84+ final customAbsValue = _customFee == null
85+ ? 0
86+ : _customFee is AbsoluteFee
87+ ? _customFee! .value
88+ : (_customFee? .value ?? 0 ) * txSize;
9189 final fiatEq = ConvertAmount .satsToFiat (
9290 customAbsValue.toInt (),
9391 exchangeRate,
9492 );
9593
96- final subtitle1 =
97- _customFee == null || feeOptions == null
98- ? ''
99- : 'Estimated delivery ~ ${customAbsValue >= fastestAbsValue
100- ? context .loc .sendEstimatedDelivery10Minutes
101- : customAbsValue >= economicAbsValue
102- ? context .loc .sendEstimatedDelivery10to30Minutes
103- : customAbsValue >= slowAbsValue
104- ? context .loc .sendEstimatedDeliveryFewHours
105- : context .loc .sendEstimatedDeliveryHoursToDays }' ;
94+ final subtitle1 = _customFee == null || feeOptions == null
95+ ? ''
96+ : 'Estimated delivery ~ ${customAbsValue >= fastestAbsValue
97+ ? context .loc .sendEstimatedDelivery10Minutes
98+ : customAbsValue >= economicAbsValue
99+ ? context .loc .sendEstimatedDelivery10to30Minutes
100+ : customAbsValue >= slowAbsValue
101+ ? context .loc .sendEstimatedDeliveryFewHours
102+ : context .loc .sendEstimatedDeliveryHoursToDays }' ;
106103
107- final subtitle2 =
108- _customFee == null
109- ? ''
110- : '${_customFee !.value } ${_isAbsolute ? context .loc .sendSats : context .loc .sendSatsPerVB } = $customAbsValue ${context .loc .sendSats } (~ $fiatEq $fiatCurrencyCode )' ;
104+ final subtitle2 = _customFee == null
105+ ? ''
106+ : '${_customFee !.value } ${_isAbsolute ? context .loc .sendSats : context .loc .sendSatsPerVB } = $customAbsValue ${context .loc .sendSats } (~ $fiatEq $fiatCurrencyCode )' ;
111107
112108 Future <void > submitCustomFee () async {
113109 await context.read <SendCubit >().customFeesChanged (_customFee! );
@@ -139,7 +135,10 @@ class _SelectableCustomFeeListItemState
139135 child: Column (
140136 crossAxisAlignment: .stretch,
141137 children: [
142- BBText (context.loc.sendCustomFee, style: context.font.headlineLarge),
138+ BBText (
139+ context.loc.sendCustomFee,
140+ style: context.font.headlineLarge,
141+ ),
143142 if (subtitle1.isNotEmpty) ...[
144143 const Gap (4 ),
145144 BBText (subtitle1, style: context.font.labelMedium),
@@ -154,18 +153,19 @@ class _SelectableCustomFeeListItemState
154153 const Gap (8 ),
155154 Icon (
156155 Icons .radio_button_checked_outlined,
157- color:
158- isCustomFeeSelected
159- ? context.appColors.primary
160- : context.appColors.surface,
156+ color: isCustomFeeSelected
157+ ? context.appColors.primary
158+ : context.appColors.surface,
161159 ),
162160 ],
163161 ),
164162 const Gap (12 ),
165163 Row (
166164 children: [
167165 BBText (
168- _isAbsolute ? context.loc.sendAbsoluteFees : context.loc.sendRelativeFees,
166+ _isAbsolute
167+ ? context.loc.sendAbsoluteFees
168+ : context.loc.sendRelativeFees,
169169 style: context.font.bodySmall,
170170 ),
171171 const Spacer (),
@@ -185,9 +185,9 @@ class _SelectableCustomFeeListItemState
185185 else
186186 AmountInputFormatter (BitcoinUnit .btc.code),
187187 ],
188- style: context.font.bodyLarge ,
188+ style: TextStyle (color : context.appColors.onSecondary) ,
189189 decoration: InputDecoration (
190- fillColor: context.appColors.onPrimary ,
190+ fillColor: context.appColors.secondary ,
191191 filled: true ,
192192 border: OutlineInputBorder (
193193 borderRadius: BorderRadius .circular (8.0 ),
@@ -210,14 +210,15 @@ class _SelectableCustomFeeListItemState
210210 ),
211211 ),
212212 contentPadding: const EdgeInsets .symmetric (horizontal: 16.0 ),
213- hintText:
214- _isAbsolute
215- ? context.loc.sendEnterAbsoluteFee
216- : context.loc.sendEnterRelativeFee,
213+ hintText: _isAbsolute
214+ ? context.loc.sendEnterAbsoluteFee
215+ : context.loc.sendEnterRelativeFee,
217216 hintStyle: context.font.bodyMedium? .copyWith (
218217 color: context.appColors.outline,
219218 ),
220- suffixText: _isAbsolute ? context.loc.sendSats : context.loc.sendSatsPerVB,
219+ suffixText: _isAbsolute
220+ ? context.loc.sendSats
221+ : context.loc.sendSatsPerVB,
221222 ),
222223 onFieldSubmitted: (_) => submitCustomFee (),
223224 onChanged: _onValueChanged,
@@ -228,7 +229,7 @@ class _SelectableCustomFeeListItemState
228229 label: context.loc.sendConfirmCustomFee,
229230 onPressed: submitCustomFee,
230231 bgColor: context.appColors.secondary,
231- textColor: context.appColors.onPrimary ,
232+ textColor: context.appColors.onSecondary ,
232233 ),
233234 ],
234235 ),
0 commit comments