provider_state_management/lib/model/products.dart

35 lines
576 B
Dart
Raw Normal View History

2022-08-22 19:18:37 +07:00
class ProductModel {
final String? id;
final String? name;
bool select;
ProductModel({this.id, this.name, this.select = false});
static List<ProductModel> person = [
ProductModel(
id: '0001',
name: 'brahim',
),
ProductModel(
id: '0002',
name: 'Bong Tharoth',
),
ProductModel(
id: '0003',
name: 'B Sambo',
),
ProductModel(
id: '0004',
name: 'Bong MengSreang',
),
ProductModel(
id: '0005',
name: 'brahim',
),
];
void setSelected() {
select = !select;
}
}