fixed format

Serhii-Borodenko committed Feb 7, 2022 at 00:17 UTC 68c33042192febc2dba741767f0fe5420eee376d
1 file changed +116 -111
lib/src/screens/exchange/widgets/exchange_card.dart
+116 -111
@@ -226,7 +226,7 @@ class ExchangeCardState extends State<ExchangeCard> {
226 .display1
227 .color,
228 borderRadius:
229 - BorderRadius.all(Radius.circular(6))),
229 + BorderRadius.all(Radius.circular(6))),
230 child: InkWell(
231 onTap: () => widget.allAmount?.call(),
232 child: Center(
@@ -303,121 +303,126 @@ class ExchangeCardState extends State<ExchangeCard> {
303 ? Padding(
304 padding: EdgeInsets.only(top: 20),
305 child: AddressTextField(
306 - focusNode: widget.addressFocusNode,
307 - controller: addressController,
308 - placeholder: widget.hasRefundAddress
309 - ? S.of(context).refund_address
310 - : null,
311 - options: [
312 - AddressTextFieldOption.paste,
313 - AddressTextFieldOption.qrCode,
314 - AddressTextFieldOption.addressBook,
315 - ],
316 - isBorderExist: false,
317 - textStyle: TextStyle(
318 - fontSize: 16,
319 - fontWeight: FontWeight.w600,
320 - color: Colors.white),
321 - hintStyle: TextStyle(
322 - fontSize: 16,
323 - fontWeight: FontWeight.w600,
324 - color: Theme.of(context)
325 - .accentTextTheme
326 - .display4
327 - .decorationColor),
328 - buttonColor: widget.addressButtonsColor,
329 - validator: widget.addressTextFieldValidator,
330 - onPushPasteButton: widget.onPushPasteButton,
331 - onPushAddressBookButton: widget.onPushAddressBookButton),
306 + focusNode: widget.addressFocusNode,
307 + controller: addressController,
308 + placeholder: widget.hasRefundAddress
309 + ? S.of(context).refund_address
310 + : null,
311 + options: [
312 + AddressTextFieldOption.paste,
313 + AddressTextFieldOption.qrCode,
314 + AddressTextFieldOption.addressBook,
315 + ],
316 + isBorderExist: false,
317 + textStyle: TextStyle(
318 + fontSize: 16,
319 + fontWeight: FontWeight.w600,
320 + color: Colors.white),
321 + hintStyle: TextStyle(
322 + fontSize: 16,
323 + fontWeight: FontWeight.w600,
324 + color: Theme.of(context)
325 + .accentTextTheme
326 + .display4
327 + .decorationColor),
328 + buttonColor: widget.addressButtonsColor,
329 + validator: widget.addressTextFieldValidator,
330 + onPushPasteButton: widget.onPushPasteButton,
331 + onPushAddressBookButton: widget.onPushAddressBookButton
332 + ),
333 )
334 : Padding(
335 padding: EdgeInsets.only(top: 10),
336 child: Builder(
336 - builder: (context) => Stack(children: <Widget>[
337 - BaseTextFormField(
338 - controller: addressController,
339 - readOnly: true,
340 - borderColor: Colors.transparent,
341 - suffixIcon:
342 - SizedBox(width: _isMoneroWallet ? 80 : 36),
343 - textStyle: TextStyle(
344 - fontSize: 16,
345 - fontWeight: FontWeight.w600,
346 - color: Colors.white),
347 - validator: widget.addressTextFieldValidator),
348 - Positioned(
349 - top: 2,
350 - right: 0,
351 - child: SizedBox(
352 - width: _isMoneroWallet ? 80 : 36,
353 - child: Row(children: <Widget>[
354 - if (_isMoneroWallet)
355 - Padding(
356 - padding: EdgeInsets.only(left: 10),
357 - child: Container(
358 - width: 34,
359 - height: 34,
360 - padding: EdgeInsets.only(top: 0),
361 - child: InkWell(
362 - onTap: () async {
363 - final contact =
364 - await Navigator.of(context,
365 - rootNavigator: true)
366 - .pushNamed(Routes
367 - .pickerAddressBook);
337 + builder: (context) => Stack(
338 + children: <Widget> [
339 + BaseTextFormField(
340 + controller: addressController,
341 + readOnly: true,
342 + borderColor: Colors.transparent,
343 + suffixIcon: SizedBox(
344 + width: _isMoneroWallet ? 80 : 36
345 + ),
346 + textStyle: TextStyle(
347 + fontSize: 16,
348 + fontWeight: FontWeight.w600,
349 + color: Colors.white),
350 + validator: widget.addressTextFieldValidator
351 + ),
352 + Positioned(
353 + top: 2,
354 + right: 0,
355 + child: SizedBox(
356 + width: _isMoneroWallet ? 80 : 36,
357 + child: Row(
358 + children: <Widget>[
359 + if (_isMoneroWallet) Padding(
360 + padding: EdgeInsets.only(left: 10),
361 + child: Container(
362 + width: 34,
363 + height: 34,
364 + padding: EdgeInsets.only(top: 0),
365 + child: InkWell(
366 + onTap: () async {
367 + final contact = await Navigator
368 + .of(context, rootNavigator: true)
369 + .pushNamed(
370 + Routes.pickerAddressBook);
371
369 - if (contact is ContactBase &&
370 - contact.address != null) {
371 - setState(() =>
372 - addressController.text =
373 - contact.address);
374 - widget.onPushAddressBookButton
375 - ?.call(context);
376 - }
377 - },
378 - child: Container(
379 - padding: EdgeInsets.all(8),
380 - decoration: BoxDecoration(
381 - color: widget
382 - .addressButtonsColor,
383 - borderRadius:
384 - BorderRadius.all(
385 - Radius.circular(
386 - 6))),
387 - child: Image.asset(
388 - 'assets/images/open_book.png',
389 - color: Theme.of(context)
390 - .primaryTextTheme
391 - .display1
392 - .decorationColor,
393 - )),
394 - )),
395 - ),
396 - Padding(
397 - padding: EdgeInsets.only(left: 2),
398 - child: Container(
399 - width: 34,
400 - height: 34,
401 - padding: EdgeInsets.only(top: 0),
402 - child: InkWell(
403 - onTap: () {
404 - Clipboard.setData(ClipboardData(
405 - text: addressController
406 - .text));
407 - showBar<void>(
408 - context,
409 - S
410 - .of(context)
411 - .copied_to_clipboard);
412 - },
413 - child: Container(
414 - padding: EdgeInsets.fromLTRB(
415 - 8, 8, 0, 8),
416 - color: Colors.transparent,
417 - child: copyImage),
418 - )))
419 - ])))
420 - ])),
372 + if (contact is ContactBase &&
373 + contact.address != null) {
374 + setState(() =>
375 + addressController.text =
376 + contact.address);
377 + widget.onPushAddressBookButton
378 + ?.call(context);
379 + }
380 + },
381 + child: Container(
382 + padding: EdgeInsets.all(8),
383 + decoration: BoxDecoration(
384 + color: widget
385 + .addressButtonsColor,
386 + borderRadius: BorderRadius
387 + .all(Radius.circular(6))),
388 + child: Image.asset(
389 + 'assets/images/open_book.png',
390 + color: Theme.of(context)
391 + .primaryTextTheme
392 + .display1
393 + .decorationColor,
394 + )),
395 + )),
396 + ),
397 + Padding(
398 + padding: EdgeInsets.only(left: 2),
399 + child: Container(
400 + width: 34,
401 + height: 34,
402 + padding: EdgeInsets.only(top: 0),
403 + child: InkWell(
404 + onTap: () {
405 + Clipboard.setData(
406 + ClipboardData(
407 + text: addressController.text));
408 + showBar<void>(
409 + context, S.of(context)
410 + .copied_to_clipboard);
411 + },
412 + child: Container(
413 + padding: EdgeInsets
414 + .fromLTRB(8, 8, 0, 8),
415 + color: Colors.transparent,
416 + child: copyImage),
417 + ))
418 + )
419 + ]
420 + )
421 + )
422 + )
423 + ]
424 + )
425 + ),
426 ),
427 ]),
428 );