File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,6 @@ class TextFieldPage extends StatelessWidget {
53
53
Flexible (
54
54
child: PTheme .ios (
55
55
PTextField (
56
- iosDecoration: BoxDecoration (
57
- border: Border .all (color: Colors .red),
58
- borderRadius: BorderRadius .all (Radius .circular (8.0 )),
59
- ),
60
56
decoration: getInputDecoration ("iOS" ),
61
57
),
62
58
),
Original file line number Diff line number Diff line change @@ -161,10 +161,20 @@ class PTextField extends PlatformAdaptingWidget {
161
161
/// directly support it.
162
162
final hintStyle = decoration.hintStyle ??
163
163
TextStyle (color: Theme .of (context)? .hintColor);
164
+ final decorationBorder = decoration.border;
165
+ final iosDecoration = this .iosDecoration ??
166
+ // map the outline input border to the iosDecoration by default.
167
+ (decorationBorder is OutlineInputBorder
168
+ ? BoxDecoration (
169
+ border: Border .fromBorderSide (decorationBorder.borderSide),
170
+ color: decoration.fillColor,
171
+ borderRadius: decorationBorder.borderRadius,
172
+ )
173
+ : null );
164
174
return CupertinoTextField (
165
175
controller: this .controller,
166
176
focusNode: this .focusNode,
167
- decoration: this . iosDecoration,
177
+ decoration: iosDecoration,
168
178
padding: decoration.contentPadding ?? const EdgeInsets .all (6.0 ),
169
179
placeholder: decoration.hintText,
170
180
placeholderStyle: hintStyle,
You can’t perform that action at this time.
0 commit comments