Skip to content

Commit

Permalink
v.4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ayyyushhhhh committed Oct 25, 2021
1 parent 3697dc3 commit 03d9b60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/screens/habit tracker/add_habit_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class _AddHabitScreenState extends State<AddHabitScreen> {

void _saveHabit() {
if (_habitTitle.trimRight().isNotEmpty &&
_habitTitle.trimRight().isNotEmpty &&
_description.isNotEmpty) {
_description.trimRight().isNotEmpty &&
_habitIcon.isNotEmpty) {
final Habit habit = Habit(
title: _habitTitle,
icon: _habitIcon,
Expand All @@ -35,7 +35,7 @@ class _AddHabitScreenState extends State<AddHabitScreen> {
Navigator.pop(context);
} else if (_habitTitle.trimRight().isEmpty) {
_showSnackbar(context, "Give some title", "ok!");
} else if (_habitTitle.trimRight().isEmpty) {
} else if (_description.trimRight().isEmpty) {
_showSnackbar(context, "Give some description", "ok!");
} else if (_habitIcon.isEmpty) {
_showSnackbar(context, "Select an icon", "ok!");
Expand Down

0 comments on commit 03d9b60

Please sign in to comment.