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

45 行
1.4 KiB

using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.widgets;
namespace UIWidgetsSample
{
public class SendButton : StatelessWidget
{
/// Callback for send button tap event
public readonly OnPressed onPressed;
/// Creates send button widget
public SendButton(
OnPressed onPressed,
Key key = null
) : base(key)
{
this.onPressed = onPressed;
}
public override Widget build(BuildContext context)
{
Widget icon = InheritedChatTheme.of(context).theme.sendButtonIcon != null
? InheritedChatTheme.of(context).theme.sendButtonIcon
: Image.file(
"assets/icon-send.png",
color: InheritedChatTheme.of(context).theme.inputTextColor,
scale: 1
);
var tooltip = InheritedL10n.of(context).l10n?.sendButtonAccessibilityLabel;
return new Container(
height: 14,
//margin: EdgeInsets.only(16),
width: 24,
child: new IconButton(
icon: icon,
onPressed: () => { onPressed(); },
padding: EdgeInsets.zero,
tooltip: tooltip
)
);
}
}
}