草庐IT

l_textField

全部标签

flutter - 从外部源向 TextField 添加文本

我在文本字段中添加了语音识别,它可以工作,但我无法设法将文本添加到文本字段中,有没有办法做到这一点。文本框看起来像这样:Widget_buildDescriptionTextField(productBloc){returnStreamBuilder(stream:productBloc.messageStream,builder:(context,snapshot){returnTextField(maxLines:3,controller:_controllerMessage,onChanged:productBloc.messageSink,decoration:InputDec

flutter - 如何对齐 TextFields 例如列中的文本()?

我正在尝试绘制一个对话框/弹出窗口,当用户点击谷歌地图中的标记时会显示该对话框/弹出窗口。问题是文本字段在对话框中没有对齐。您可以在下面的图片中看到它:所以,我想知道如何对齐文本,以便每个新文本都从垂直的一行开始。这是我的代码:child:Material(color:Colors.transparent,child:ScaleTransition(scale:scaleAnimation,child:Container(decoration:ShapeDecoration(color:Colors.blueGrey[900],shape:RoundedRectangleBorder(

flutter - 如何对齐 TextFields 例如列中的文本()?

我正在尝试绘制一个对话框/弹出窗口,当用户点击谷歌地图中的标记时会显示该对话框/弹出窗口。问题是文本字段在对话框中没有对齐。您可以在下面的图片中看到它:所以,我想知道如何对齐文本,以便每个新文本都从垂直的一行开始。这是我的代码:child:Material(color:Colors.transparent,child:ScaleTransition(scale:scaleAnimation,child:Container(decoration:ShapeDecoration(color:Colors.blueGrey[900],shape:RoundedRectangleBorder(

flutter - flutter如何让textfield动态显示多行?

我要实现的效果是初始文本域显示一行,当内容超过一行时,文本域显示两行。问题是文本字段的基线会向下移动,导致它被下面的小部件遮挡。我希望基线保持连续。代码:returnScaffold(appBar:AppBar(),body:Column(children:[ConstrainedBox(constraints:BoxConstraints(maxHeight:60.0),child:TextField(maxLines:null,maxLengthEnforced:false,keyboardType:TextInputType.multiline,),),Container(hei

flutter - flutter如何让textfield动态显示多行?

我要实现的效果是初始文本域显示一行,当内容超过一行时,文本域显示两行。问题是文本字段的基线会向下移动,导致它被下面的小部件遮挡。我希望基线保持连续。代码:returnScaffold(appBar:AppBar(),body:Column(children:[ConstrainedBox(constraints:BoxConstraints(maxHeight:60.0),child:TextField(maxLines:null,maxLengthEnforced:false,keyboardType:TextInputType.multiline,),),Container(hei

flutter - 如何让 Flutter TextField 接受多行?

如何让FlutterTextField接受多行?以下代码不起作用:body:Padding(child:Column(children:[Text('BIO'),Expanded(child:TextField(autofocus:false,controller:_text,//https://stackoverflow.com/a/46767771keyboardType:TextInputType.multiline,maxLength:null,),),],crossAxisAlignment:CrossAxisAlignment.start,),padding:constEd

flutter - 如何让 Flutter TextField 接受多行?

如何让FlutterTextField接受多行?以下代码不起作用:body:Padding(child:Column(children:[Text('BIO'),Expanded(child:TextField(autofocus:false,controller:_text,//https://stackoverflow.com/a/46767771keyboardType:TextInputType.multiline,maxLength:null,),),],crossAxisAlignment:CrossAxisAlignment.start,),padding:constEd

android - flutter : Errors when adding TextFields

请检查我下面的代码。import'package:flutter/material.dart';classLoginPageextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){//TODO:implementbuildreturnScaffold(body:Container(color:Colors.black,child:Column(children:[_buildTitle(),_buildInputFields()],),),);}Widget_buildTitle(){returnRow(main

android - flutter : Errors when adding TextFields

请检查我下面的代码。import'package:flutter/material.dart';classLoginPageextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){//TODO:implementbuildreturnScaffold(body:Container(color:Colors.black,child:Column(children:[_buildTitle(),_buildInputFields()],),),);}Widget_buildTitle(){returnRow(main

dart - 单击 TextField 小部件时 Flutter 小部件重建

我确定这是一个菜鸟错误,但我似乎无法弄清楚这个错误。在下面的应用程序中,当单击第二个路由中的文本字段时,键盘打开并立即关闭。经过仔细调查,似乎小部件在获得焦点时正在重建,导致路由重置,使用户无法输入文本。当我从表单中删除“键”时,问题就不会发生。这不是长期修复,因为我需要“key”才能验证表单。有什么想法吗?import'package:flutter/material.dart';voidmain()=>runApp(MyApp());classMyAppextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){