Skip to content

Commit

Permalink
Expand notifications to fill the space they block (#5975)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderDake authored Jun 30, 2023
1 parent 7232dac commit e5dbc28
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 39 deletions.
72 changes: 35 additions & 37 deletions packages/devtools_app/lib/src/framework/notifications_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,44 +246,42 @@ class _NotificationState extends State<_Notification>
child: child,
);
},
child: Padding(
padding: const EdgeInsets.all(denseSpacing),
child: Card(
color: theme.snackBarTheme.backgroundColor,
child: DefaultTextStyle(
style: theme.snackBarTheme.contentTextStyle ??
theme.primaryTextTheme.titleMedium!,
child: Padding(
padding: const EdgeInsets.all(denseSpacing),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.message.isDismissible
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: _NotificationMessage(
widget: widget,
context: context,
),
),
_DismissAction(
onPressed: () {
widget.remove(widget);
},
child: Card(
color: theme.snackBarTheme.backgroundColor,
margin: const EdgeInsets.fromLTRB(0, 0, 0, densePadding),
child: DefaultTextStyle(
style: theme.snackBarTheme.contentTextStyle ??
theme.primaryTextTheme.titleMedium!,
child: Padding(
padding: const EdgeInsets.all(denseSpacing),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
widget.message.isDismissible
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: _NotificationMessage(
widget: widget,
context: context,
),
],
)
: _NotificationMessage(
widget: widget,
context: context,
),
const SizedBox(height: defaultSpacing),
_NotificationActions(widget: widget),
],
),
),
_DismissAction(
onPressed: () {
widget.remove(widget);
},
),
],
)
: _NotificationMessage(
widget: widget,
context: context,
),
const SizedBox(height: defaultSpacing),
_NotificationActions(widget: widget),
],
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This is draft for future release notes, that are going to land on

Dart & Flutter DevTools - A Suite of Performance Tools for Dart and Flutter

## General updates
TODO: Remove this section if there are not any general updates.
## General updates
- Fix overlay notifications so they cover the area that their background blocks - [#5975](https://github.com/flutter/devtools/pull/5975)

## Inspector updates
TODO: Remove this section if there are not any general updates.
Expand Down

0 comments on commit e5dbc28

Please sign in to comment.