使用 Focus Node 的 Flutter Raised Button
Flutter Raised Button using Focus Node
我正在使用带有多个图标的 flutter 菜单,我想将其突出显示或为当前选定的应用程序保留边框,但我无法将其转移到其他图标,你能帮帮我吗?
new RaisedButton(
shape: new CircleBorder(
side: BorderSide(color: Colors.deepOrange, width: 5)),
padding: EdgeInsets.fromLTRB(5, 5, 5, 5),
onPressed: () {
_openApp();
},
child: ClipRRect(
borderRadius: BorderRadius.circular(40.0),
child: Image.asset(
"lib/assets/image/icons/open.png",
width: 80.0,
height: 80.0,
),
),
elevation: 100.0,
),
您可以使用 RaisedButton 小部件的 highlightColor 属性。这是如何完成的;
new RaisedButton(
shape: new CircleBorder(
side: BorderSide(color: Colors.deepOrange, width: 5)),
padding: EdgeInsets.fromLTRB(5, 5, 5, 5),
highlightColor: YOUR_PRESSED_COLOR, //Replace with actual colors
onPressed: () {
_openApp();
},
child: ClipRRect(
borderRadius: BorderRadius.circular(40.0),
child: Image.asset(
"lib/assets/image/icons/open.png",
width: 80.0,
height: 80.0,
),
),
elevation: 100.0,
),
我正在使用带有多个图标的 flutter 菜单,我想将其突出显示或为当前选定的应用程序保留边框,但我无法将其转移到其他图标,你能帮帮我吗?
new RaisedButton(
shape: new CircleBorder(
side: BorderSide(color: Colors.deepOrange, width: 5)),
padding: EdgeInsets.fromLTRB(5, 5, 5, 5),
onPressed: () {
_openApp();
},
child: ClipRRect(
borderRadius: BorderRadius.circular(40.0),
child: Image.asset(
"lib/assets/image/icons/open.png",
width: 80.0,
height: 80.0,
),
),
elevation: 100.0,
),
您可以使用 RaisedButton 小部件的 highlightColor 属性。这是如何完成的;
new RaisedButton(
shape: new CircleBorder(
side: BorderSide(color: Colors.deepOrange, width: 5)),
padding: EdgeInsets.fromLTRB(5, 5, 5, 5),
highlightColor: YOUR_PRESSED_COLOR, //Replace with actual colors
onPressed: () {
_openApp();
},
child: ClipRRect(
borderRadius: BorderRadius.circular(40.0),
child: Image.asset(
"lib/assets/image/icons/open.png",
width: 80.0,
height: 80.0,
),
),
elevation: 100.0,
),