您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

48 行
1.3 KiB

using Unity.UIWidgets.foundation;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
namespace Unity.UIWidgets.material {
public class BackButtonIcon : StatelessWidget {
public BackButtonIcon(
Key key = null) : base(key: key) {
}
static IconData _getIconData() {
return Icons.arrow_back;
}
public override Widget build(BuildContext context) {
return new Icon(_getIconData());
}
}
public class BackButton : StatelessWidget {
public BackButton(
Key key = null,
Color color = null) : base(key: key) {
this.color = color;
}
public readonly Color color;
public override Widget build(BuildContext context) {
return new IconButton(
icon: new BackButtonIcon(),
color: this.color,
onPressed: () => { Navigator.maybePop(context); });
}
}
public class CloseButton : StatelessWidget {
public CloseButton(
Key key = null) : base(key: key) {
}
public override Widget build(BuildContext context) {
return new IconButton(
icon: new Icon(Icons.close),
onPressed: () => { Navigator.maybePop(context); });
}
}
}