Ism*_*eim 11 uitextfield dart android-studio flutter flutter-layout
我已经尝试了一切尝试更改文本字段的边框颜色,但似乎被忽略了。
我已经尝试过 sideBorder(甚至宽度也被忽略),hintStyle,将特定主题仅应用于此小部件,但它们似乎都被忽略了。
child: new Theme(
data: ThemeData(
primaryColor: Colors.white,
accentColor: Colors.white,
hintColor: Colors.white //This is Ignored,
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white) //This is Ignored
),
),
),
child: new TextField(
style: TextStyle(color: Colors.white, decorationColor: Colors.white),
cursorColor: Colors.white,
decoration: InputDecoration(
border: new OutlineInputBorder(
//borderRadius: const BorderRadius.all(Radius.circular(30.0)),
borderSide: BorderSide(color: Colors.white, width: 0.0) //This is Ignored,
),
hintText: "Search people",
),
),
//new Divider(color: Colors.white, height: 20),
)
Run Code Online (Sandbox Code Playgroud)
我想改变发际线的黑色边框并改变它的颜色和宽度。
die*_*per 18
使用enabledBorder
和focusedBorder
(当文本框聚焦时)
InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.red, width: 5.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue, width: 3.0),
),
hintText: "Search people",
),
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8222 次 |
最近记录: |