浏览代码

Test Material Themes.

/main
Yuncong Zhang 6 年前
当前提交
ca8147fa
共有 2 个文件被更改,包括 25 次插入3 次删除
  1. 4
      Runtime/material/card_theme.cs
  2. 24
      Samples/UIWidgetSample/MaterialThemeSample.cs

4
Runtime/material/card_theme.cs


ShapeBorder shape = null
) {
return new CardTheme(
clipBehavior: this.clipBehavior ?? this.clipBehavior,
clipBehavior: clipBehavior ?? this.clipBehavior,
elevation: this.elevation ?? this.elevation,
elevation: elevation ?? this.elevation,
margin: margin ?? this.margin,
shape: shape ?? this.shape
);

24
Samples/UIWidgetSample/MaterialThemeSample.cs


using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using Image = Unity.UIWidgets.widgets.Image;
namespace UIWidgetsSample {
public class MaterialThemeSample: UIWidgetsSamplePanel {

),
cardTheme: new CardTheme(
color: Colors.red,
elevation: 6.0f
elevation: 2.0f
body: new Center(
child: new Card(
shape: new RoundedRectangleBorder(
borderRadius: BorderRadius.all(5.0f)
),
child: new Container(
height: 250,
child: new Column(
children: new List<Widget> {
Image.asset(
"products/backpack",
fit: BoxFit.cover,
width: 200,
height: 200
),
new Text("Card Theme")
}
)
)
)
),
bottomNavigationBar: new BottomAppBar(
child: new Row(
mainAxisSize: MainAxisSize.max,

正在加载...
取消
保存