-
Notifications
You must be signed in to change notification settings - Fork 362
Move some console related code from debugger and inspector screens to shared/console. #4991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| import 'dart:developer'; | ||
|
|
||
| import 'package:flutter/cupertino.dart'; | ||
| import 'package:flutter/foundation.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has a lot of non-console stuff in it. I would suggest either leaving it in the inspector and accepting slightly tangled imports or move it to a shared directory. Seems odd to have this core inspector logic under the console rather than inspector or shared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #5006.
| @@ -255,7 +250,7 @@ class DiagnosticsNodeDescription extends StatelessWidget { | |||
| final defaultStyle = DefaultTextStyle.of(context).style; | |||
| final baseStyle = style ?? defaultStyle; | |||
| TextStyle textStyle = baseStyle.merge( | |||
| inspector_text_styles.textStyleForLevel( | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems a bit inverted. these are much more inspector specific styles than console styles. If you want a neutral name, these could be diagnostics_text_styles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed and moved in #5021
| @@ -1,20 +1,19 @@ | |||
| // Copyright 2018 The Chromium Authors. All rights reserved. | |||
| // Use of this source code is governed by a BSD-style license that can be | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also isn't a console thing. If you want to move it, it should go in shared not console.
|
|
||
| import '../../theme.dart'; | ||
|
|
||
| // Enum-like static classes are ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not continue the previous pattern of top level members imported with a prefix? In general if we were to use one pattern I would think we would migrate to that pattern not to this pattern that violates the lints we have enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline and agreed enum-like static classes are more convenient than top level members.
jacob314
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

RELEASE_NOTE_EXCEPTION=[no functional changes]