-
Notifications
You must be signed in to change notification settings - Fork 0
[Personal WIP] Story of Layout feature #1
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
Check-in 2:
Concerns:
|
Check-in 3:
|
@@ -4,6 +4,7 @@ | |||
|
|||
import 'dart:math'; | |||
|
|||
import 'package:devtools_app/src/ui/fake_flutter/_real_flutter.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.
auto imports are doing the wrong thing. just go ahead and import
'package:flutter/material.dart'
final Map<String, Object> flexDetails = node.diagnostic?.json['flex']; | ||
final int numOfChildren = node.diagnostic.childrenNow.length; | ||
final List<Widget> children = node.diagnostic.childrenNow.map((RemoteDiagnosticsNode child) => Expanded( | ||
flex: 1, |
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.
you can now use List comprehensions for this sort of case in dart. so
[for (var child in node.diagnostic.childrenNow)
Container(something something)
];
children: [ | ||
Container( | ||
margin: const EdgeInsets.only(bottom: 4.0), | ||
child: const Text('Story of Your Flex Widget', style: TextStyle( |
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.
Add the name of the widget class. So:
'Story of the flex layout of your ${diagnostic.description} widget'
so
Story of the flex layout of your Column widget
or
Story of the flex layout of your Row widget.
@override | ||
Widget build(BuildContext context) { | ||
final Map<String, Object> flexDetails = node.diagnostic?.json['flex']; |
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.
Exciting to see this!
Go ahead and add getters for the extra json fields you add to RemoteDiagnosticsNode.
), | ||
Expanded( | ||
child: Container( | ||
color: Colors.blue, |
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.
try to use colors from the Theme whenever possible. That will make the ui work in dark and light theme.
See calls to Theme.of in the code for examples.
Check in 4:
TODOs for tomorrow:
|
Check in 5:Changelist:
Screenshots:TODOs:
|
…rent widget that did the unconstraining, and add animation
…pport Light/Dark theme) - Remove hack in InspectorTree node - Remove wrong import - Rename 'Story of your Flex widget' to 'Story of the layout of your Row/Column widget'
… for details tree, and several minor changes. - Create proper deserializer method for flex properties from DiagnosticsNode - Create new flag (`isExperimentalStoryOfLayoutEnabled`) in `InspectorTreeFlutterController` to prevent showing all this features changes until my PR (github.com/albertusdev/flutter/pull/2) is landed to Flutter main repository - Inspector details tree now live inside of Tabs! User can focus on layout details instead if they want to. - Removed animation from DianogsticsNodeDescriptions for now (due to minor performance concerns and adding new flag, might add it later!) - Changed hardcoded constants for Buttons in InspectorScreen to prevent button groups expanding to two lines
e913197
to
b86aeee
Compare
c1c4f4e
to
9cd8004
Compare
69e4ce0
to
fb9c121
Compare
fb9c121
to
eb34a12
Compare
- Stop exposing InspectorController in InspectorTreeControllerFlutter - Remove shouldHighlightConstraint getter since it is unnecessary now - Rename some variable names - Add copyright in new files
…EnumUtils instead
- Add todos - Rename toName & toEnum to name and enum - Minor cleanups
0f55e76
to
88c40de
Compare
35513e3
to
a70c74d
Compare
67d5b69
to
6051925
Compare
A PR to show my progress on working on this feature.
Dependency:
Story of layout PR flutter#2