#api #flutter #dart #mobile #webview
Вопрос:
Я хочу добавить определенный текст в веб-представление, которое я создал для вопросов, которые будут заполнены в API, включая ответы
class _MyHomeState extends State<MyHome> {
//WebViewController _controller;
//List pages = ["https://google.com", "https://apple.com"];
String question = '2 2 = ', answer = '4', defaultValue = 'nil';
List<String> options = ['16', '1', '4', '2'],
info = ['', '', '', ''],
radioValues=[];
List<Color> bgs = [Colors.black, Colors.black, Colors.black, Colors.black];
@override
void initState(){
super.initState();
radioValues.addAll(options);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Soal"),),
body: SingleChildScrollView(
child: Column(
children: <Widget>[
//Soal 1
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
constraints: BoxConstraints(maxHeight: 200,),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20)),
color: Color(0xffffffff)
),
child: WebView(
initialUrl: 'https://flutter.io',
),
),
),