Skip to content

Instantly share code, notes, and snippets.

@tjarvstrand
Last active November 29, 2024 08:43
Show Gist options
  • Save tjarvstrand/024a1d4b8380790585512a223736e26e to your computer and use it in GitHub Desktop.
Save tjarvstrand/024a1d4b8380790585512a223736e26e to your computer and use it in GitHub Desktop.
Identity comparison
extension type FillInFileId(String value) {}
class FileUploadStatus {
FileUploadStatus(
this.fileId,
this.fileName,
this.isUploading,
);
final FillInFileId fileId;
final String fileName;
final bool isUploading;
}
void main() {
final a = FileUploadStatus(FillInFileId('1'), 'a', false);
print(a == a);
final b = FileUploadStatus(FillInFileId('1'), 'a', false);
print(a == b);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment