Fox*_*ror 5 android text dart flutter
定义后是否可以String
从小Text()
部件获取值?
范例程式码
Text txt = Text("example text");
getValueFromtxt() {
var value = txt.text; <------
}
@override
Widget build(BuildContext context) {
return txt;
}
Run Code Online (Sandbox Code Playgroud)
我使用起来并不困难Text().data
:
Text txt = Text("example text");
getValueFromtxt() {
var value = txt.data; <------
}
@override
Widget build(BuildContext context) {
return txt;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3905 次 |
最近记录: |