Skip to content
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

Wrap dev tools extension screen with SelectionArea #869

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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