浏览代码

drawer fix

/main
xingwei.zhu 6 年前
当前提交
475f6188
共有 3 个文件被更改,包括 40 次插入8 次删除
  1. 3
      Runtime/material/list_tile.cs
  2. 16
      Runtime/service/system_chrome.cs
  3. 29
      Samples/UIWidgetSample/MaterialSample.cs

3
Runtime/material/list_tile.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.foundation;

}
void _mountChild(Widget widget, _ListTileSlot slot) {
Element oldChild = this.slotToChild[slot];
Element oldChild = this.slotToChild.ContainsKey(slot) ? this.slotToChild[slot] : null;
Element newChild = this.updateChild(oldChild, widget, slot);
if (oldChild != null) {
this.slotToChild.Remove(slot);

16
Runtime/service/system_chrome.cs


public override int GetHashCode() {
var hashCode = this.systemNavigationBarColor.GetHashCode();
hashCode = (hashCode * 397) ^ this.systemNavigationBarDividerColor.GetHashCode();
hashCode = (hashCode * 397) ^ this.statusBarColor.GetHashCode();
hashCode = (hashCode * 397) ^ this.statusBarBrightness.GetHashCode();
hashCode = (hashCode * 397) ^ this.statusBarIconBrightness.GetHashCode();
hashCode = (hashCode * 397) ^ this.systemNavigationBarIconBrightness.GetHashCode();
hashCode = (hashCode * 397) ^ (this.systemNavigationBarDividerColor != null
? this.systemNavigationBarDividerColor.GetHashCode()
: 0);
hashCode = (hashCode * 397) ^ (this.statusBarColor != null ? this.statusBarColor.GetHashCode() : 0);
hashCode = (hashCode * 397) ^
(this.statusBarBrightness != null ? this.statusBarBrightness.GetHashCode() : 0);
hashCode = (hashCode * 397) ^
(this.statusBarIconBrightness != null ? this.statusBarIconBrightness.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (this.systemNavigationBarIconBrightness != null
? this.systemNavigationBarIconBrightness.GetHashCode()
: 0);
return hashCode;
}

29
Samples/UIWidgetSample/MaterialSample.cs


Scaffold.of(subContext).showSnackBar(new SnackBar(
content: new Text("Float Alerting !")));
});
})
}),
drawer: new Drawer(
child: new ListView(
padding: EdgeInsets.zero,
children: new List<Widget> {
new ListTile(
leading: new Icon(Unity.UIWidgets.material.Icons.account_circle),
title: new Text("Login"),
onTap: () => { }
),
new Divider(
height: 2.0f),
new ListTile(
leading: new Icon(Unity.UIWidgets.material.Icons.account_balance_wallet),
title: new Text("Wallet"),
onTap: () => { }
),
new Divider(
height: 2.0f),
new ListTile(
leading: new Icon(Unity.UIWidgets.material.Icons.accessibility),
title: new Text("Balance"),
onTap: () => { }
)
}
)
)
);
}
}

正在加载...
取消
保存