diff --git a/app/CHANGELOG.md b/app/CHANGELOG.md index 2e4fa07f..edb70a50 100644 --- a/app/CHANGELOG.md +++ b/app/CHANGELOG.md @@ -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 diff --git a/library/CHANGELOG.md b/library/CHANGELOG.md index 0331ef38..786e1679 100644 --- a/library/CHANGELOG.md +++ b/library/CHANGELOG.md @@ -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 diff --git a/library/lib/components/snackbars/ods_snackbar.dart b/library/lib/components/snackbars/ods_snackbar.dart index 8eaf4857..f3c5b0ec 100644 --- a/library/lib/components/snackbars/ods_snackbar.dart +++ b/library/lib/components/snackbars/ods_snackbar.dart @@ -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, @@ -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 &&