https://codelabs.developers.google.com/codelabs/flutter/index.html#5 ํ์ด์ง ํ๋ก์ฐ
๋ด ์ฝ๋๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค
```
์์ ฏ _setupBody() {
์ ์ด ๋ฐํ(
์ด๋ฆฐ์ด๋ค:
์๋ก์ด ํ์ฅ(
์์: ์๋ก์ด ListView.builder(
itemBuilder: (_nothing, int ์ธ๋ฑ์ค) => _messageList[์ธ๋ฑ์ค],
๋ฐ์ : ์ฌ์ค,
itemCount: _messageList.length,
),
),
์๋ก์ด ๋๋ฐ์ด๋(๋์ด: 1.0),
์ ์ปจํ
์ด๋(
ํจ๋ฉ: const EdgeInsets.symmetric(์ํ: 5.0),
//์ฅ์: ์๋ก์ด BoxDecoration(color: Theme.of(context).cardColor,),
์์: ์ ํ(
์ด๋ฆฐ์ด๋ค:
์๋ก์ด ์ ์ฐํ(
์์: ์๋ก์ด TextField(
์ต๋ ๋ผ์ธ: 1,
์ปจํธ๋กค๋ฌ: _myController,
onSubmitted: _handleSubmitted,
์ฅ์: ์๋ก์ด InputDecoration.collapsed(hintText: "์ฌ๊ธฐ์ ์
๋ ฅ"),
),
),
์๋ก์ด ์์ด์ฝํ
๋ง(
๋ฐ์ดํฐ: ์๋ก์ด IconThemeData(์์: Theme.of(context).accentColor),
์์: 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(Mac OS X 10.12.4 16E195, ๋ก์ผ์ผ zh-Hans-CN, ์ฑ๋ ์ํ)
โข Flutter์ /Users/cjz/ALL_IN_THIS/flutter
โข ํ๋ ์์ํฌ ๊ฐ์ ํ e8aa40eddd(7์ผ ์ ), 2017-10-17 15:42:40 -0700
โข ์์ง ๊ฐ์ ํ 7c4142808c
โข ๋๊ตฌ ๋คํธ ๋ฒ์ 1.25.0-dev.11.0
[โ] Android ํด์ฒด์ธ - Android ๊ธฐ๊ธฐ์ฉ ๊ฐ๋ฐ(Android SDK 26.0.2)
โข /Users/cjz/ALL_IN_THIS/Android/sdk์ Android SDK
โข ํ๋ซํผ android-26, ๋น๋ ๋๊ตฌ 26.0.2
โข ANDROID_HOME = /Users/cjz/ALL_IN_THIS/Android/sdk
โข Java ๋ฐ์ด๋๋ฆฌ: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
โข Java ๋ฒ์ OpenJDK ๋ฐํ์ ํ๊ฒฝ(๋น๋ 1.8.0_152-release-915-b08)
[โ] iOS ํด์ฒด์ธ - iOS ๊ธฐ๊ธฐ์ฉ ๊ฐ๋ฐ(Xcode 8.3.2)
โข /Applications/Xcode.app/Contents/Developer์ Xcode
โข Xcode 8.3.2, ๋น๋ ๋ฒ์ 8E2002
โข ios ๋ฐฐํฌ 1.9.2
โข CocoaPods ๋ฒ์ 1.3.1
[โ] ์๋๋ก์ด๋ ์คํ๋์ค(๋ฒ์ 3.0)
โข /Applications/Android Studio.app/Contents์ Android ์คํ๋์ค
โข Java ๋ฒ์ OpenJDK ๋ฐํ์ ํ๊ฒฝ(๋น๋ 1.8.0_152-release-915-b08)
[โ] ์ฐ๊ฒฐ๋ ์ฅ์น
โข x86์ฉ์ผ๋ก ๋น๋๋ Android SDK โข emulator-5554 โข android-x86 โข Android 5.1.1(API 22)(์๋ฎฌ๋ ์ดํฐ)
โข iPhone SE โข 795AA980-157D-455C-AC52-385CBDDC3BDE โข ios โข iOS 10.3(์๋ฎฌ๋ ์ดํฐ)
```
@cjztool , ๊ทธ๋ฅ ์์น ํ๊ณ ์ถ๋ค๋ฉด Container
ํด๋์ค๋ฅผ ์ฌ์ฉํ๋ ๋์ Material
ํด๋์ค๋ก ๋ํํ ์ ์์ต๋๋ค.
์ ๋ ์ด๋ณด์์
๋๋ค, ์ ๋ง ๊ฐ์ฌํฉ๋๋ค! ์ ํ์ด! @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์ ๋๋ผ์ด ํํ์ ๋๋ค! ๋ฐฉ๊ธ ํํ์ด์ง์ ์ฌ์ฉ ๋ ํ์๋ฅผ ๋ฐ๊ฒฌํ์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ ๋ ์ด๋ณด์์ ๋๋ค, ์ ๋ง ๊ฐ์ฌํฉ๋๋ค! ์ ํ์ด! @mchome