Skip to content
New issue

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

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

Already on GitHub? # to your account

Location of Navigation button and UI design of add Task improved #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
60 changes: 32 additions & 28 deletions lib/view/screens/add_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,51 @@ class AddTask extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
Container(
padding: EdgeInsets.all(15),
child: Center(
child: TextFormField(
controller: taskNameController,
textAlign: TextAlign.center,
decoration: const InputDecoration(
hintText: 'Enter task name',
labelStyle: TextStyle(
color: Color(0xFF6200EE),
color: Colors.indigo,
),
),
),
)),
Padding(
padding: const EdgeInsets.all(10),
child:
Consumer<TaskListProvider>(builder: (context, provider, child) {
return CustomButton(
buttonText: "Save",
buttonCta: () {


provider
.onAddTask(TaskData(timerData, taskNameController.text),context);
Navigator.pop(context);
},
);
}),
),
Padding(
padding: const EdgeInsets.all(10),
child: CustomButton(
buttonText: "Back",
buttonCta: () {
Navigator.pop(context);
}),
),
const SizedBox(
height: 25,
width: double.infinity,
Container(

padding: const EdgeInsets.all(40.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children:[
Consumer<TaskListProvider>(builder: (context, provider, child) {
return ElevatedButton(
child: Text('Save',style: TextStyle(fontSize: 18),),
style: ButtonStyle(shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))) ),
onPressed: () {
provider.onAddTask(TaskData(timerData, taskNameController.text),context);
Navigator.pop(context);
},
);
}),

const SizedBox(
height: 10,
),

ElevatedButton(
child: Text("Back",style: TextStyle(fontSize: 18),),
style: ButtonStyle(shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))) ),
onPressed: () {
Navigator.pop(context);
}),
]),
),
],
),
Expand Down
1 change: 1 addition & 0 deletions lib/view/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class HomeScreenView extends StatelessWidget {
// TaskCard(
// taskName:
// colorCode: 800),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: SizedBox(
height: 80,
width: 80,
Expand Down