From 13ed551e193668415fad961c484c2eec068a518c Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Sat, 17 Feb 2024 08:24:34 +0100 Subject: [PATCH] Update InputDecoration.contentPadding documentation (#143519) ## Description This PR updates the `InputDecoration.contentPadding` documentation to detail both Material 3 and Material 2 default values. ## Related Issue Follow-up to https://github.com/flutter/flutter/pull/142981. ## Tests Documentation only. --- .../lib/src/material/input_decorator.dart | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/flutter/lib/src/material/input_decorator.dart b/packages/flutter/lib/src/material/input_decorator.dart index 7a43704ba8..e2996d5579 100644 --- a/packages/flutter/lib/src/material/input_decorator.dart +++ b/packages/flutter/lib/src/material/input_decorator.dart @@ -2971,9 +2971,26 @@ class InputDecoration { /// /// If [isCollapsed] is true then [contentPadding] is [EdgeInsets.zero]. /// + /// ### Material 3 default content padding + /// + /// If `isOutline` property of [border] is false and if [filled] is true then + /// [contentPadding] is `EdgeInsets.fromLTRB(12, 4, 12, 4)` when [isDense] + /// is true and `EdgeInsets.fromLTRB(12, 8, 12, 8)` when [isDense] is false. + /// + /// If `isOutline` property of [border] is false and if [filled] is false then + /// [contentPadding] is `EdgeInsets.fromLTRB(0, 4, 0, 4)` when [isDense] is + /// true and `EdgeInsets.fromLTRB(0, 8, 0, 8)` when [isDense] is false. + /// + /// If `isOutline` property of [border] is true then [contentPadding] is + /// `EdgeInsets.fromLTRB(12, 16, 12, 8)` when [isDense] is true + /// and `EdgeInsets.fromLTRB(12, 20, 12, 12)` when [isDense] is false. + /// + /// ### Material 2 default content padding + /// /// If `isOutline` property of [border] is false and if [filled] is true then /// [contentPadding] is `EdgeInsets.fromLTRB(12, 8, 12, 8)` when [isDense] /// is true and `EdgeInsets.fromLTRB(12, 12, 12, 12)` when [isDense] is false. + /// /// If `isOutline` property of [border] is false and if [filled] is false then /// [contentPadding] is `EdgeInsets.fromLTRB(0, 8, 0, 8)` when [isDense] is /// true and `EdgeInsets.fromLTRB(0, 12, 0, 12)` when [isDense] is false.