K
K
kokapuk2021-10-02 19:57:28
Dart
kokapuk, 2021-10-02 19:57:28

Why can't I create a TextField?

return Scaffold(
      backgroundColor: color_grey,
      body: SafeArea(
        child: Row(
          children: [
            TextField(
                obscureText: true,
                cursorColor: color_red,
                decoration: InputDecoration(
                  enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(5), borderSide: BorderSide(color: Colors.grey)),
                  focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(5), borderSide: BorderSide(color: color_red, width: 2))
                )
                
            ),
          ],
        ),
      )
      );

The studio automatically transfers me to
static _doThrowNew(int assertionStart, int assertionEnd, Object? message)
      native "AssertionError_throwNew";

in the errors_patch.dart file
I want to clarify that this only happens with TextField

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question