lint: code lint

This commit is contained in:
Kuloud
2024-08-26 00:00:23 +08:00
parent 8c59ec203a
commit 43ecfb8ca1
10 changed files with 39 additions and 31 deletions

View File

@ -7,12 +7,11 @@ class AMapRadioGroup<T> extends StatefulWidget {
final Map<String, T>? radioValueMap;
final ValueChanged<T?>? onChanged;
AMapRadioGroup(
{Key? key,
{super.key,
this.groupLabel,
this.groupValue,
this.radioValueMap,
this.onChanged})
: super(key: key);
this.onChanged});
@override
_AMapRadioGroupState<T> createState() => _AMapRadioGroupState<T>();
@ -31,7 +30,7 @@ class _AMapRadioGroupState<T> extends State<AMapRadioGroup<T>> {
Widget build(BuildContext context) {
List<Widget> radioList = <Widget>[];
_groupValue = (widget.groupValue);
Widget _myRadio(String label, dynamic radioValue) {
Widget myRadio(String label, dynamic radioValue) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -39,11 +38,11 @@ class _AMapRadioGroupState<T> extends State<AMapRadioGroup<T>> {
Radio<T>(
value: radioValue,
groupValue: _groupValue,
onChanged: (T? _value) {
onChanged: (T? value) {
setState(() {
_groupValue = _value;
_groupValue = value;
});
widget.onChanged!(_value);
widget.onChanged!(value);
},
),
],
@ -52,7 +51,7 @@ class _AMapRadioGroupState<T> extends State<AMapRadioGroup<T>> {
if (widget.radioValueMap != null) {
widget.radioValueMap!.forEach((key, value) {
radioList.add(_myRadio(key, value));
radioList.add(myRadio(key, value));
});
}
return Container(