Skip to content

Fix: Improvement in Navigation Bar #449 #451

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

Open
wants to merge 2 commits into
base: main
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
22 changes: 11 additions & 11 deletions .github/workflows/flutterci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ jobs:
steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v2

# Step 2: Setup Java with version 12.x
- uses: actions/setup-java@v1
with:
java-version: '12.x'
java-version: "12.x"

# Step 3: Setup Flutter with version 3.7.11
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.22.1'
flutter-version: "3.22.1"

# Step 4: Get dependencies using pub get
- run: flutter pub get

# Step 5: Analyze the code using flutter analyze
- run: flutter analyze

# Step 6: Format the code using flutter format (uncomment if needed)
# - run: flutter format -n --set-exit-if-changed .

# Step 7: Run tests using flutter test
- run: flutter test

# Step 8: Build APK using flutter build apk
- run: flutter build apk

# Step 9: Upload the built APK as an artifact
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: release-apk
path: build/app/outputs/apk/release/app-release.apk
232 changes: 134 additions & 98 deletions lib/app/modules/home/views/home_page_body.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import 'package:double_back_to_close_app/double_back_to_close_app.dart';
import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:taskwarrior/app/modules/home/views/show_tasks.dart';

import 'package:taskwarrior/app/modules/home/views/tasks_builder.dart';
import 'package:taskwarrior/app/utils/constants/palette.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

import '../controllers/home_controller.dart';

class HomePageBody extends StatelessWidget {
Expand All @@ -19,106 +16,145 @@ class HomePageBody extends StatelessWidget {
Widget build(BuildContext context) {
controller.initInAppTour();
controller.showInAppTour(context);
return DoubleBackToCloseApp(
snackBar: const SnackBar(content: Text('Tap back again to exit')),
child: Container(
color: AppSettings.isDarkMode
? Palette.kToDark.shade200
: TaskWarriorColors.white,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Obx(
() => Column(
children: <Widget>[
if (controller.searchVisible.value)
Container(
margin: const EdgeInsets.symmetric(
horizontal: 10, vertical: 10),
child: SearchBar(
backgroundColor: WidgetStateProperty.all<Color>(
(TaskWarriorColors.kLightPrimaryBackgroundColor)),
surfaceTintColor: WidgetStateProperty.all<Color>(
(TaskWarriorColors.kLightPrimaryBackgroundColor)),
controller: controller.searchController,
// shape:,
onChanged: (value) {
controller.search(value);
},

shape: WidgetStateProperty.resolveWith<OutlinedBorder?>(
(Set<WidgetState> states) {
if (states.contains(WidgetState.focused)) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
side: BorderSide(
color: TaskWarriorColors.black,
width: 2.0,
),
);
} else {
return RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
side: BorderSide(
color: TaskWarriorColors.black,
width: 1.5,
),
);
}
},
return Scaffold(
drawer: Drawer(
// Add your drawer content here
child: ListView(
padding: EdgeInsets.zero,
children: const <Widget>[
DrawerHeader(
decoration: BoxDecoration(
color: Colors.blue,
),
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
),
ListTile(
leading: Icon(Icons.message),
title: Text('Messages'),
),
ListTile(
leading: Icon(Icons.account_circle),
title: Text('Profile'),
),
ListTile(
leading: Icon(Icons.settings),
title: Text('Settings'),
),
],
),
),
body: GestureDetector(
onHorizontalDragEnd: (details) {
if (details.primaryVelocity! > 0) {
Scaffold.of(context).openDrawer();
}
},
child: DoubleBackToCloseApp(
snackBar: const SnackBar(content: Text('Tap back again to exit')),
child: Container(
color: AppSettings.isDarkMode
? Palette.kToDark.shade200
: TaskWarriorColors.white,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Obx(
() => Column(
children: <Widget>[
if (controller.searchVisible.value)
Container(
margin: const EdgeInsets.symmetric(
horizontal: 10, vertical: 10),
child: SearchBar(
backgroundColor: WidgetStateProperty.all<Color>(
(TaskWarriorColors.kLightPrimaryBackgroundColor)),
surfaceTintColor: WidgetStateProperty.all<Color>(
(TaskWarriorColors.kLightPrimaryBackgroundColor)),
controller: controller.searchController,
onChanged: (value) {
controller.search(value);
},
shape:
WidgetStateProperty.resolveWith<OutlinedBorder?>(
(Set<WidgetState> states) {
if (states.contains(WidgetState.focused)) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
side: BorderSide(
color: TaskWarriorColors.black,
width: 2.0,
),
);
} else {
return RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
side: BorderSide(
color: TaskWarriorColors.black,
width: 1.5,
),
);
}
},
),
leading: const Icon(Icons.search_rounded),
trailing: <Widget>[
(controller.searchController.text.isNotEmpty)
? IconButton(
key: GlobalKey(),
icon: Icon(Icons.cancel,
color: TaskWarriorColors.black),
onPressed: () {
controller.searchController.clear();
controller.search(
controller.searchController.text);
},
)
: const SizedBox(
width: 0,
height: 0,
)
],
hintText: 'Search',
),
),
leading: const Icon(Icons.search_rounded),
trailing: <Widget>[
(controller.searchController.text.isNotEmpty)
? IconButton(
key: GlobalKey(),
icon: Icon(Icons.cancel,
color: TaskWarriorColors.black),
onPressed: () {
controller.searchController.clear();
controller
.search(controller.searchController.text);
},
)
: const SizedBox(
width: 0,
height: 0,
)
],

hintText: 'Search',
),
),
Visibility(
visible: !controller.taskchampion.value,
child: Expanded(
child: Scrollbar(
child: Obx(
() => TasksBuilder(
// darkmode: AppSettings.isDarkMode,
useDelayTask: controller.useDelayTask.value,
taskData: controller.searchedTasks,
pendingFilter: controller.pendingFilter.value,
waitingFilter: controller.waitingFilter.value,
searchVisible: controller.searchVisible.value,
selectedLanguage: controller.selectedLanguage.value,
scrollController: controller.scrollController,
showbtn: controller.showbtn.value,
Visibility(
visible: !controller.taskchampion.value,
child: Expanded(
child: Scrollbar(
child: Obx(
() => TasksBuilder(
useDelayTask: controller.useDelayTask.value,
taskData: controller.searchedTasks,
pendingFilter: controller.pendingFilter.value,
waitingFilter: controller.waitingFilter.value,
searchVisible: controller.searchVisible.value,
selectedLanguage:
controller.selectedLanguage.value,
scrollController: controller.scrollController,
showbtn: controller.showbtn.value,
),
),
),
),
),
),
Visibility(
visible: controller.taskchampion.value,
child: Expanded(
child: Scrollbar(
child: TaskViewBuilder(
pendingFilter: controller.pendingFilter.value,
selectedSort: controller.selectedSort.value,
project: controller.projectFilter.value,
),
)))
],
),
Visibility(
visible: controller.taskchampion.value,
child: Expanded(
child: Scrollbar(
child: TaskViewBuilder(
pendingFilter: controller.pendingFilter.value,
selectedSort: controller.selectedSort.value,
project: controller.projectFilter.value,
),
)))
],
),
),
),
),
Expand Down
Loading
Loading