option_model.dart 468 B

1234567891011121314151617181920212223
  1. import 'package:flutter/material.dart';
  2. class OptionModel<T> {
  3. final T value;
  4. final String label;
  5. final IconData? icon;
  6. const OptionModel({
  7. required this.value,
  8. required this.label,
  9. this.icon,
  10. });
  11. @override
  12. bool operator ==(Object other) =>
  13. identical(this, other) ||
  14. other is OptionModel &&
  15. runtimeType == other.runtimeType &&
  16. value == other.value;
  17. @override
  18. int get hashCode => value.hashCode;
  19. }