GithubCompareModel class abstract

Model for managing Github branch comparisons.

Githubのブランチ比較を管理するためのモデル。

Available extensions
Annotations
  • @freezed
  • @formValue
  • @immutable
  • @DocumentModelPath.new("organization/:organization_id/repository/:repository_id/compare/:compare_id", adapter: "GithubModelMasamuneAdapter.primary.modelAdapter")

Constructors

GithubCompareModel({String? status, @Default.new(0) int aheadBy, @Default.new(0) int behindBy, @Default.new(0) int totalCommits, @jsonParam GithubCommitModel? mergeBaseCommit, @jsonParam GithubCommitModel? baseCommit, @jsonParam @Default.new([]) List<GithubCommitModel> commits, ModelUri? diffUrl, ModelUri? patchUrl, ModelUri? htmlUrl, ModelUri? permalinkUrl, @Default.new(false) bool fromServer})
Model for managing Github branch comparisons.
const
factory
GithubCompareModel.fromJson(Map<String, Object?> json)
Convert from JSON.
factory

Properties

aheadBy int
How many commits ahead
no setterinherited
baseCommit GithubCommitModel?
Base commit
no setterinherited
behindBy int
How many commits behind
no setterinherited
commits List<GithubCommitModel>
Commits in the comparison
no setterinherited
copyWith → $GithubCompareModelCopyWith<GithubCompareModel>
Create a copy of GithubCompareModel with the given fields replaced by the non-null parameter values.
no setterinherited
diffUrl → ModelUri?
URL for diff
no setterinherited
fromServer bool
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
htmlUrl → ModelUri?
HTML URL
no setterinherited
mergeBaseCommit GithubCommitModel?
Merge base commit (divergence point)
no setterinherited
patchUrl → ModelUri?
URL for patch
no setterinherited
permalinkUrl → ModelUri?
Permalink URL
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status String?
Comparison status (behind, ahead, identical, diverged)
no setterinherited
totalCommits int
Total commits in comparison
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_GithubCompareModel value)) → TResult

Available on GithubCompareModel, provided by the GithubCompareModelPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_GithubCompareModel value)?) → TResult?

Available on GithubCompareModel, provided by the GithubCompareModelPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_GithubCompareModel value)?, {required TResult orElse()}) → TResult

Available on GithubCompareModel, provided by the GithubCompareModelPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String? status, int aheadBy, int behindBy, int totalCommits, GithubCommitModel? mergeBaseCommit, GithubCommitModel? baseCommit, List<GithubCommitModel> commits, ModelUri? diffUrl, ModelUri? patchUrl, ModelUri? htmlUrl, ModelUri? permalinkUrl, bool fromServer)?, {required TResult orElse()}) → TResult

Available on GithubCompareModel, provided by the GithubCompareModelPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this GithubCompareModel to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String? status, int aheadBy, int behindBy, int totalCommits, GithubCommitModel? mergeBaseCommit, GithubCommitModel? baseCommit, List<GithubCommitModel> commits, ModelUri? diffUrl, ModelUri? patchUrl, ModelUri? htmlUrl, ModelUri? permalinkUrl, bool fromServer)) → TResult

Available on GithubCompareModel, provided by the GithubCompareModelPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String? status, int aheadBy, int behindBy, int totalCommits, GithubCommitModel? mergeBaseCommit, GithubCommitModel? baseCommit, List<GithubCommitModel> commits, ModelUri? diffUrl, ModelUri? patchUrl, ModelUri? htmlUrl, ModelUri? permalinkUrl, bool fromServer)?) → TResult?

Available on GithubCompareModel, provided by the GithubCompareModelPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

document → const _$GithubCompareModelDocumentQuery
Query for document.
form → const _$GithubCompareModelFormQuery
Query for form value.