Skip to content

Commit

Permalink
library and demo : fix bug positionning (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tayebsed93 authored Mar 11, 2024
1 parent 53f97e2 commit 08f7aa6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
1 change: 1 addition & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [Bug]: Icons Button name ([#334](https://github.com/Orange-OpenSource/ods-flutter/issues/334))
- [Bug]: Spacing for the 'Small Card' component ([#342](https://github.com/Orange-OpenSource/ods-flutter/issues/342))
- [Bug]: Snackbar without action text positioning ([#198](https://github.com/Orange-OpenSource/ods-flutter/issues/198))

### [0.8.O](https://github.com/Orange-OpenSource/ods-flutter/compare/0.1.1...0.8.0) - 2023-03-02

Expand Down
1 change: 1 addition & 0 deletions library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- [Bug]: Spacing for the 'Small Card' component ([#342](https://github.com/Orange-OpenSource/ods-flutter/issues/342))
- [Bug]: Snackbar without action text positioning ([#198](https://github.com/Orange-OpenSource/ods-flutter/issues/198))


## [0.8.O](https://github.com/Orange-OpenSource/ods-flutter/compare/0.1.1...0.8.0) - 2023-03-02
Expand Down
22 changes: 3 additions & 19 deletions library/lib/components/snackbars/ods_snackbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,7 @@ extension OdsSnackbarsTwoLinesExtension on OdsSnackbar {
}) {
SnackBar snackbar = SnackBar(
width: double.infinity,
content: actionLabel != null
? Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
children: [
SizedBox(
width: MediaQuery.of(context).size.width / 2.5,
child: Text(message, maxLines: 2),
),
],
)
: Text(message, maxLines: 2),
content: Text(message, maxLines: 2),
action: actionLabel != null && actionLabel.isNotEmpty && onPressed != null
? SnackBarAction(
label: actionLabel,
Expand Down Expand Up @@ -130,14 +120,8 @@ extension OdsSnackbarsLongerActionExtension on OdsSnackbar {
children: [
Padding(
padding: const EdgeInsets.only(top: 8),
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
children: [
SizedBox(
width: MediaQuery.of(context).size.width / 2.5,
child: Text(message, maxLines: 2),
),
],
child: SizedBox(
child: Text(message, maxLines: 2),
),
),
if (actionLabel != null &&
Expand Down

0 comments on commit 08f7aa6

Please sign in to comment.