'Flutter Program Works on Web but Not Running on Android Device
This Flutter program works in on the Web, but doesn't on Android
How do I fix the code to run this on Android Device.
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
import 'dart:html';
void main() => runApp(MaterialApp(home: MyApp()));
class MyApp extends StatefulWidget {
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
List<TextEditingController> controllers = [TextEditingController()];
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
...List.generate(
controllers.length,
(index) => TextField(
autofocus: true,
controller: controllers[index],
onSubmitted: (v) {
controllers.add(TextEditingController());
setState(() {});
},
),
),
],
),
);
}
}
THIS IS THE ERROR I AM GETTING - https://pastebin.com/KmcHFs1X
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
