浏览代码

fix pr

/zgh-devtools
Shiyun Wen 4 年前
当前提交
dbd93f4d
共有 2 个文件被更改,包括 12 次插入20 次删除
  1. 13
      com.unity.uiwidgets/Runtime/cupertino/date_picker.cs
  2. 19
      com.unity.uiwidgets/Runtime/widgets/text.cs

13
com.unity.uiwidgets/Runtime/cupertino/date_picker.cs


offAxisFraction = -0.5f * textDirectionFactor;
break;
}
return new CupertinoPicker(
} return new CupertinoPicker(
scrollController: new FixedExtentScrollController(
initialItem: (int)selectedMinute / widget.minuteInterval
),

},
children: CupertinoDatePickerUtils.listGenerate((int)(60 / widget.minuteInterval), (int index) => {
int minute = index * widget.minuteInterval;
return _buildPickerNumberLabel(localizations.timerPickerMinute(minute), additionalPadding);
return _buildPickerNumberLabel(localizations.timerPickerMinute(minute), additionalPadding);
})
);
}

string semanticsLabel = textDirectionFactor == 1
? localizations.timerPickerSecond(second) + localizations.timerPickerSecondLabel(second)
: localizations.timerPickerSecondLabel(second) + localizations.timerPickerSecond(second);
return _buildPickerNumberLabel(localizations.timerPickerSecond(second), additionalPadding);
return _buildPickerNumberLabel(localizations.timerPickerSecond(second), additionalPadding);
})
);
}

19
com.unity.uiwidgets/Runtime/widgets/text.cs


public static DefaultTextStyle of(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<DefaultTextStyle>() ?? new DefaultTextStyle();
}
public override bool updateShouldNotify(InheritedWidget oldWidget) {
oldWidget = (DefaultTextStyle) oldWidget;
return style != ((DefaultTextStyle)oldWidget).style ||
textAlign != ((DefaultTextStyle)oldWidget).textAlign ||
softWrap != ((DefaultTextStyle)oldWidget).softWrap ||
overflow != ((DefaultTextStyle)oldWidget).overflow ||
maxLines != ((DefaultTextStyle)oldWidget).maxLines ||
textWidthBasis != ((DefaultTextStyle)oldWidget).textWidthBasis ||
textHeightBehavior != ((DefaultTextStyle)oldWidget).textHeightBehavior;
public override bool updateShouldNotify(InheritedWidget oldWidget) {
DefaultTextStyle _oldWidget = (DefaultTextStyle) oldWidget;
return style != _oldWidget.style ||
textAlign != _oldWidget.textAlign ||
softWrap != _oldWidget.softWrap ||
overflow != _oldWidget.overflow ||
maxLines != _oldWidget.maxLines ||
textWidthBasis != _oldWidget.textWidthBasis ||
textHeightBehavior != _oldWidget.textHeightBehavior;
}
public override Widget wrap(BuildContext context, Widget child) {

正在加载...
取消
保存