build method Null safety

  1. @override
_$CheckoutResult build()
override

Builds.

The implementation of this method will be generated for you by the built_value generator.

Implementation

@override
_$CheckoutResult build() {
  _$CheckoutResult _$result;
  try {
    _$result = _$v ??
        new _$CheckoutResult._(
            transactionId: transactionId,
            transactionClientId: BuiltValueNullFieldError.checkNotNull(
                transactionClientId, 'CheckoutResult', 'transactionClientId'),
            locationId: BuiltValueNullFieldError.checkNotNull(
                locationId, 'CheckoutResult', 'locationId'),
            createdAt: BuiltValueNullFieldError.checkNotNull(
                createdAt, 'CheckoutResult', 'createdAt'),
            totalMoney: totalMoney.build(),
            totalTipMoney: totalTipMoney.build(),
            tenders: tenders.build());
  } catch (_) {
    late String _$failedField;
    try {
      _$failedField = 'totalMoney';
      totalMoney.build();
      _$failedField = 'totalTipMoney';
      totalTipMoney.build();
      _$failedField = 'tenders';
      tenders.build();
    } catch (e) {
      throw new BuiltValueNestedFieldError(
          'CheckoutResult', _$failedField, e.toString());
    }
    rethrow;
  }
  replace(_$result);
  return _$result;
}