DiagnosticsTreeStyle.oneLine for CupertinoThemeData (#48084)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
47bba44920
commit
02db6a8052
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user