Skip to content

Commit

Permalink
Devtools fixes (#2358)
Browse files Browse the repository at this point in the history
* Change to single quotes when copying native node props

* Make native view details scrollable

* Bump patrol_devtools_extension version and create changelog

---------

Co-authored-by: piotruela <[email protected]>
  • Loading branch information
jBorkowska and piotruela authored Oct 15, 2024
1 parent 41c962e commit a8a0463
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 34 deletions.
4 changes: 4 additions & 0 deletions packages/patrol_devtools_extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.2.1

- Make details view panel scrollable when content overflows (#2358)
- Copy selector arguments with single quote (#2358)
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,43 @@ class NativeViewDetails extends StatelessWidget {
Widget build(BuildContext context) {
return ScaffoldMessenger(
child: Scaffold(
body: Column(
mainAxisSize: MainAxisSize.min,
children: [
const _HeaderDecoration(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: denseSpacing),
child: SizedBox(
width: double.infinity,
child: Align(
alignment: Alignment.centerLeft,
child: Text(
'Native view details',
maxLines: 1,
),
),
body: currentNode == null
? Container(
alignment: Alignment.center,
padding: const EdgeInsets.all(densePadding),
child: const Text(
'Select a node to view its details',
textAlign: TextAlign.center,
maxLines: 4,
),
),
),
Expanded(
child: currentNode != null
? Padding(
)
: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const _HeaderDecoration(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: denseSpacing),
child: SizedBox(
width: double.infinity,
child: Align(
alignment: Alignment.centerLeft,
child: Text(
'Native view details',
maxLines: 1,
),
),
),
),
),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: denseSpacing),
child: _NodeDetails(node: currentNode!),
)
: Container(
alignment: Alignment.center,
padding: const EdgeInsets.all(densePadding),
child: const Text(
'Select a node to view its details',
textAlign: TextAlign.center,
maxLines: 4,
),
),
),
],
),
],
),
),
),
);
}
Expand Down Expand Up @@ -279,7 +279,7 @@ class _KeyValueItem {
_KeyValueItem(this.key, Object? val) : important = val != null {
value = switch (val) {
null => 'null',
final String v => '"$v"',
final String v => "'$v'",
_ => val.toString(),
};

Expand Down
2 changes: 1 addition & 1 deletion packages/patrol_devtools_extension/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: patrol_devtools_extension
description: A new Flutter project.
publish_to: none

version: 0.2.0+1
version: 0.2.1

environment:
sdk: '>=3.2.0 <4.0.0'
Expand Down

0 comments on commit a8a0463

Please sign in to comment.