improved tab & topic handling
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:fast_equatable/fast_equatable.dart';
|
||||
|
||||
class TopicData with FastEquatable {
|
||||
final String id;
|
||||
final String? name;
|
||||
final Color color;
|
||||
|
||||
TopicData({required this.id, this.name, required this.color});
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
|
||||
@override
|
||||
List<Object?> get hashParameters => [
|
||||
id,
|
||||
name,
|
||||
color,
|
||||
];
|
||||
}
|
||||
|
||||
class TopicDataWithCount extends TopicData {
|
||||
final int? tabCount;
|
||||
|
||||
TopicDataWithCount({
|
||||
required super.id,
|
||||
super.name,
|
||||
required super.color,
|
||||
required this.tabCount,
|
||||
});
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
|
||||
@override
|
||||
List<Object?> get hashParameters => [
|
||||
...super.hashParameters,
|
||||
tabCount,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user