Flutter for web, can't type into a TextField

Issue

So I’m creating a flutter for web application. A little risky but I really just want an initial prototype, and hopefully by the time I need something production ready it’s in at least beta.

Anyways, I’m trying to create a login page, and I can’t actually enter anything into the TextFiled.

I’ve tried adding/removing the TextEdditingController and the input decoration. I’ve tried a TextField and a TextFormField as well

Widget loginWidget() {
    return Container(
      width: 650,
      child: Card(
        margin: EdgeInsets.all(5.0),
        color: UiColors.CardBlue,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            Row(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                MaterialButton(
                  minWidth: 300,
                  color: UiColors.CardBlue,
                  child: Text("Login", style: TextStyle(color: Colors.white),),
                  onPressed: (){}, // do nothing, this is already the login
                ),
                MaterialButton(
                  minWidth: 300,
                  elevation: 10,
                  color: UiColors.ButtonBlue,
                  child: Text("Register", style: TextStyle(color: Colors.white),),
                  onPressed: toggleLogin,
                )
              ],
            ),
            TextField(
              controller: usernameController,
              decoration: InputDecoration(
                border: InputBorder.none,
                labelText: "Email Address",
                hintText: "user@email.com"
              ),
            )
          ],
        ),
      ),
    );
  } 

EDIT: This only seems to effect firefox, works in chrome

Solution

In the github repo of flutter_web, it says

“The development workflow is only designed to work with Chrome at the moment.”
https://github.com/flutter/flutter_web

At this time, it looks like your prototype development is limited to a chrome browser.

Answered By – Alex Fallenstedt

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

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