Flutter支持miltiline在TextFormField上

时间:2019-08-01 04:46:35

标签: flutter

我在抖动<html> <head> <meta charset="utf-8"/> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script> <script src="JavaScript.js"></script> </head> <body ng-app="myapp"> <div class="Container"> <nav class="navbar navbar-default"> <ul class="navbar navbar-nav"> <li> <a href="#page1">Page 1</a> <a href="#page2">Page 2</a> <a href="#">Page 3</a> </li> </ul> </nav> </div> <div ng-view></div> <script> var app = angular.module("myapp", ["ngRoute"]); app.config(function ($routeProvider) { $routeProvider.when("/page1", { template: '<h1>Page 1</h1>' }) .when("/page2", { template: '<h1>Page 2</h1>' }) .otherwise({ template: '<h1> note found </h1>' }) }); </script> </body> </html>github上搜索了一些问题,以解决此问题

在下面的实现中,我无法输入stackoverflow来使Enter中有更多行,我认为我正确设置了TextFormFieldkeyboardType,但是我的键盘处于打开状态手机没有maxLines键,即enter

next

1 个答案:

答案 0 :(得分:2)

删除textInputAction: TextInputAction.next

TextFormField(
      textAlign: TextAlign.start,
      keyboardType: TextInputType.multiline,
      maxLines: 7,
      style: Theme.of(context).textTheme.caption.copyWith(
        color: Colors.black,
      ),
      //textInputAction: TextInputAction.next,
    );

或@Siddharth Patankar评论集textInputAction: TextInputAction.newline