fix exchange provider selector

This commit is contained in:
Serhii 2023-09-13 15:35:08 +03:00
parent c868a7f822
commit 9f2d118224
3 changed files with 33 additions and 39 deletions

View file

@ -183,9 +183,6 @@ class ExchangePage extends BasePage {
children: [
StandardCheckbox(
value: exchangeViewModel.isFixedRateMode,
gradientBackground: true,
borderColor: Theme.of(context).dividerColor,
iconColor: Colors.white,
caption: S.of(context).fixed_rate,
onChanged: (value) => exchangeViewModel.isFixedRateMode = value,
),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/src/widgets/standard_checkbox.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
@ -118,35 +119,38 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
height: 55,
color: Theme.of(context).dialogTheme.backgroundColor,
padding: EdgeInsets.only(left: 24, right: 24),
child: CheckboxListTile(
value: item.value,
activeColor: item.value
? Palette.blueCraiola
: Theme.of(context).extension<FilterTheme>()!.checkboxBackgroundColor,
checkColor: Colors.white,
title: widget.displayItem?.call(item) ??
Text(
item.title,
style: TextStyle(
fontSize: 14,
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: item.isDisabled
? Colors.grey.withOpacity(0.5)
: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none,
),
),
onChanged: (bool? value) {
if (value == null) {
return;
}
child: Row(
children: [
StandardCheckbox(
value: item.value,
gradientBackground: true,
borderColor: Theme.of(context).dividerColor,
iconColor: Colors.white,
onChanged: (bool? value) {
if (value == null) {
return;
}
item.value = value;
widget.onChanged(index, value);
setState(() {});
},
controlAffinity: ListTileControlAffinity.leading,
item.value = value;
widget.onChanged(index, value);
setState(() {});
},
),
SizedBox(width: 16),
widget.displayItem?.call(item) ??
Text(
item.title,
style: TextStyle(
fontSize: 14,
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: item.isDisabled
? Colors.grey.withOpacity(0.5)
: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none,
),
)
],
),
),
);

View file

@ -3,7 +3,6 @@
import 'dart:math';
import 'package:cake_wallet/src/widgets/search_bar_widget.dart';
import 'package:cake_wallet/src/widgets/standard_checkbox.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:flutter/material.dart';
import 'package:cw_core/currency.dart';
@ -384,13 +383,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
),
),
),
StandardCheckbox(
value: true,
gradientBackground: true,
borderColor: Theme.of(context).dividerColor,
iconColor: Colors.white,
onChanged: (value) {},
)
Icon(Icons.check_circle, color: Theme.of(context).primaryColor),
],
),
),