improvement of SwitchTextListTile
This commit is contained in:
parent
0ef0bd1647
commit
77b86da493
2 changed files with 29 additions and 8 deletions
|
@ -115,7 +115,10 @@ class _SmartListFormPageState extends State<SmartListFormPage> {
|
|||
borderSide: BorderSide.none,
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.0)),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 8.0),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 4.0,
|
||||
horizontal: 8.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -133,7 +136,9 @@ class _SmartListFormPageState extends State<SmartListFormPage> {
|
|||
child: Observer(
|
||||
builder: (_) {
|
||||
final RangeValues _currentRangeValues = RangeValues(
|
||||
store.minLikeCount.toDouble(), store.maxLikeCount.toDouble());
|
||||
store.minLikeCount.toDouble(),
|
||||
store.maxLikeCount.toDouble(),
|
||||
);
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -363,7 +368,10 @@ class _SmartListFormPageState extends State<SmartListFormPage> {
|
|||
],
|
||||
),
|
||||
const Spacer(),
|
||||
const Icon(Icons.chevron_right_rounded),
|
||||
const SizedBox(
|
||||
width: 56.0,
|
||||
child: Icon(Icons.chevron_right_rounded),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -10,7 +10,7 @@ class SwitchTextListTile extends StatelessWidget {
|
|||
required this.onSwitchChanged,
|
||||
required this.textValue,
|
||||
required this.onTextChanged,
|
||||
this.errorText,
|
||||
this.errorText,
|
||||
}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
@ -33,11 +33,24 @@ class SwitchTextListTile extends StatelessWidget {
|
|||
onChanged: (bool value) => onSwitchChanged(value),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6.0),
|
||||
Text(title),
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () => onSwitchChanged(!switchValue),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
height: 48.0,
|
||||
child: Row(
|
||||
children: [
|
||||
const SizedBox(width: 6.0),
|
||||
Text(title),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 64.0,
|
||||
width: 56.0,
|
||||
child: TextFormField(
|
||||
enabled: switchValue,
|
||||
keyboardType: TextInputType.number,
|
||||
|
|
Loading…
Add table
Reference in a new issue