Unverified Commit afda8153 authored by hangyu's avatar hangyu Committed by GitHub

Adjust Material 3 textfield padding to align with specs (#116225)

* Adjust textfield padding

* lint

* lint
parent fa063eb4
......@@ -2345,18 +2345,14 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
if (decoration.filled ?? false) {
contentPadding = decorationContentPadding ?? (decorationIsDense
? const EdgeInsets.fromLTRB(12.0, 8.0, 12.0, 8.0)
: themeData.useMaterial3
? const EdgeInsets.fromLTRB(12.0, 12.75, 12.0, 12.75)
: const EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 12.0));
: const EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 12.0));
} else {
// Not left or right padding for underline borders that aren't filled
// is a small concession to backwards compatibility. This eliminates
// the most noticeable layout change introduced by #13734.
contentPadding = decorationContentPadding ?? (decorationIsDense
? const EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0)
: themeData.useMaterial3
? const EdgeInsets.fromLTRB(0.0, 12.75, 0.0, 12.75)
: const EdgeInsets.fromLTRB(0.0, 12.0, 0.0, 12.0));
: const EdgeInsets.fromLTRB(0.0, 12.0, 0.0, 12.0));
}
} else {
floatingLabelHeight = 0.0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment