Skip to content

Commit

Permalink
UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
its-me-abhishek committed Nov 16, 2023
1 parent 83fade8 commit 78d0255
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/views/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:taskwarrior/drawer/filter_drawer.dart';
import 'package:taskwarrior/drawer/nav_drawer.dart';
import 'package:taskwarrior/model/storage/storage_widget.dart';
import 'package:taskwarrior/taskserver/ntaskserver.dart';
import 'package:taskwarrior/widgets/add_Task.dart';
import 'package:taskwarrior/widgets/add_task.dart';
import 'package:taskwarrior/widgets/buildTasks.dart';
import 'package:taskwarrior/widgets/pallete.dart';
import 'package:taskwarrior/widgets/tag_filter.dart';
Expand Down
37 changes: 27 additions & 10 deletions lib/widgets/add_Task.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:flutter_launcher_icons/xml_templates.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';

Expand All @@ -17,7 +14,6 @@ import 'package:taskwarrior/widgets/taskw.dart';

class AddTaskBottomSheet extends StatefulWidget {
const AddTaskBottomSheet({Key? key}) : super(key: key);

@override
_AddTaskBottomSheetState createState() => _AddTaskBottomSheetState();
}
Expand Down Expand Up @@ -47,7 +43,12 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {
return Center(
child: SingleChildScrollView(
child: AlertDialog(
backgroundColor: AppSettings.isDarkMode ? Colors.black : Colors.white,
surfaceTintColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 25, 25, 25)
: Colors.white,
backgroundColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 25, 25, 25)
: Colors.white,
title: Center(
child: Text(
title,
Expand Down Expand Up @@ -84,6 +85,9 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {

Widget buildName() => TextFormField(
controller: namecontroller,
style: TextStyle(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
),
decoration: InputDecoration(
hintText: 'Enter Task',
hintStyle: TextStyle(
Expand Down Expand Up @@ -189,16 +193,19 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {
textAlign: TextAlign.left,
),
DropdownButton<String>(
dropdownColor:
AppSettings.isDarkMode ? Colors.black : Colors.white,
dropdownColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 25, 25, 25)
: Colors.white,
value: priority,
elevation: 16,
style: GoogleFonts.poppins(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
),
underline: Container(
height: 1.5,
color: Colors.black,
color: AppSettings.isDarkMode
? const Color.fromARGB(255, 25, 25, 25)
: Colors.white,
),
onChanged: (String? newValue) {
setState(() {
Expand All @@ -219,15 +226,25 @@ class _AddTaskBottomSheetState extends State<AddTaskBottomSheet> {
);

Widget buildCancelButton(BuildContext context) => TextButton(
child: const Text('Cancel'),
child: Text(
'Cancel',
style: TextStyle(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
),
),
onPressed: () => Navigator.of(context).pop("cancel"),
);

Widget buildAddButton(BuildContext context) {
WidgetController widgetController = Get.put(WidgetController(context));

return TextButton(
child: const Text("Add"),
child: Text(
"Add",
style: TextStyle(
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
),
),
onPressed: () async {
if (formKey.currentState!.validate()) {
if (due == null) {
Expand Down

0 comments on commit 78d0255

Please sign in to comment.