Estou tendo problemas com esse código, quando executo aparece o seguinte erro:
"Unimplemented handling of missing static target".
O que pode ser? Como posso resolver esse problema?
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: null,
body: Container(
child: Center(
child: Radiobutton(),
))),
);
}
}
class Radiobutton extends StatefulWidget {
@override
RadioButtonWidget createState() => RadioButtonWidget();
}
class RadioButtonWidget extends State {
String radioItem = '';
Widget build(BuildContext context) {
return Column(
children: <Widget>[
RadioListTile(
groupValue: radioItem,
title: Text('Radio Button Item 1'),
value: 'Item 1',
onChanged: (val) {
setState(() {
radioItem = val;
});
},
),
RadioListTile(
groupValue: radioItem,
title: Text('Radio Button Item 2'),
value: 'Item 2',
onChanged: (val) {
setState(() {
radioItem = val;
});
},
),
],
);
}
}