Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Binary file added android/app/src/main/res/drawable/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable/report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions ios/Runner/Assets.xcassets/plus.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "plus.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Copy link
Copy Markdown

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 plus icon

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

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

Repository: CCExtractor/taskwarrior-flutter

Length of output: 335


Add high-resolution image variants to the asset catalog.

The asset catalog defines 2x and 3x scale variants but only provides a filename for the 1x scale image. The plus@2x.png and plus@3x.png files are missing from this imageset directory. Without them, iOS will upscale the 1x image to fill higher resolutions, resulting in blurry or pixelated icons on retina displays.

Provide the following files to ensure crisp display across all iOS devices:

  • plus@2x.png for 2x scale (retina displays)
  • plus@3x.png for 3x scale (super retina displays)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ios/Runner/Assets.xcassets/plus.imageset/Contents.json` around lines 1 - 21,
The imageset references 2x and 3x variants but only provides "plus.png" for 1x,
so add high-resolution assets named exactly "plus@2x.png" and "plus@3x.png" into
the plus.imageset folder and update the imageset entry if necessary so the
"filename" fields for the 2x and 3x entries point to "plus@2x.png" and
"plus@3x.png" respectively; ensure the files are properly sized (2x and 3x of
the base) and included in the Xcode asset catalog.

Binary file added ios/Runner/Assets.xcassets/plus.imageset/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions ios/Runner/Assets.xcassets/report.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images": [
{
"idiom": "universal",
"filename": "report.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"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.
65 changes: 58 additions & 7 deletions lib/app/services/deep_link_service.dart
Original file line number Diff line number Diff line change
@@ -1,28 +1,73 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:app_links/app_links.dart';
import 'package:quick_actions/quick_actions.dart';
import 'package:taskwarrior/app/modules/home/views/add_task_bottom_sheet_new.dart';
import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
import 'package:taskwarrior/app/routes/app_pages.dart';

class DeepLinkService extends GetxService {
late AppLinks _appLinks;
Uri? _queuedUri;
Uri? get queuedUri => _queuedUri;

@override
void onReady() {
super.onReady();
_initDeepLinks();
}
final QuickActions _quickActions = const QuickActions();
StreamSubscription<Uri>? _linkSubscription;

void _initDeepLinks() {
Future<void> init() async {
_appLinks = AppLinks();
_appLinks.uriLinkStream.listen((uri) {

await _initQuickActions();

try {
final initialUri = await _appLinks.getInitialLink();
if (initialUri != null) {
_queuedUri = initialUri;
debugPrint('🔗 INITIAL LINK QUEUED: $_queuedUri');
}
} catch (e) {
debugPrint('Deep link init error: $e');
}

_linkSubscription = _appLinks.uriLinkStream.listen((uri) {
debugPrint('🔗 LINK RECEIVED: $uri');
_handleWidgetUri(uri);
}, onError: (err) {
debugPrint('🔗 LINK STREAM ERROR: $err');
});
}

Future<void> _initQuickActions() async {
await _quickActions.initialize((String shortcutType) {
debugPrint("⚡ SHORTCUT RECEIVED: $shortcutType");
if (shortcutType == 'shortcut_add_task') {
_handleWidgetUri(Uri.parse('taskwarrior://addclicked'));
} else if (shortcutType == 'shortcut_reports') {
_handleWidgetUri(Uri.parse('taskwarrior://reports'));
}
});

await _quickActions.setShortcutItems(<ShortcutItem>[
const ShortcutItem(
type: 'shortcut_add_task',
localizedTitle: 'Add Task',
icon: 'plus',
),
const ShortcutItem(
type: 'shortcut_reports',
localizedTitle: 'Reports',
icon: 'report',
),
]);
}

@override
void onClose() {
_linkSubscription?.cancel();
super.onClose();
}

void _handleWidgetUri(Uri uri) {
if (Get.isRegistered<HomeController>()) {
_executeAction(uri, Get.find<HomeController>());
Expand Down Expand Up @@ -64,6 +109,12 @@ class DeepLinkService extends GetxService {
),
);
}
} else if (uri.host == "reports") {
if (Get.context != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
Get.toNamed(Routes.REPORTS);
});
}
}
}
}
8 changes: 5 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
// 1. Add this import
import 'package:app_links/app_links.dart';
import 'package:taskwarrior/app/services/deep_link_service.dart';

import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
Expand Down Expand Up @@ -42,7 +40,11 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized();
await AppSettings.init();

Get.put<DeepLinkService>(DeepLinkService(), permanent: true);
await Get.putAsync<DeepLinkService>(() async {
final service = DeepLinkService();
await service.init();
return service;
}, permanent: true);
runApp(
GetMaterialApp(
darkTheme: darkTheme,
Expand Down
92 changes: 90 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.3"
app_links:
dependency: "direct main"
description:
name: app_links
sha256: "5f88447519add627fe1cbcab4fd1da3d4fed15b9baf29f28b22535c95ecee3e8"
url: "https://pub.dev"
source: hosted
version: "6.4.1"
app_links_linux:
dependency: transitive
description:
name: app_links_linux
sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81
url: "https://pub.dev"
source: hosted
version: "1.0.3"
app_links_platform_interface:
dependency: transitive
description:
name: app_links_platform_interface
sha256: "05f5379577c513b534a29ddea68176a4d4802c46180ee8e2e966257158772a3f"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
app_links_web:
dependency: transitive
description:
name: app_links_web
sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555
url: "https://pub.dev"
source: hosted
version: "1.0.4"
archive:
dependency: transitive
description:
Expand Down Expand Up @@ -65,6 +97,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.0"
build_cli_annotations:
dependency: transitive
description:
name: build_cli_annotations
sha256: e563c2e01de8974566a1998410d3f6f03521788160a02503b0b1f1a46c7b3d95
url: "https://pub.dev"
source: hosted
version: "2.1.1"
build_config:
dependency: transitive
description:
Expand Down Expand Up @@ -519,6 +559,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.32"
flutter_rust_bridge:
dependency: "direct main"
description:
name: flutter_rust_bridge
sha256: "37ef40bc6f863652e865f0b2563ea07f0d3c58d8efad803cc01933a4b2ee067e"
url: "https://pub.dev"
source: hosted
version: "2.11.1"
flutter_slidable:
dependency: "direct main"
description:
Expand Down Expand Up @@ -601,6 +649,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.2"
gtk:
dependency: transitive
description:
name: gtk
sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c
url: "https://pub.dev"
source: hosted
version: "2.1.0"
hashcodes:
dependency: transitive
description:
Expand Down Expand Up @@ -1049,6 +1105,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.5.0"
quick_actions:
dependency: "direct main"
description:
name: quick_actions
sha256: "7e35dd6a21f5bbd21acf6899039eaf85001a5ac26d52cbd6a8a2814505b90798"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
quick_actions_android:
dependency: transitive
description:
name: quick_actions_android
sha256: "23f04632ada7fc16665d84ba54a0c792c09727e7fda6c989c6e6ba1853aa15dc"
url: "https://pub.dev"
source: hosted
version: "1.0.27"
quick_actions_ios:
dependency: transitive
description:
name: quick_actions_ios
sha256: a2e08ceb01f9d26e1b1826b1c4f5da6b7b6bbf61bcbaacd8e93dfff58b91f996
url: "https://pub.dev"
source: hosted
version: "1.2.3"
quick_actions_platform_interface:
dependency: transitive
description:
name: quick_actions_platform_interface
sha256: "1fec7068db5122cd019e9340d3d7be5d36eab099695ef3402c7059ee058329a4"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
quiver:
dependency: transitive
description:
Expand Down Expand Up @@ -1141,10 +1229,10 @@ packages:
dependency: transitive
description:
name: shelf_web_socket
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "3.0.0"
sizer:
dependency: "direct main"
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ dependencies:
flutter_rust_bridge: ^2.11.1
ffi: any # Required for FFI
app_links: ^6.4.1
quick_actions: ^1.1.0

dev_dependencies:
build_runner: null
Expand Down