feat: appbar

This commit is contained in:
shenlong-tanwen
2024-10-27 23:43:58 +05:30
parent 5385d43c8c
commit 8450c8cc4f
40 changed files with 1150 additions and 211 deletions
@@ -0,0 +1,38 @@
class ServerVersion {
final int major;
final int minor;
final int patch;
const ServerVersion({
required this.major,
required this.minor,
required this.patch,
});
ServerVersion copyWith({int? major, int? minor, int? patch}) {
return ServerVersion(
major: major ?? this.major,
minor: minor ?? this.minor,
patch: patch ?? this.patch,
);
}
const ServerVersion.initial()
: major = 1,
minor = 1,
patch = 1;
@override
String toString() =>
'ServerVersion(major: $major, minor: $minor, patch: $patch)';
@override
bool operator ==(covariant ServerVersion other) {
if (identical(this, other)) return true;
return other.major == major && other.minor == minor && other.patch == patch;
}
@override
int get hashCode => major.hashCode ^ minor.hashCode ^ patch.hashCode;
}