草庐IT

splashColor

全部标签

dart - 如何在 flutter 中只为 TextField 禁用 splashColor?

我正在尝试禁用TextField上的链式react。splashColor:Colors.transparent也消除了对其他小部件的涟漪效应。我只想去除TextField上的链式react。 最佳答案 试试这个方法,你只需要添加Theme到你的TextFieldTheme(data:Theme.of(context).copyWith(splashColor:Colors.transparent),child:TextField(),), 关于dart-如何在flutter中只为Tex

dart - 如何在 flutter 中只为 TextField 禁用 splashColor?

我正在尝试禁用TextField上的链式react。splashColor:Colors.transparent也消除了对其他小部件的涟漪效应。我只想去除TextField上的链式react。 最佳答案 试试这个方法,你只需要添加Theme到你的TextFieldTheme(data:Theme.of(context).copyWith(splashColor:Colors.transparent),child:TextField(),), 关于dart-如何在flutter中只为Tex