浏览代码

fix

/siyaoH-1.17-PlatformMessage
siyao 4 年前
当前提交
7683b7a7
共有 1 个文件被更改,包括 1 次插入36 次删除
  1. 37
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/NavigationSample.cs

37
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/NavigationSample.cs


{
ui_.runApp(new MyApp());
}
class MyApp : StatelessWidget
{
public override Widget build(BuildContext context)

}
}
}
public class CustomButton : StatelessWidget {
public CustomButton(
Key key = null,
GestureTapCallback onPressed = null,
EdgeInsets padding = null,
Color backgroundColor = null,
Widget child = null
) : base(key: key) {
this.onPressed = onPressed;
this.padding = padding ?? EdgeInsets.all(8.0f);
this.backgroundColor = backgroundColor ?? Colors.white;
this.child = child;
}
public readonly GestureTapCallback onPressed;
public readonly EdgeInsets padding;
public readonly Widget child;
public readonly Color backgroundColor;
public override Widget build(BuildContext context) {
return new GestureDetector(
onTap: this.onPressed,
child: new Container(
padding: this.padding,
color: this.backgroundColor,
child: this.child
)
);
}
}
class HomeScreen : StatelessWidget {
public override Widget build(BuildContext context) {

正在加载...
取消
保存