Skip to content

Commit

Permalink
Wrap dev tools extension screen with SelectionArea.
Browse files Browse the repository at this point in the history
  • Loading branch information
guenth39 committed Mar 8, 2024
1 parent 9403cf6 commit b7d5ab7
Showing 1 changed file with 51 additions and 49 deletions.
100 changes: 51 additions & 49 deletions packages/provider_devtools_extension/lib/src/provider_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,58 +54,60 @@ class ProviderScreenBody extends ConsumerWidget {
if (hasError) showProviderErrorBanner();
});

return Split(
axis: splitAxis,
initialFractions: const [0.33, 0.67],
children: [
const RoundedOutlinedBorder(
clip: true,
child: Column(
children: [
AreaPaneHeader(
roundedTopBorder: false,
includeTopBorder: false,
title: Text('Providers'),
),
Expanded(
child: ProviderList(),
),
],
),
),
RoundedOutlinedBorder(
clip: true,
child: Column(
children: [
AreaPaneHeader(
roundedTopBorder: false,
includeTopBorder: false,
title: Text(detailsTitleText),
actions: [
IconButton(
icon: const Icon(Icons.settings),
onPressed: () {
unawaited(
showDialog(
context: context,
builder: (_) => _StateInspectorSettingsDialog(),
),
);
},
),
],
),
if (selectedProviderId != null)
return SelectionArea(
child: Split(
axis: splitAxis,
initialFractions: const [0.33, 0.67],
children: [
const RoundedOutlinedBorder(
clip: true,
child: Column(
children: [
AreaPaneHeader(
roundedTopBorder: false,
includeTopBorder: false,
title: Text('Providers'),
),
Expanded(
child: InstanceViewer(
rootPath: InstancePath.fromProviderId(selectedProviderId),
showInternalProperties: ref.watch(_showInternals),
),
child: ProviderList(),
),
],
],
),
),
),
],
RoundedOutlinedBorder(
clip: true,
child: Column(
children: [
AreaPaneHeader(
roundedTopBorder: false,
includeTopBorder: false,
title: Text(detailsTitleText),
actions: [
IconButton(
icon: const Icon(Icons.settings),
onPressed: () {
unawaited(
showDialog(
context: context,
builder: (_) => _StateInspectorSettingsDialog(),
),
);
},
),
],
),
if (selectedProviderId != null)
Expanded(
child: InstanceViewer(
rootPath: InstancePath.fromProviderId(selectedProviderId),
showInternalProperties: ref.watch(_showInternals),
),
),
],
),
),
],
),
);
}
}
Expand Down

0 comments on commit b7d5ab7

Please sign in to comment.