pd4d10 / git-touch

An open-source app for GitHub, GitLab, Bitbucket, Gitea, and Gitee(码云), built with Flutter
Apache License 2.0
1.53k stars 130 forks source link

fix(gh issue): null check error #241

Closed shreyas1599 closed 3 years ago

shreyas1599 commented 3 years ago
  String get _keyword => _controller!.text?.trim() ?? '';
                                      ^
lib/screens/gh_repo.dart:273:54: Warning: Operand of null-aware operation '?.' has type 'GRepoCommit_history' which excludes null.
 - 'GRepoCommit_history' is from 'package:git_touch/graphql/github.data.gql.dart' ('lib/graphql/github.data.gql.dart').
                        ((ref.target as GRepoCommit).history?.totalCount ?? 0)
                                                     ^
lib/screens/gl_search.dart:29:39: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null.
  String get _keyword => _controller!.text?.trim() ?? '';
                                      ^
lib/screens/gh_search.dart:28:39: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null.
  String get _keyword => _controller!.text?.trim() ?? '';

image

shreyas1599 commented 3 years ago

Not sure why repository_item is flagged in the check. Is unchanged on my local machine when I run dartfmt

pd4d10 commented 3 years ago

Sorry, just pushed my local changes and there may be some conflicts.

Could you please solve these? Thanks!

shreyas1599 commented 3 years ago

Sorry, just pushed my local changes and there may be some conflicts.

Could you please solve these? Thanks!

Looks like your latest commit includes the changes I made in this pr. Closing this.