Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dialog box and keyboard fixes #225

Merged
merged 4 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions lib/widgets/add_Task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {
}

Widget buildName() => TextFormField(
autofocus: true,
controller: namecontroller,
style: TextStyle(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
Expand Down Expand Up @@ -321,8 +322,12 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {
if (formKey.currentState!.validate()) {
if (due == null) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: const Text(
'Due date cannot be empty. Please select a due date.'),
content: Text(
'Due date cannot be empty. Please select a due date.',
style: TextStyle(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
),
),
backgroundColor:
AppSettings.isDarkMode ? Colors.black : Colors.white,
duration: const Duration(seconds: 2),
Expand All @@ -343,7 +348,12 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {
widgetController.fetchAllData();

ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: const Text('Task Added Successfully, Tap to Edit'),
content: Text(
'Task Added Successfully, Tap to Edit',
style: TextStyle(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
),
),
backgroundColor:
AppSettings.isDarkMode ? Colors.black : Colors.white,
duration: const Duration(seconds: 2),
Expand All @@ -360,7 +370,12 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {
}
} on FormatException catch (e) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(e.message),
content: Text(
e.message,
style: TextStyle(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
),
),
backgroundColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 61, 61, 61)
: const Color.fromARGB(255, 39, 39, 39),
Expand Down
12 changes: 0 additions & 12 deletions lib/widgets/buildTasks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ class _TasksBuilderState extends State<TasksBuilder> {
},
child: const Text('No'),
),
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text('Cancel'),
),
],
);
},
Expand Down Expand Up @@ -242,12 +236,6 @@ class _TasksBuilderState extends State<TasksBuilder> {
},
child: const Text('No'),
),
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text('Cancel'),
),
],
);
},
Expand Down
Loading