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(
Color value, {
bool showName = true,
Object defaultValue = kNoDefaultValue,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.shallow,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine,
DiagnosticLevel level = DiagnosticLevel.info,
}) {
if (value is CupertinoDynamicColor) {
......
......@@ -190,13 +190,24 @@ void main() {
'navLargeTitleTextStyle',
'navActionTextStyle',
'pickerTextStyle',
'dateTimePickerTextStyle'
'dateTimePickerTextStyle',
}
),
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;
void colorMatches(Color componentColor, CupertinoDynamicColor expectedDynamicColor) {
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