Skip to content
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions ios/Runner/Assets.xcassets/ic_shortcut_add.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images": [
{
"idiom": "universal",
"filename": "add_1x.png",
"scale": "1x"
},
{
"idiom": "universal",
"filename": "add_2x.png",
"scale": "2x"
},
{
"idiom": "universal",
"filename": "add_3x.png",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images": [
{
"idiom": "universal",
"filename": "reports_1x.png",
"scale": "1x"
},
{
"idiom": "universal",
"filename": "reports_2x.png",
"scale": "2x"
},
{
"idiom": "universal",
"filename": "reports_3x.png",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
Comment on lines +1 to +23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check for `@2x` and `@3x` variants of report icon

echo "Checking for report icon variants in iOS asset catalog..."
fd -t f "report" ios/Runner/Assets.xcassets/report.imageset/

echo -e "\nExpected files for optimal display quality:"
echo "  - report.png (1x)"
echo "  - report@2x.png (2x) - for retina displays"
echo "  - report@3x.png (3x) - for super retina displays"

Repository: CCExtractor/taskwarrior-flutter

Length of output: 347


Add missing high-resolution image variants.

The imageset directory contains only report.png (1x scale), but the Contents.json declares support for 2x and 3x scales without providing filenames. iOS will upscale the 1x image on retina displays, resulting in blurry or pixelated rendering. Add report@2x.png and report@3x.png to the ios/Runner/Assets.xcassets/report.imageset/ directory, then update the Contents.json with the corresponding filenames.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ios/Runner/Assets.xcassets/report.imageset/Contents.json` around lines 1 -
21, The Contents.json for the report.imageset declares 2x and 3x scales but
lacks filenames, causing iOS to upscale the 1x asset; add high-resolution files
named report@2x.png and report@3x.png into
ios/Runner/Assets.xcassets/report.imageset/ and update the Contents.json entries
for the objects with "scale": "2x" and "scale": "3x" to include "filename":
"report@2x.png" and "filename": "report@3x.png" respectively (leave the existing
"report.png" for "1x"), then verify the imageset renders correctly in Xcode.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// ignore_for_file: depend_on_referenced_packages

import 'dart:io';
import 'package:built_collection/built_collection.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:taskwarrior/app/modules/home/controllers/widget.controller.dart';
import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
import 'package:taskwarrior/app/tour/details_page_tour.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
Expand Down Expand Up @@ -92,6 +94,12 @@ class DetailRouteController extends GetxController {
modify.save(modified: () => now);
onEdit.value = false;

if (Platform.isAndroid || Platform.isIOS) {
WidgetController widgetController = Get.put(WidgetController());
widgetController.fetchAllData();
widgetController.update();
}

// Show snackbar
Get.snackbar(
'Task Updated',
Expand Down
98 changes: 46 additions & 52 deletions lib/app/modules/home/views/add_task_bottom_sheet_new.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ class AddTaskBottomSheet extends StatelessWidget {
debugPrint(
"Building Add Task Bottom Sheet for ${forTaskC ? "TaskC" : forReplica ? "Replica" : "Normal Task"}");
const padding = 12.0;
return Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: Form(
key: homeController.formKey,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
return SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: Form(
key: homeController.formKey,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.all(padding),
child: Row(
Expand Down Expand Up @@ -89,55 +90,48 @@ class AddTaskBottomSheet extends StatelessWidget {
],
),
),
Flexible(
child: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(padding),
child: TextFormField(
controller: homeController.namecontroller,
validator: (value) => value!.trim().isEmpty
? SentenceManager(
currentLanguage:
homeController.selectedLanguage.value)
.sentences
.descriprtionCannotBeEmpty
: null,
decoration: InputDecoration(
labelText: SentenceManager(
currentLanguage:
homeController.selectedLanguage.value)
.sentences
.enterTaskDescription,
border: OutlineInputBorder(),
),
),
),
Padding(
padding: const EdgeInsets.all(padding),
child: buildProjectInput(context)),
Padding(
padding: const EdgeInsets.only(
left: padding, right: padding, top: padding),
child: buildDatePicker(context),
),
Padding(
padding: const EdgeInsets.all(padding),
child: buildPriority(context),
),
Padding(
padding: const EdgeInsets.all(padding),
child: buildTagsInput(context),
),
const Padding(padding: EdgeInsets.all(20)),
],
Padding(
padding: const EdgeInsets.all(padding),
child: TextFormField(
controller: homeController.namecontroller,
validator: (value) => value!.trim().isEmpty
? SentenceManager(
currentLanguage:
homeController.selectedLanguage.value)
.sentences
.descriprtionCannotBeEmpty
: null,
decoration: InputDecoration(
labelText: SentenceManager(
currentLanguage:
homeController.selectedLanguage.value)
.sentences
.enterTaskDescription,
border: OutlineInputBorder(),
),
),
),
Padding(
padding: const EdgeInsets.all(padding),
child: buildProjectInput(context)),
Padding(
padding: const EdgeInsets.only(
left: padding, right: padding, top: padding),
child: buildDatePicker(context),
),
Padding(
padding: const EdgeInsets.all(padding),
child: buildPriority(context),
),
Padding(
padding: const EdgeInsets.all(padding),
child: buildTagsInput(context),
),
const Padding(padding: EdgeInsets.all(20)),
],
),
),
),
);
}

Expand Down
44 changes: 23 additions & 21 deletions lib/app/modules/home/views/home_page_floating_action_button.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'package:taskwarrior/app/modules/home/views/add_task_bottom_sheet_new.dart';
import 'package:taskwarrior/app/utils/themes/theme_extension.dart';
Expand Down Expand Up @@ -27,28 +28,28 @@ class HomePageFloatingActionButton extends StatelessWidget {
color: tColors.secondaryBackgroundColor,
),
),
onPressed: () => (showModalBottomSheet(
backgroundColor: tColors.dialogBackgroundColor,
context: context,
isScrollControlled: true,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(0),
topRight: Radius.circular(0),
),
onPressed: () {
Get.bottomSheet(
AddTaskBottomSheet(
homeController: controller,
forTaskC: controller.taskchampion.value,
forReplica: controller.taskReplica.value,
),
backgroundColor: tColors.dialogBackgroundColor,
isScrollControlled: true,
ignoreSafeArea: true,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(0),
topRight: Radius.circular(0),
),
builder: (context) => AddTaskBottomSheet(
homeController: controller,
forTaskC: controller.taskchampion.value,
forReplica: controller.taskReplica.value,
),
).then((value) {
if (controller.isSyncNeeded.value && value != "cancel") {
controller.isNeededtoSyncOnStart(context);
}
}))

// .then((value) {
),
).then((value) {
if (controller.isSyncNeeded.value && value != "cancel") {
controller.isNeededtoSyncOnStart(context);
}
});
Comment on lines +31 to +51
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Get.bottomSheet implementation looks good, but sync trigger on dismissal may cause unexpected UX.

The migration to Get.bottomSheet with ignoreSafeArea: true and isScrollControlled: true properly supports keyboard insets. However, the .then() callback (lines 47-50) will trigger isNeededtoSyncOnStart() when the user swipe-dismisses the sheet without saving, since value will be null (not "cancel").

Per the context snippet, isNeededtoSyncOnStart() performs a full synchronization and displays a SnackBar, which would be unexpected behavior for users who dismiss without creating a task.

This is the same pattern used in deep_link_service.dart (lines 151-155). Consider:

  1. Having AddTaskBottomSheet explicitly return "cancel" on dismissal without save, or
  2. Checking for a truthy success indicator (e.g., value == true or value == "saved")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/home/views/home_page_floating_action_button.dart` around
lines 31 - 51, The bottom sheet dismissal handler uses the returned value to
decide whether to call controller.isNeededtoSyncOnStart, but a swipe-dismiss
returns null so the current check (value != "cancel") can trigger unwanted
syncs; update the contract so AddTaskBottomSheet explicitly returns a clear
success token (e.g., "saved" or true) on successful save and "cancel" on user
cancel, and change the .then callback after Get.bottomSheet(...) to only trigger
controller.isNeededtoSyncOnStart(context) when value equals that success token
(and still respect controller.isSyncNeeded.value) so swipe-dismiss/null does not
cause a sync.

}, // .then((value) {
// // print(value);

// //if auto sync is turned on
Expand All @@ -65,3 +66,4 @@ class HomePageFloatingActionButton extends StatelessWidget {
);
}
}

14 changes: 14 additions & 0 deletions lib/app/modules/home/views/show_tasks.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:taskwarrior/app/modules/home/controllers/widget.controller.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
Expand Down Expand Up @@ -231,13 +233,25 @@ class TaskViewBuilder extends StatelessWidget {
await taskDatabase.open();
taskDatabase.markTaskAsCompleted(uuid);
completeTask('email', uuid);

if (Platform.isAndroid || Platform.isIOS) {
WidgetController widgetController = Get.put(WidgetController());
widgetController.fetchAllData();
widgetController.update();
}
}

void _markTaskAsDeleted(String uuid) async {
TaskDatabase taskDatabase = TaskDatabase();
await taskDatabase.open();
taskDatabase.markTaskAsDeleted(uuid);
deleteTask('email', uuid);

if (Platform.isAndroid || Platform.isIOS) {
WidgetController widgetController = Get.put(WidgetController());
widgetController.fetchAllData();
widgetController.update();
}
}

Color _getPriorityColor(String priority) {
Expand Down
12 changes: 12 additions & 0 deletions lib/app/modules/home/views/show_tasks_replica.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:taskwarrior/app/modules/home/controllers/widget.controller.dart';
import 'package:get/get.dart';
import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
import 'package:google_fonts/google_fonts.dart';
Expand Down Expand Up @@ -222,10 +224,20 @@ class TaskReplicaViewBuilder extends StatelessWidget {
void completeTask(TaskForReplica task) async {
await Replica.modifyTaskInReplica(task.copyWith(status: 'completed'));
Get.find<HomeController>().refreshReplicaTaskList();
if (Platform.isAndroid || Platform.isIOS) {
WidgetController widgetController = Get.put(WidgetController());
widgetController.fetchAllData();
widgetController.update();
}
}

void deleteTask(TaskForReplica task) async {
await Replica.deleteTaskFromReplica(task.uuid);
Get.find<HomeController>().refreshReplicaTaskList();
if (Platform.isAndroid || Platform.isIOS) {
WidgetController widgetController = Get.put(WidgetController());
widgetController.fetchAllData();
widgetController.update();
}
}
}
6 changes: 6 additions & 0 deletions lib/app/modules/home/views/tasks_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ class TasksBuilder extends StatelessWidget {
dtb!.add(const Duration(minutes: 1));
cancelNotification(task);
}
if (Platform.isAndroid || Platform.isIOS) {
WidgetController widgetController =
Get.put(WidgetController());
widgetController.fetchAllData();
widgetController.update();
}
},
icon: Icons.done,
label: SentenceManager(
Expand Down
Loading
Loading