Skip to content

Commit

Permalink
delet comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pedram6403 committed Apr 10, 2024
1 parent 8349f14 commit a63a668
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions lib/Screens/createtask.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,9 @@ class createTask extends StatefulWidget {

class _createTaskState extends State<createTask> {

// final _titleController = TextEditingController() ;
// final _descriptionController = TextEditingController() ;
// final dodateController = TextEditingController() ;
// final strtimeController = TextEditingController() ;
// final endtimeController = TextEditingController() ;
// late bool alarm = false;
// late bool repetation = false ;
// late bool done = false ;

final _formKey = GlobalKey<FormState>();
// DateTime _selectedDate = DateTime.now();
// TextEditingController _dateController = TextEditingController();
// TimeOfDay _selectedTime = TimeOfDay.now();
// TextEditingController _timeController = TextEditingController();
// TextEditingController _timeendController = TextEditingController();

late final TextEditingController _titleController;
late final TextEditingController _descriptionController;
late final TextEditingController _dateController;
Expand All @@ -59,18 +48,8 @@ class _createTaskState extends State<createTask> {
alarm = widget.taskData?['alarm'] ?? false;
repetation = widget.taskData?['repetition'] ?? false;
done = widget.taskData?['done'] ?? false;
// operation = widget.taskData!['operation'];
// taskData = {
// "title":widget.taskData?['title'],
// "discription":widget.taskData?['description'],
// "do_date":widget.taskData?['do_date'],
// "start_time":widget.taskData?['start_time'],
// "end_time":widget.taskData?['end_time'],
// "alarm":widget.taskData?['alarm'],
// "repetation":widget.taskData?['repetition'],

// };
operation = widget.operation ?? ''; // Initialize operation variable

operation = widget.operation ?? '';
taskData = widget.taskData ?? {};

}
Expand Down Expand Up @@ -131,7 +110,7 @@ Future<void> selectOperation(String?operation, Map<String, dynamic>? taskData) a
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Token $token',
},
body: jsonEncode(taskData), // Convert task data to JSON format
body: jsonEncode(taskData),
);
print(jsonEncode(taskData));
print(response.headers);
Expand Down Expand Up @@ -199,7 +178,7 @@ Future<void> selectOperation(String?operation, Map<String, dynamic>? taskData) a

if (response.statusCode == 200) {
// Task updated successfully
print('Task updated successfullyyyyyyy');
print('Task updated successfully');
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
Expand Down

0 comments on commit a63a668

Please sign in to comment.