Flutter TextField对齐
Flutter TextField align
我需要创建一个带有装饰的 TextFormField - counterText 和 labelText。我是这样做的:
new TextFormField(
decoration: new InputDecoration(
counterText: "some text",
labelText: header),
);
一切正常,除了我需要将计数器文本移到左侧,但默认情况下,它在右侧。怎么改?我知道有 counterStyle
参数,但我不知道如何使用它来实现向左移动文本。
helperText
属性正是您要找的。
我需要创建一个带有装饰的 TextFormField - counterText 和 labelText。我是这样做的:
new TextFormField(
decoration: new InputDecoration(
counterText: "some text",
labelText: header),
);
一切正常,除了我需要将计数器文本移到左侧,但默认情况下,它在右侧。怎么改?我知道有 counterStyle
参数,但我不知道如何使用它来实现向左移动文本。
helperText
属性正是您要找的。