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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 Screeninstead of redirecting to the web. This is an example response.The modified text is in
patch.\nfollowed by + indicates an addition and similarly\nfollowed by - indicates deletion.My idea is to split it on
\nand 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.
@pd4d10 commented on GitHub (Apr 30, 2020):
Perhaps
flutter_highlightpackage could do some help: