[GH-ISSUE #74] Files changed screen in a PR #1891

Closed
opened 2026-04-24 17:55:05 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @shreyas1599 on GitHub (Apr 29, 2020).
Original GitHub issue: https://github.com/pd4d10/git-touch/issues/74

Hi @pd4d10,
So I'm trying to add a Files Changed Screen instead of redirecting to the web. This is an example response.

The modified text is in patch.

\n followed by + indicates an addition and similarly \n followed by - indicates deletion.

My idea is to split it on \n and every list item that starts with a + I'm thinking of wrapping with Text with green color and similarly red color for -. Is this a right approach or would you suggest an alternative way?

Also I'm unable to understand the starting portion of the patch. I know it has something to do with the line number. Take the first item of the example response
@@ -313,3 +313,15.

Do you have an idea?

I'll put a list of files with a drop-down for every file which will expand to display the changes.

Originally created by @shreyas1599 on GitHub (Apr 29, 2020). Original GitHub issue: https://github.com/pd4d10/git-touch/issues/74 Hi @pd4d10, So I'm trying to add a `Files Changed Screen` instead of redirecting to the web. This is an example [response](https://api.github.com/repos/git-touch/git-touch/pulls/72/files). The modified text is in `patch`. `\n` followed by + indicates an addition and similarly `\n` followed by - indicates deletion. My idea is to split it on `\n` and every list item that starts with a `+` I'm thinking of wrapping with Text with green color and similarly red color for `-`. Is this a right approach or would you suggest an alternative way? Also I'm unable to understand the starting portion of the patch. I know it has something to do with the line number. Take the first item of the example [response](https://api.github.com/repos/git-touch/git-touch/pulls/72/files) `@@ -313,3 +313,15`. Do you have an idea? I'll put a list of files with a drop-down for every file which will expand to display the changes.
Author
Owner

@pd4d10 commented on GitHub (Apr 30, 2020):

Perhaps flutter_highlight package could do some help:

HighlightView(
  code: '', // The diff code
  language: 'diff',
)
<!-- gh-comment-id:621580603 --> @pd4d10 commented on GitHub (Apr 30, 2020): Perhaps `flutter_highlight` package could do some help: ```dart HighlightView( code: '', // The diff code language: 'diff', ) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/git-touch#1891