浏览代码

fix FileImage error and and float compare func

/zgh-devtools
guanghuispark 4 年前
当前提交
6d7d7e6c
共有 6 个文件被更改,包括 13 次插入8 次删除
  1. 7
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/expanding_bottom_sheet.cs
  2. 4
      com.unity.uiwidgets/Runtime/animation/animation_controller.cs
  3. 4
      com.unity.uiwidgets/Runtime/foundation/diagnostics.cs
  4. 2
      com.unity.uiwidgets/Runtime/material/app_bar.cs
  5. 2
      com.unity.uiwidgets/Runtime/material/app_bar_theme.cs
  6. 2
      com.unity.uiwidgets/Runtime/painting/image_provider.cs

7
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/expanding_bottom_sheet.cs


new Row(
children: new List<Widget>
{
/* new AnimatedPadding(
new AnimatedPadding(
),*/
),
new Container(
// Accounts for the overflow number
width: numProducts > 3 ? _width - 94.0f : _width - 64.0f,

)//, new ExtraProductsNumber(),
),
new ExtraProductsNumber(),
}
),
}

4
com.unity.uiwidgets/Runtime/animation/animation_controller.cs


void _internalSetValue(float newValue) {
_value = newValue.clamp(lowerBound, upperBound);
if (_value == lowerBound) {
if (foundation_.FloatEqual(_value, lowerBound)) {
else if (_value == upperBound) {
else if (foundation_.FloatEqual(_value, upperBound)) {
_status = AnimationStatus.completed;
}
else {

4
com.unity.uiwidgets/Runtime/foundation/diagnostics.cs


public static bool _isSingleLine(DiagnosticsTreeStyle? style) {
return style == DiagnosticsTreeStyle.singleLine;
}
public static bool FloatEqual(float left, float right) {
return Mathf.Abs(left - right) < precisionErrorTolerance;
}
}

2
com.unity.uiwidgets/Runtime/material/app_bar.cs


child: appBar
)
),
widget.bottomOpacity == 1.0f
foundation_.FloatEqual(widget.bottomOpacity, 1.0f)
? (Widget) widget.bottom
: new Opacity(
opacity: new Interval(0.25f, 1.0f, curve: Curves.fastOutSlowIn).transform(widget

2
com.unity.uiwidgets/Runtime/material/app_bar_theme.cs


public bool Equals(AppBarTheme other) {
return other.brightness == brightness
&& other.color == color
&& other.elevation == elevation
&& Equals(other.elevation, elevation)
&& other.iconTheme == iconTheme
&& other.actionsIconTheme == actionsIconTheme
&& other.textTheme == textTheme;

2
com.unity.uiwidgets/Runtime/painting/image_provider.cs


public readonly float scale;
public override Future<FileImage> obtainKey(ImageConfiguration configuration) {
return Future.value(FutureOr.value(this)).to<FileImage>();
return new SynchronousFuture<FileImage>(this);
}
public override ImageStreamCompleter load(FileImage key, DecoderCallback decode) {

正在加载...
取消
保存