terminal_size.dart 479 B

123456789101112131415161718192021222324
  1. class TerminalSize {
  2. final int width;
  3. final int height;
  4. const TerminalSize(this.width, this.height);
  5. @override
  6. String toString() => 'TerminalSize($width, $height)';
  7. @override
  8. bool operator ==(Object other) {
  9. if (identical(this, other)) {
  10. return true;
  11. }
  12. if (other is! TerminalSize) {
  13. return false;
  14. }
  15. return other.width == width && other.height == height;
  16. }
  17. @override
  18. int get hashCode => width.hashCode ^ height.hashCode;
  19. }