aman-satu-flutter/lib/core/redux/state/sell_state.dart

24 lines
717 B
Dart

import 'package:meta/meta.dart';
import 'package:satu/core/models/auth/auth_response.dart';
import 'package:satu/core/models/flow/dao/product_dao.dart';
import 'package:satu/core/models/flow/transaction_state.dart';
@immutable
class SellState {
final List<ProductDao>? items;
final TransactionState? transactionState;
SellState({this.items, this.transactionState});
factory SellState.initial() => SellState(
items: [],
transactionState: TransactionState(),
);
SellState copyWith({required List<ProductDao>? items, required TransactionState? transactionState}) {
return SellState(items: items ?? this.items, transactionState: transactionState ?? this.transactionState);
}
}