|
|
|
|
|
|
bool right = true, |
|
|
|
bool bottom = true, |
|
|
|
EdgeInsets mininum = null, |
|
|
|
Widget child = null |
|
|
|
Widget child = null, |
|
|
|
bool maintainBottomViewPadding = false |
|
|
|
) : base(key: key) { |
|
|
|
D.assert(child != null); |
|
|
|
this.left = left; |
|
|
|
|
|
|
minimum = mininum ?? EdgeInsets.zero; |
|
|
|
this.child = child; |
|
|
|
this.maintainBottomViewPadding = maintainBottomViewPadding; |
|
|
|
} |
|
|
|
|
|
|
|
public readonly bool left; |
|
|
|
|
|
|
public readonly EdgeInsets minimum; |
|
|
|
|
|
|
|
public readonly Widget child; |
|
|
|
public readonly bool maintainBottomViewPadding; |
|
|
|
EdgeInsets padding = MediaQuery.of(context).padding; |
|
|
|
MediaQueryData data = MediaQuery.of(context); |
|
|
|
EdgeInsets padding = data.padding; |
|
|
|
if (data.padding.bottom == 0.0 && data.viewInsets.bottom != 0.0 && maintainBottomViewPadding) |
|
|
|
padding = padding.copyWith(bottom: data.viewPadding.bottom); |
|
|
|
return new Padding( |
|
|
|
padding: EdgeInsets.only( |
|
|
|
left: Mathf.Max(left ? padding.left : 0.0f, minimum.left), |
|
|
|