我在做一个单选按钮,然后我会面对这个错误//类型为"Object"的值无法分配给"SigningCharacter"类型的变量.try 更改变量的类型,或将右侧类型转换为"SigningCharacter"\
enum SigninCharacter { fill, outline }
class productOverVeiw extends StatefulWidget {
const productOverVeiw({Key? key}) : super(key: key);
@override
State<productOverVeiw> createState() => _productOverVeiwState();
}
class _productOverVeiwState extends State<productOverVeiw> {
SigninCharacter _character = SigninCharacter.fill;
Radio(
value: SigninCharacter.fill,
groupValue: _character,
activeColor: Colors.green,
onChanged: (value) {
setState(() {
_character = value ;//A value of type 'Object?' can't be assigned to a variable of type 'SigninCharacter'. Try changing the type of the variable, or casting the right-hand type to 'SigninCharacter'.\
});
})