I noticed this a while back. Forgot to get to it. Opening an issue in case I forget again.
Originally created by @shreyas1599 on GitHub (Feb 1, 2021).
Original GitHub issue: https://github.com/pd4d10/git-touch/issues/182
I noticed this a while back. Forgot to get to it. Opening an issue in case I forget again.

This seems to be a problem of HighlightView. This is the offending line. When patch is null as is the case with the above screenshot, the error occurs.
<!-- gh-comment-id:771645730 -->
@shreyas1599 commented on GitHub (Feb 2, 2021):
This seems to be a problem of `HighlightView`. [This](https://github.com/git-touch/highlight/blob/251505aae568e95ad941e023c110495fa5ad0a16/flutter_highlight/lib/flutter_highlight.dart#L37) is the offending line. When `patch` is null as is the case with the above screenshot, the error occurs.
I can catch it in files_item.dart itself but I think it would be better for the package to handle null.
<!-- gh-comment-id:771647775 -->
@shreyas1599 commented on GitHub (Feb 2, 2021):
I can catch it in `files_item.dart` itself but I think it would be better for the package to handle null.
I'm thinking of replacing this line with patch ?? "No text to be shown here" or should I just leave it as an empty string. I think the first option is better because github returns a null patch only if the file has binary data. What do you think @pd4d10 ?
<!-- gh-comment-id:771652097 -->
@shreyas1599 commented on GitHub (Feb 2, 2021):
I'm thinking of replacing [this line](https://github.com/git-touch/git-touch/blob/918d0f3971b80fba411143a6bf1d3705eb1e4abb/lib/widgets/files_item.dart#L44) with `patch ?? "No text to be shown here"` or should I just leave it as an empty string. I think the first option is better because github returns a null patch only if the file has binary data. What do you think @pd4d10 ?
OK. I have no strong preference for this, as long as it is easy to understand for users.
<!-- gh-comment-id:771657474 -->
@pd4d10 commented on GitHub (Feb 2, 2021):
OK. I have no strong preference for this, as long as it is easy to understand for users.
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 (Feb 1, 2021).
Original GitHub issue: https://github.com/pd4d10/git-touch/issues/182
I noticed this a while back. Forgot to get to it. Opening an issue in case I forget again.
@shreyas1599 commented on GitHub (Feb 2, 2021):
This seems to be a problem of
HighlightView. This is the offending line. Whenpatchis null as is the case with the above screenshot, the error occurs.@shreyas1599 commented on GitHub (Feb 2, 2021):
I can catch it in
files_item.dartitself but I think it would be better for the package to handle null.@shreyas1599 commented on GitHub (Feb 2, 2021):
I'm thinking of replacing this line with
patch ?? "No text to be shown here"or should I just leave it as an empty string. I think the first option is better because github returns a null patch only if the file has binary data. What do you think @pd4d10 ?@pd4d10 commented on GitHub (Feb 2, 2021):
OK. I have no strong preference for this, as long as it is easy to understand for users.