Skip to content

InputDecorator: wrong input field width #52605

@fiorcode

Description

@fiorcode
Scaffold(
      backgroundColor: Colors.pink[200],
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Center(child: Text('Password')),
            const SizedBox(height: 10),
            TextField(
              autocorrect: false,
              controller: _passCtrler,
              decoration: InputDecoration(
                prefixIcon: InkWell(
                  child: Icon(
                    Icons.visibility,
                  ),
                  onTap: () {
                    setState(() {
                      _obscurePass = !_obscurePass;
                    });
                  },
                ),
                suffixIcon: InkWell(
                  child: Icon(Icons.clear),
                  onTap: () {
                    _passCtrler.clear();
                  },
                ),
              ),
              obscureText: _obscurePass,
              onChanged: (str) {
                _checkPassword();
              },
              style: TextStyle(fontSize: 20),
              textAlign: TextAlign.center,
            ),
          ],
        ),
      ),
    );

renders fine.
image
but adding "filled: true" property or getting the borders of the textfiled rounded makes looks like this:
image

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3found in release: 3.6Found to occur in 3.6frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions