Skip to content

Commit

Permalink
Feature: Implemented snackbar to the Label Tile (#70)
Browse files Browse the repository at this point in the history
* adding a snackbar to the label tile

* changing the label tile snackbar title to something meaningful

* changing the pubspec.lock file

* removed another_flushbar and used getx snackbar

* reverting the pubspec.lock file to original again
  • Loading branch information
superiorsd10 authored Sep 26, 2023
1 parent 50d72d1 commit 031e5ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/app/modules/addOrUpdateAlarm/views/label_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class LabelTile extends StatelessWidget {
onChanged: (text) {
if (text.trim().isEmpty) {
controller.labelController.text = "";
if (text.isNotEmpty) {
Get.snackbar(
"Note",
"Please don't enter whitespace as first character!",
backgroundColor: Colors.white,
colorText: Colors.black,
);
}
}
},
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1327,4 +1327,4 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.7.0"
flutter: ">=3.7.0"

0 comments on commit 031e5ef

Please sign in to comment.