CustomerNotifier constructor

CustomerNotifier({
  1. required Checkout checkout,
  2. required String customerId,
  3. required String name,
})

Implementation

CustomerNotifier({
  required this.checkout,
  required this.customerId,
  required this.name,
}) : super(const AsyncValue.loading()) {
  if (customerId.isNotEmpty) {
    getCustomerDetails(customerId);
  } else {
    state = AsyncValue.data(
        Customer(id: "", instruments: [], email: '', name: ''));
  }
}