浏览代码

Update expansion tile and flexible space bar. Fix bottom app bar demo.

/main
Yuncong Zhang 5 年前
当前提交
79633ac6
共有 3 个文件被更改,包括 16 次插入14 次删除
  1. 11
      Runtime/material/expansion_tile.cs
  2. 17
      Runtime/material/flexible_space_bar.cs
  3. 2
      Samples/UIWidgetsGallery/demo/material/bottom_app_bar_demo.cs

11
Runtime/material/expansion_tile.cs


Widget _buildChildren(BuildContext context, Widget child) {
Color borderSideColor = this._borderColor.value ?? Colors.transparent;
Color titleColor = this._headerColor.value;
return new Container(
decoration: new BoxDecoration(

child: new Column(
mainAxisSize: MainAxisSize.min,
children: new List<Widget> {
IconTheme.merge(
data: new IconThemeData(color: this._iconColor.value),
ListTileTheme.merge(
iconColor: this._iconColor.value,
textColor: this._headerColor.value,
title: new DefaultTextStyle(
style: Theme.of(this.context).textTheme.subhead.copyWith(color: titleColor),
child: this.widget.title
),
title: this.widget.title,
trailing: this.widget.trailing ?? new RotationTransition(
turns: this._iconTurns,
child: new Icon(Icons.expand_more)

17
Runtime/material/flexible_space_bar.cs


Widget title = null,
Widget background = null,
bool? centerTitle = null,
EdgeInsets titlePadding = null,
this.titlePadding = titlePadding;
this.collapseMode = collapseMode;
}

public readonly bool? centerTitle;
public readonly EdgeInsets titlePadding;
public static Widget createSettings(
float? toolbarOpacity = null,

color: titleStyle.color.withOpacity(toolbarOpacity));
bool effectiveCenterTitle = this._getEffectiveCenterTitle(theme).Value;
EdgeInsets padding = this.widget.titlePadding ??
EdgeInsets.only(
left: effectiveCenterTitle ? 0.0f : 72.0f,
bottom: 16.0f
);
padding: EdgeInsets.fromLTRB(
effectiveCenterTitle ? 0.0f : 72.0f,
0f,
0f,
16.0f),
padding: padding,
child: new Transform(
alignment: titleAlignment,
transform: scaleTransform,

2
Samples/UIWidgetsGallery/demo/material/bottom_app_bar_demo.cs


}
public override Path getOuterPath(Rect host, Rect guest) {
if (!host.overlaps(guest)) {
if (guest == null || !host.overlaps(guest)) {
Path path = new Path();
path.addRect(host);
return path;

正在加载...
取消
保存