Commit 02db6a80 authored by LongCatIsLooong's avatar LongCatIsLooong Committed by Flutter GitHub Bot

DiagnosticsTreeStyle.oneLine for CupertinoThemeData (#48084)

parent 47bba449
...@@ -1086,7 +1086,7 @@ DiagnosticsProperty<Color> createCupertinoColorProperty( ...@@ -1086,7 +1086,7 @@ DiagnosticsProperty<Color> createCupertinoColorProperty(
Color value, { Color value, {
bool showName = true, bool showName = true,
Object defaultValue = kNoDefaultValue, Object defaultValue = kNoDefaultValue,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.shallow, DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine,
DiagnosticLevel level = DiagnosticLevel.info, DiagnosticLevel level = DiagnosticLevel.info,
}) { }) {
if (value is CupertinoDynamicColor) { if (value is CupertinoDynamicColor) {
......
...@@ -190,13 +190,24 @@ void main() { ...@@ -190,13 +190,24 @@ void main() {
'navLargeTitleTextStyle', 'navLargeTitleTextStyle',
'navActionTextStyle', 'navActionTextStyle',
'pickerTextStyle', 'pickerTextStyle',
'dateTimePickerTextStyle' 'dateTimePickerTextStyle',
} }
), ),
isTrue, isTrue,
); );
}); });
testWidgets('CupertinoTheme.toStringDeep uses single-line style', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/47651.
expect(
const CupertinoTheme(
data: CupertinoThemeData(primaryColor: Color(0x00000000)),
child: SizedBox(),
).toStringDeep().trimRight(),
isNot(contains('\n')),
);
});
Brightness currentBrightness; Brightness currentBrightness;
void colorMatches(Color componentColor, CupertinoDynamicColor expectedDynamicColor) { void colorMatches(Color componentColor, CupertinoDynamicColor expectedDynamicColor) {
switch (currentBrightness) { switch (currentBrightness) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment