jonataslaw / jonataslaw/getx

Snackbar with one child content

Open
#2,002 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
11.2k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

**ATTENTION: DO NOT USE THIS FIELD TO ASK SUPPORT QUESTIONS. USE THE PLATFORM CHANNELS FOR THIS. THIS SPACE IS DEDICATED ONLY FOR FEATURE REQUESTS**

**Is your feature request related to a problem? Please describe.**
Because of there are always `titleText` and `messageText` belong together (it always has a padding space between them):

[snack.dart](https://github.com/jonataslaw/getx/blob/e7c29169455896b452842cbe7dc6f98d34be6234/lib/get_navigation/src/snackbar/snack.dart?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L475)
```dart
children: [
(_isTitlePresent)
? Padding(
padding: EdgeInsets.only(
top: widget.padding.top,
left: widget.padding.left,
right: widget.padding.right,
),
child: _getTitleText(),
)
: _emptyWidget,
Padding(
padding: EdgeInsets.only(
top: _messageTopMargin,
left: widget.padding.left,
right: widget.padding.right,
bottom: widget.padding.bottom,
),
child: widget.messageText ?? _getDefaultNotificationText(),
),
]
```
So, it always displays a redundancy space when we're using `titleText` or `messageText` widget only.

**Describe the solution you'd like**
I propose to have a main child widget instead of using either `titleText` or `messageText` widget.

**Describe alternatives you've considered**
Another temporary solution is make `_messageTopMargin` as a public variable. So, we can use `messageText` widget as a main child widget.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.