GitHubContent class

Represents a content item in a GitHub repository.

This could be a file, directory, or submodule.

Constructors

GitHubContent({required String name, required String path, required int size, required String url, required String type, String? downloadUrl})
Creates a new GitHubContent instance.
GitHubContent.fromJson(Map<String, dynamic> json)
Creates a GitHubContent from JSON data.
factory

Properties

downloadUrl → String?
The download URL for this content item (only for files)
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
The name of the content item
final
path → String
The path of the content item
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → int
The size of the file in bytes
final
type → String
The type of the content (file, dir, or symlink)
final
url → String
The API URL for this content item
final

Methods

copyWith({String? name, String? path, int? size, String? url, String? downloadUrl, String? type}) → GitHubContent
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this GitHubContent to a JSON object.
toString() → String
A string representation of this object.
override

Operators

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