Siga a página https://codelabs.developers.google.com/codelabs/flutter/index.html#5
meu código é:
```
Widget _setupBody() {
retornar nova Coluna(
crianças:
novo Expandido(
filho: new ListView.builder(
itemBuilder: (_nothing, int index) => _messageList[index],
reverso: verdadeiro,
itemCount: _messageList.length,
),
),
novo divisor (altura: 1,0),
novo Contêiner(
preenchimento: const EdgeInsets.symmetric(horizontal: 5.0),
//decoração: new BoxDecoration(color: Theme.of(context).cardColor,),
filho: nova linha(
crianças:
novo Flexível(
filho: new TextField(
maxLinhas: 1,
controlador: _myController,
onSubmitted: _handleSubmitt,
decoração: new InputDecoration.collapsed(hintText: "input here"),
),
),
novo IconTheme(
data: new IconThemeData(color: Theme.of(context).accentColor),
child: new IconButton(icon: new Icon(Icons.send), onPressed: () => _handleSubmitt(_myController.text)))
],
))
],
);
}
then it shown like this:
![screenflow](https://user-images.githubusercontent.com/3993323/31986228-425b9d68-b92d-11e7-8176-de3deab993c2.gif)
after add the decoration (uncomment the line 14)
![screenflow2](https://user-images.githubusercontent.com/3993323/31986425-0dcfe8b4-b92e-11e7-90ae-52664835cd4b.gif)
as you see, the boxdecoration hide the ripple.
from the code , i think , the boxdexcoration should be rendered first.
How to change the code makes the ripple at front of the boxdexcoration?
## Flutter Doctor
[✓] Flutter (no Mac OS X 10.12.4 16E195, localidade zh-Hans-CN, canal alfa)
• Flutter em /Users/cjz/ALL_IN_THIS/flutter
• Revisão da estrutura e8aa40eddd (7 dias atrás), 17/10/2017 15:42:40 -0700
• Revisão do motor 7c4142808c
• Ferramentas Dart versão 1.25.0-dev.11.0
[✓] Cadeia de ferramentas Android - desenvolver para dispositivos Android (Android SDK 26.0.2)
• SDK do Android em /Users/cjz/ALL_IN_THIS/Android/sdk
• Plataforma android-26, ferramentas de construção 26.0.2
• ANDROID_HOME = /Users/cjz/ALL_IN_THIS/Android/sdk
• Binário Java em: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Versão Java OpenJDK Runtime Environment (compilação 1.8.0_152-release-915-b08)
[✓] Cadeia de ferramentas iOS - desenvolver para dispositivos iOS (Xcode 8.3.2)
• Xcode em /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.2, versão de compilação 8E2002
• ios-deploy 1.9.2
• CocoaPods versão 1.3.1
[✓] Android Studio (versão 3.0)
• Android Studio em /Applications/Android Studio.app/Contents
• Versão Java OpenJDK Runtime Environment (compilação 1.8.0_152-release-915-b08)
[✓] Dispositivos conectados
• Android SDK criado para x86 • emulador-5554 • android-x86 • Android 5.1.1 (API 22) (emulador)
• iPhone SE • 795AA980-157D-455C-AC52-385CBDDC3BDE • ios • iOS 10.3 (simulador)
```
ei @cjztool , você pode envolvê-lo em uma classe Material
vez de usar a classe Container
se quiser apenas colori-lo.
Eu sou um novato, muito obrigado! Bom trabalho! @mchome
Widget _setupBody() {
return new Column(
children: <Widget>[
new Expanded(
child: new ListView.builder(
itemBuilder: (_nothing, int index) => _messageList[index],
reverse: true,
itemCount: _messageList.length,
),
),
new Divider(height: 1.0),
new Material(
color: Theme.of(context).cardColor,
//child: new Container(
// padding: const EdgeInsets.symmetric(horizontal: 5.0),
child: new Row(
children: <Widget>[
new Flexible(
child: new TextField(
maxLines: 1,
controller: _myController,
onSubmitted: _handleSubmitt,
onChanged: (String text) {
setState(() {
_isComposing = text.length > 0;
});
},
decoration: new InputDecoration.collapsed(hintText: "input here"),
),
),
new IconTheme(
data: new IconThemeData(color: Theme.of(context).accentColor),
child: Theme.of(context).platform == TargetPlatform.iOS
? new CupertinoButton(child: new Text("Send"), onPressed: _isComposing ? () => _handleSubmitt(_myController.text) : null)
: new IconButton(icon: new Icon(Icons.send), onPressed: _isComposing ? () => _handleSubmitt(_myController.text) : null))
],
),
// decoration: new BoxDecoration(
// color: Theme.of(context).cardColor,
// ),
// ),
),
],
);
}
@mchome é incrível haha! Acabei de descobrir os caracteres chineses usados na sua página inicial.
Comentários muito úteis
Eu sou um novato, muito obrigado! Bom trabalho! @mchome