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 {
  State<MyApp> createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  List<TextEditingController> controllers = [TextEditingController()];

  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
            (index) => TextField(
              autofocus: true,
              controller: controllers[index],
              onSubmitted: (v) {
                setState(() {});

THIS IS THE ERROR I AM GETTING – https://pastebin.com/KmcHFs1X


i have experienced it,looks like this can help
enter link description here

Answered By – onair

Answer Checked By – Candace Johnson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *