fix: reformat code / code improvements
This commit is contained in:
+3
-10
@@ -1,4 +1,5 @@
|
||||
import 'tab_item.dart';
|
||||
import '../utils/collection_utils.dart';
|
||||
|
||||
class BarTab {
|
||||
final String id;
|
||||
@@ -40,7 +41,7 @@ class BarTab {
|
||||
status == other.status &&
|
||||
openedAt == other.openedAt &&
|
||||
closedAt == other.closedAt &&
|
||||
_listEquals(items, other.items);
|
||||
listEquals(items, other.items);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
@@ -53,12 +54,4 @@ class BarTab {
|
||||
);
|
||||
}
|
||||
|
||||
bool _listEquals<T>(List<T>? a, List<T>? b) {
|
||||
if (identical(a, b)) return true;
|
||||
if (a == null || b == null) return a == b;
|
||||
if (a.length != b.length) return false;
|
||||
for (int i = 0; i < a.length; i++) {
|
||||
if (a[i] != b[i]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// _listEquals moved to utils/collection_utils.dart
|
||||
|
||||
Reference in New Issue
Block a user