如何解决我正在开发一个博客应用程序,如何在Flutter的TextFormField中插入诸如图像,音频,视频等媒体文件?
Container(
padding: const EdgeInsets.all(10.0),child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: double.infinity,),child: TextFormField(
textInputAction: TextInputAction.next,focusNode: titleFocusNode,decoration: InputDecoration(
counterStyle: TextStyle(color: Colors.white),alignLabelWithHint: true,labelStyle: TextStyle(
fontSize: titleFocusNode.hasFocus
? 24
: 18.0,//I believe the size difference here is 6.0 to account padding
color: titleFocusNode.hasFocus
? Colors.orange
: Colors.white),labelText: 'Title',filled: true,fillColor: Colors.black,enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10.0),borderSide: BorderSide(
color: Colors.grey,focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(15.0),borderSide: BorderSide(
color: Colors.orange,style: TextStyle(color: Colors.white,fontSize: 20),maxLength: 100,maxLines: null,onFieldSubmitted: (value) {
FocusScope.of(context)
.requestFocus(titleFocusNode);
},
我想设计一个博客应用程序。我想在文本表单字段中插入媒体文件,例如音频,视频,图像文件。我已经提到许多网站,但找不到任何东西。请帮助我...
This is what i want to achieve https://i.stack.imgur.com/Zwu9F.jpg
解决方法
恐怕Flutter不会立即执行此操作,但这并不意味着它无法执行此操作,您需要做的是创建可理解文本包含图像/媒体的代码就像堆栈溢出如何知道如何区分代码,链接和普通文本一样,也许this插件可以帮助您理解它,但这不是您想要的
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。