浏览代码

upgrade stepper

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
ac8553dc
共有 1 个文件被更改,包括 14 次插入10 次删除
  1. 24
      com.unity.uiwidgets/Runtime/material/stepper.cs

24
com.unity.uiwidgets/Runtime/material/stepper.cs


using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.service;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using TextStyle = Unity.UIWidgets.painting.TextStyle;

static readonly Color _kCircleActiveLight = Colors.white;
static readonly Color _kCircleActiveDark = Colors.black87;
static readonly Color _kDisabledLight = Colors.black38;
static readonly Color _kDisabledDark = Colors.white30;
static readonly Color _kDisabledDark = Colors.white38;
static readonly float _kStepSize = 24.0f;
static readonly float _kTriangleHeight = 24.0f * 0.866025f;

case StepState.indexed:
case StepState.editing:
case StepState.complete:
return textTheme.body2;
return textTheme.bodyText1;
return textTheme.body2.copyWith(
return textTheme.bodyText1.copyWith(
return textTheme.body2.copyWith(
return textTheme.bodyText1.copyWith(
color: _isDark() ? _kErrorDark : _kErrorLight
);
}

return null;
}
Widget _buildheaderText(int index) {
Widget _buildHeaderText(int index) {
List<Widget> children = new List<Widget> {
new AnimatedDefaultTextStyle(
style: _titleStyle(index),

),
new Container(
margin: EdgeInsets.only(12.0f),
child: _buildheaderText(index)
child: _buildHeaderText(index)
)
}
)

}
}
: (GestureTapCallback) null,
canRequestFocus: widget.steps[_i].state != StepState.disabled,
child: _buildVerticalHeader(_i)
),
_buildVerticalBody(_i)

}
})
: null,
canRequestFocus: widget.steps[i].state != StepState.disabled,
child: new Row(
children: new List<Widget> {
new Container(

new Container(
margin: EdgeInsets.only(left: 12.0f),
child: _buildheaderText(_i)
child: _buildHeaderText(_i)
)
}
)

D.assert(material_.debugCheckHasMaterial(context));
D.assert(material_.debugCheckHasMaterialLocalizations(context));
D.assert(() => {
if (context.ancestorWidgetOfExactType(typeof(Stepper)) != null) {
if (context.findAncestorWidgetOfExactType<Stepper>() != null) {
"Steppers must not be nested. The material specification advises that one should avoid embedding steppers within steppers. "
"Steppers must not be nested.\n" +
" The material specification advises that one should avoid embedding " +
"steppers within steppers. " +
"https://material.io/archive/guidelines/components/steppers.html#steppers-usage"
);
}

正在加载...
取消
保存