Line data Source code
1 : import 'package:widgetbook_generator/code_generators/instances/base_instance.dart'; 2 : 3 : abstract class PrimaryInstance<T> extends BaseInstance { 4 11 : const PrimaryInstance({required this.value}); 5 : final T value; 6 : 7 1 : @override 8 2 : String toString() => 'PrimaryInstance(value: $value)'; 9 : 10 2 : @override 11 : bool operator ==(Object other) { 12 : if (identical(this, other)) return true; 13 : 14 8 : return other is PrimaryInstance<T> && other.value == value; 15 : } 16 : 17 1 : @override 18 2 : int get hashCode => value.hashCode; 19 : }