cake_wallet/lib/utils/item_cell.dart

21 lines
552 B
Dart
Raw Permalink Normal View History

2020-09-07 15:13:39 +00:00
import 'package:flutter/foundation.dart';
2020-09-26 19:17:31 +00:00
import 'package:mobx/mobx.dart';
2020-09-07 15:13:39 +00:00
import 'package:cake_wallet/utils/mobx.dart';
2021-12-24 12:37:24 +00:00
import 'package:cw_core/keyable.dart';
2020-09-26 19:17:31 +00:00
// part 'node_list_view_model.g.dart';
//
// class NodeListViewModel = NodeListViewModelBase with _$NodeListViewModel;
2020-09-07 15:13:39 +00:00
class ItemCell<Item> with Keyable {
2022-10-12 17:09:57 +00:00
ItemCell(this.value, {
required this.isSelectedBuilder,
required dynamic key}) {
2020-09-07 15:13:39 +00:00
keyIndex = key;
}
final Item value;
2020-09-26 19:17:31 +00:00
bool get isSelected => isSelectedBuilder(value);
bool Function(Item item) isSelectedBuilder;
2020-09-07 15:13:39 +00:00
}