Null safety
This commit is contained in:
parent
ef4ff0f1cc
commit
f5e6fe9cfe
132
lib/colors.dart
132
lib/colors.dart
|
|
@ -8,18 +8,18 @@ import 'data/models/static/color_theme_model.dart';
|
|||
class InvoiceStatusColors {
|
||||
InvoiceStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kInvoiceStatusDraft: _colorTheme.colorLightGray,
|
||||
kInvoiceStatusSent: _colorTheme.colorInfo,
|
||||
kInvoiceStatusPartial: _colorTheme.colorPrimary,
|
||||
kInvoiceStatusPaid: _colorTheme.colorSuccess,
|
||||
kInvoiceStatusPastDue: _colorTheme.colorDanger,
|
||||
kInvoiceStatusCancelled: _colorTheme.colorDarkGray,
|
||||
kInvoiceStatusReversed: _colorTheme.colorDarkGray,
|
||||
kInvoiceStatusViewed: _colorTheme.colorWarning,
|
||||
kInvoiceStatusDraft: _colorTheme!.colorLightGray,
|
||||
kInvoiceStatusSent: _colorTheme!.colorInfo,
|
||||
kInvoiceStatusPartial: _colorTheme!.colorPrimary,
|
||||
kInvoiceStatusPaid: _colorTheme!.colorSuccess,
|
||||
kInvoiceStatusPastDue: _colorTheme!.colorDanger,
|
||||
kInvoiceStatusCancelled: _colorTheme!.colorDarkGray,
|
||||
kInvoiceStatusReversed: _colorTheme!.colorDarkGray,
|
||||
kInvoiceStatusViewed: _colorTheme!.colorWarning,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -27,15 +27,15 @@ class InvoiceStatusColors {
|
|||
class RecurringInvoiceStatusColors {
|
||||
RecurringInvoiceStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kRecurringInvoiceStatusDraft: _colorTheme.colorLightGray,
|
||||
kRecurringInvoiceStatusActive: _colorTheme.colorSuccess,
|
||||
kRecurringInvoiceStatusPaused: _colorTheme.colorDarkGray,
|
||||
kRecurringInvoiceStatusCompleted: _colorTheme.colorInfo,
|
||||
kRecurringInvoiceStatusPending: _colorTheme.colorPrimary,
|
||||
kRecurringInvoiceStatusDraft: _colorTheme!.colorLightGray,
|
||||
kRecurringInvoiceStatusActive: _colorTheme!.colorSuccess,
|
||||
kRecurringInvoiceStatusPaused: _colorTheme!.colorDarkGray,
|
||||
kRecurringInvoiceStatusCompleted: _colorTheme!.colorInfo,
|
||||
kRecurringInvoiceStatusPending: _colorTheme!.colorPrimary,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -43,15 +43,15 @@ class RecurringInvoiceStatusColors {
|
|||
class CreditStatusColors {
|
||||
CreditStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kCreditStatusDraft: _colorTheme.colorLightGray,
|
||||
kCreditStatusSent: _colorTheme.colorInfo,
|
||||
kCreditStatusPartial: _colorTheme.colorPrimary,
|
||||
kCreditStatusApplied: _colorTheme.colorSuccess,
|
||||
kCreditStatusViewed: _colorTheme.colorWarning,
|
||||
kCreditStatusDraft: _colorTheme!.colorLightGray,
|
||||
kCreditStatusSent: _colorTheme!.colorInfo,
|
||||
kCreditStatusPartial: _colorTheme!.colorPrimary,
|
||||
kCreditStatusApplied: _colorTheme!.colorSuccess,
|
||||
kCreditStatusViewed: _colorTheme!.colorWarning,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -59,16 +59,16 @@ class CreditStatusColors {
|
|||
class PurchaseOrderStatusColors {
|
||||
PurchaseOrderStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kPurchaseOrderStatusDraft: _colorTheme.colorLightGray,
|
||||
kPurchaseOrderStatusSent: _colorTheme.colorInfo,
|
||||
kPurchaseOrderStatusAccepted: _colorTheme.colorPrimary,
|
||||
kPurchaseOrderStatusReceived: _colorTheme.colorSuccess,
|
||||
kPurchaseOrderStatusCancelled: _colorTheme.colorDanger,
|
||||
kPurchaseOrderStatusViewed: _colorTheme.colorWarning,
|
||||
kPurchaseOrderStatusDraft: _colorTheme!.colorLightGray,
|
||||
kPurchaseOrderStatusSent: _colorTheme!.colorInfo,
|
||||
kPurchaseOrderStatusAccepted: _colorTheme!.colorPrimary,
|
||||
kPurchaseOrderStatusReceived: _colorTheme!.colorSuccess,
|
||||
kPurchaseOrderStatusCancelled: _colorTheme!.colorDanger,
|
||||
kPurchaseOrderStatusViewed: _colorTheme!.colorWarning,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -76,13 +76,13 @@ class PurchaseOrderStatusColors {
|
|||
class TransactionStatusColors {
|
||||
TransactionStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kTransactionStatusUnmatched: _colorTheme.colorInfo,
|
||||
kTransactionStatusMatched: _colorTheme.colorPrimary,
|
||||
kTransactionStatusConverted: _colorTheme.colorSuccess,
|
||||
kTransactionStatusUnmatched: _colorTheme!.colorInfo,
|
||||
kTransactionStatusMatched: _colorTheme!.colorPrimary,
|
||||
kTransactionStatusConverted: _colorTheme!.colorSuccess,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -90,16 +90,16 @@ class TransactionStatusColors {
|
|||
class QuoteStatusColors {
|
||||
QuoteStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kQuoteStatusDraft: _colorTheme.colorLightGray,
|
||||
kQuoteStatusSent: _colorTheme.colorInfo,
|
||||
kQuoteStatusApproved: _colorTheme.colorPrimary,
|
||||
kQuoteStatusConverted: _colorTheme.colorSuccess,
|
||||
kQuoteStatusExpired: _colorTheme.colorDanger,
|
||||
kQuoteStatusViewed: _colorTheme.colorWarning,
|
||||
kQuoteStatusDraft: _colorTheme!.colorLightGray,
|
||||
kQuoteStatusSent: _colorTheme!.colorInfo,
|
||||
kQuoteStatusApproved: _colorTheme!.colorPrimary,
|
||||
kQuoteStatusConverted: _colorTheme!.colorSuccess,
|
||||
kQuoteStatusExpired: _colorTheme!.colorDanger,
|
||||
kQuoteStatusViewed: _colorTheme!.colorWarning,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -107,18 +107,18 @@ class QuoteStatusColors {
|
|||
class PaymentStatusColors {
|
||||
PaymentStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kPaymentStatusPending: _colorTheme.colorLightGray,
|
||||
kPaymentStatusCancelled: _colorTheme.colorDarkGray,
|
||||
kPaymentStatusFailed: _colorTheme.colorDanger,
|
||||
kPaymentStatusCompleted: _colorTheme.colorSuccess,
|
||||
kPaymentStatusPartiallyRefunded: _colorTheme.colorPrimary,
|
||||
kPaymentStatusRefunded: _colorTheme.colorDarkGray,
|
||||
kPaymentStatusUnapplied: _colorTheme.colorInfo,
|
||||
kPaymentStatusPartiallyUnapplied: _colorTheme.colorInfo,
|
||||
kPaymentStatusPending: _colorTheme!.colorLightGray,
|
||||
kPaymentStatusCancelled: _colorTheme!.colorDarkGray,
|
||||
kPaymentStatusFailed: _colorTheme!.colorDanger,
|
||||
kPaymentStatusCompleted: _colorTheme!.colorSuccess,
|
||||
kPaymentStatusPartiallyRefunded: _colorTheme!.colorPrimary,
|
||||
kPaymentStatusRefunded: _colorTheme!.colorDarkGray,
|
||||
kPaymentStatusUnapplied: _colorTheme!.colorInfo,
|
||||
kPaymentStatusPartiallyUnapplied: _colorTheme!.colorInfo,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -126,14 +126,14 @@ class PaymentStatusColors {
|
|||
class ExpenseStatusColors {
|
||||
ExpenseStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kExpenseStatusLogged: _colorTheme.colorLightGray,
|
||||
kExpenseStatusPending: _colorTheme.colorPrimary,
|
||||
kExpenseStatusInvoiced: _colorTheme.colorSuccess,
|
||||
kExpenseStatusPaid: _colorTheme.colorInfo,
|
||||
kExpenseStatusLogged: _colorTheme!.colorLightGray,
|
||||
kExpenseStatusPending: _colorTheme!.colorPrimary,
|
||||
kExpenseStatusInvoiced: _colorTheme!.colorSuccess,
|
||||
kExpenseStatusPaid: _colorTheme!.colorInfo,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -141,13 +141,13 @@ class ExpenseStatusColors {
|
|||
class TaskStatusColors {
|
||||
TaskStatusColors(this._colorTheme);
|
||||
|
||||
final ColorTheme _colorTheme;
|
||||
final ColorTheme? _colorTheme;
|
||||
|
||||
Map<String, Color> get colors {
|
||||
Map<String, Color?> get colors {
|
||||
return {
|
||||
kTaskStatusLogged: _colorTheme.colorLightGray,
|
||||
kTaskStatusRunning: _colorTheme.colorPrimary,
|
||||
kTaskStatusInvoiced: _colorTheme.colorSuccess,
|
||||
kTaskStatusLogged: _colorTheme!.colorLightGray,
|
||||
kTaskStatusRunning: _colorTheme!.colorPrimary,
|
||||
kTaskStatusInvoiced: _colorTheme!.colorSuccess,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class FileStorage {
|
|||
*/
|
||||
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
String value = prefs.getString(tag);
|
||||
String? value = prefs.getString(tag);
|
||||
|
||||
if (value != null) {
|
||||
return value;
|
||||
|
|
@ -88,7 +88,7 @@ class FileStorage {
|
|||
}
|
||||
}
|
||||
|
||||
Future<File> save(String data) async {
|
||||
Future<File?> save(String data) async {
|
||||
if (kIsWeb) {
|
||||
/*
|
||||
final db = await _getIndexedDb();
|
||||
|
|
@ -104,7 +104,7 @@ class FileStorage {
|
|||
} catch (e) {
|
||||
if ('$e'.contains('QuotaExceededError')) {
|
||||
await prefs.remove(tag);
|
||||
final gzipBytes = GZipEncoder().encode(utf8.encode(data));
|
||||
final gzipBytes = GZipEncoder().encode(utf8.encode(data))!;
|
||||
final zipped = base64Encode(gzipBytes);
|
||||
try {
|
||||
await prefs.setString(tag + GZIP_TAG, zipped);
|
||||
|
|
@ -124,7 +124,7 @@ class FileStorage {
|
|||
}
|
||||
}
|
||||
|
||||
Future<FileSystemEntity> delete() async {
|
||||
Future<FileSystemEntity?> delete() async {
|
||||
if (kIsWeb) {
|
||||
/*
|
||||
final db = await _getIndexedDb();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ part 'account_model.g.dart';
|
|||
|
||||
abstract class AccountEntity
|
||||
implements Built<AccountEntity, AccountEntityBuilder> {
|
||||
factory AccountEntity(bool reportErrors, {String id, AppState state}) {
|
||||
factory AccountEntity(bool reportErrors, {String? id, AppState? state}) {
|
||||
return _$AccountEntity._(
|
||||
id: '',
|
||||
key: '',
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ class _$AccountEntitySerializer implements StructuredSerializer<AccountEntity> {
|
|||
final String wireName = 'AccountEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, AccountEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, AccountEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
'key',
|
||||
|
|
@ -95,111 +95,111 @@ class _$AccountEntitySerializer implements StructuredSerializer<AccountEntity> {
|
|||
|
||||
@override
|
||||
AccountEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new AccountEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'key':
|
||||
result.key = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'trial_started':
|
||||
result.trialStarted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'default_url':
|
||||
result.defaultUrl = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'report_errors':
|
||||
result.reportErrors = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'plan':
|
||||
result.plan = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'plan_expires':
|
||||
result.planExpires = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'latest_version':
|
||||
result.latestVersion = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'current_version':
|
||||
result.currentVersion = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'debug_enabled':
|
||||
result.debugEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'is_docker':
|
||||
result.isDocker = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'is_migrated':
|
||||
result.isMigrated = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'is_hosted':
|
||||
result.isHosted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'is_scheduler_running':
|
||||
result.isSchedulerRunning = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'disable_auto_update':
|
||||
result.disableAutoUpdate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'default_company_id':
|
||||
result.defaultCompanyId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'hosted_client_count':
|
||||
result.hostedClientCount = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'hosted_company_count':
|
||||
result.hostedCompanyCount = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'set_react_as_default_ap':
|
||||
result.setReactAsDefaultAP = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'account_sms_verified':
|
||||
result.accountSmsVerified = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'trial_days_left':
|
||||
result.trialDaysLeft = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'has_iap_plan':
|
||||
result.hasIapPlan = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'payment_id':
|
||||
result.paymentId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'tax_api_enabled':
|
||||
result.taxApiEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -258,34 +258,34 @@ class _$AccountEntity extends AccountEntity {
|
|||
@override
|
||||
final bool taxApiEnabled;
|
||||
|
||||
factory _$AccountEntity([void Function(AccountEntityBuilder) updates]) =>
|
||||
factory _$AccountEntity([void Function(AccountEntityBuilder)? updates]) =>
|
||||
(new AccountEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$AccountEntity._(
|
||||
{this.id,
|
||||
this.key,
|
||||
this.trialStarted,
|
||||
this.defaultUrl,
|
||||
this.reportErrors,
|
||||
this.plan,
|
||||
this.planExpires,
|
||||
this.latestVersion,
|
||||
this.currentVersion,
|
||||
this.debugEnabled,
|
||||
this.isDocker,
|
||||
this.isMigrated,
|
||||
this.isHosted,
|
||||
this.isSchedulerRunning,
|
||||
this.disableAutoUpdate,
|
||||
this.defaultCompanyId,
|
||||
this.hostedClientCount,
|
||||
this.hostedCompanyCount,
|
||||
this.setReactAsDefaultAP,
|
||||
this.accountSmsVerified,
|
||||
this.trialDaysLeft,
|
||||
this.hasIapPlan,
|
||||
this.paymentId,
|
||||
this.taxApiEnabled})
|
||||
{required this.id,
|
||||
required this.key,
|
||||
required this.trialStarted,
|
||||
required this.defaultUrl,
|
||||
required this.reportErrors,
|
||||
required this.plan,
|
||||
required this.planExpires,
|
||||
required this.latestVersion,
|
||||
required this.currentVersion,
|
||||
required this.debugEnabled,
|
||||
required this.isDocker,
|
||||
required this.isMigrated,
|
||||
required this.isHosted,
|
||||
required this.isSchedulerRunning,
|
||||
required this.disableAutoUpdate,
|
||||
required this.defaultCompanyId,
|
||||
required this.hostedClientCount,
|
||||
required this.hostedCompanyCount,
|
||||
required this.setReactAsDefaultAP,
|
||||
required this.accountSmsVerified,
|
||||
required this.trialDaysLeft,
|
||||
required this.hasIapPlan,
|
||||
required this.paymentId,
|
||||
required this.taxApiEnabled})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'AccountEntity', 'id');
|
||||
BuiltValueNullFieldError.checkNotNull(key, r'AccountEntity', 'key');
|
||||
|
|
@ -371,10 +371,10 @@ class _$AccountEntity extends AccountEntity {
|
|||
taxApiEnabled == other.taxApiEnabled;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, key.hashCode);
|
||||
|
|
@ -437,112 +437,113 @@ class _$AccountEntity extends AccountEntity {
|
|||
|
||||
class AccountEntityBuilder
|
||||
implements Builder<AccountEntity, AccountEntityBuilder> {
|
||||
_$AccountEntity _$v;
|
||||
_$AccountEntity? _$v;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String _key;
|
||||
String get key => _$this._key;
|
||||
set key(String key) => _$this._key = key;
|
||||
String? _key;
|
||||
String? get key => _$this._key;
|
||||
set key(String? key) => _$this._key = key;
|
||||
|
||||
String _trialStarted;
|
||||
String get trialStarted => _$this._trialStarted;
|
||||
set trialStarted(String trialStarted) => _$this._trialStarted = trialStarted;
|
||||
String? _trialStarted;
|
||||
String? get trialStarted => _$this._trialStarted;
|
||||
set trialStarted(String? trialStarted) => _$this._trialStarted = trialStarted;
|
||||
|
||||
String _defaultUrl;
|
||||
String get defaultUrl => _$this._defaultUrl;
|
||||
set defaultUrl(String defaultUrl) => _$this._defaultUrl = defaultUrl;
|
||||
String? _defaultUrl;
|
||||
String? get defaultUrl => _$this._defaultUrl;
|
||||
set defaultUrl(String? defaultUrl) => _$this._defaultUrl = defaultUrl;
|
||||
|
||||
bool _reportErrors;
|
||||
bool get reportErrors => _$this._reportErrors;
|
||||
set reportErrors(bool reportErrors) => _$this._reportErrors = reportErrors;
|
||||
bool? _reportErrors;
|
||||
bool? get reportErrors => _$this._reportErrors;
|
||||
set reportErrors(bool? reportErrors) => _$this._reportErrors = reportErrors;
|
||||
|
||||
String _plan;
|
||||
String get plan => _$this._plan;
|
||||
set plan(String plan) => _$this._plan = plan;
|
||||
String? _plan;
|
||||
String? get plan => _$this._plan;
|
||||
set plan(String? plan) => _$this._plan = plan;
|
||||
|
||||
String _planExpires;
|
||||
String get planExpires => _$this._planExpires;
|
||||
set planExpires(String planExpires) => _$this._planExpires = planExpires;
|
||||
String? _planExpires;
|
||||
String? get planExpires => _$this._planExpires;
|
||||
set planExpires(String? planExpires) => _$this._planExpires = planExpires;
|
||||
|
||||
String _latestVersion;
|
||||
String get latestVersion => _$this._latestVersion;
|
||||
set latestVersion(String latestVersion) =>
|
||||
String? _latestVersion;
|
||||
String? get latestVersion => _$this._latestVersion;
|
||||
set latestVersion(String? latestVersion) =>
|
||||
_$this._latestVersion = latestVersion;
|
||||
|
||||
String _currentVersion;
|
||||
String get currentVersion => _$this._currentVersion;
|
||||
set currentVersion(String currentVersion) =>
|
||||
String? _currentVersion;
|
||||
String? get currentVersion => _$this._currentVersion;
|
||||
set currentVersion(String? currentVersion) =>
|
||||
_$this._currentVersion = currentVersion;
|
||||
|
||||
bool _debugEnabled;
|
||||
bool get debugEnabled => _$this._debugEnabled;
|
||||
set debugEnabled(bool debugEnabled) => _$this._debugEnabled = debugEnabled;
|
||||
bool? _debugEnabled;
|
||||
bool? get debugEnabled => _$this._debugEnabled;
|
||||
set debugEnabled(bool? debugEnabled) => _$this._debugEnabled = debugEnabled;
|
||||
|
||||
bool _isDocker;
|
||||
bool get isDocker => _$this._isDocker;
|
||||
set isDocker(bool isDocker) => _$this._isDocker = isDocker;
|
||||
bool? _isDocker;
|
||||
bool? get isDocker => _$this._isDocker;
|
||||
set isDocker(bool? isDocker) => _$this._isDocker = isDocker;
|
||||
|
||||
bool _isMigrated;
|
||||
bool get isMigrated => _$this._isMigrated;
|
||||
set isMigrated(bool isMigrated) => _$this._isMigrated = isMigrated;
|
||||
bool? _isMigrated;
|
||||
bool? get isMigrated => _$this._isMigrated;
|
||||
set isMigrated(bool? isMigrated) => _$this._isMigrated = isMigrated;
|
||||
|
||||
bool _isHosted;
|
||||
bool get isHosted => _$this._isHosted;
|
||||
set isHosted(bool isHosted) => _$this._isHosted = isHosted;
|
||||
bool? _isHosted;
|
||||
bool? get isHosted => _$this._isHosted;
|
||||
set isHosted(bool? isHosted) => _$this._isHosted = isHosted;
|
||||
|
||||
bool _isSchedulerRunning;
|
||||
bool get isSchedulerRunning => _$this._isSchedulerRunning;
|
||||
set isSchedulerRunning(bool isSchedulerRunning) =>
|
||||
bool? _isSchedulerRunning;
|
||||
bool? get isSchedulerRunning => _$this._isSchedulerRunning;
|
||||
set isSchedulerRunning(bool? isSchedulerRunning) =>
|
||||
_$this._isSchedulerRunning = isSchedulerRunning;
|
||||
|
||||
bool _disableAutoUpdate;
|
||||
bool get disableAutoUpdate => _$this._disableAutoUpdate;
|
||||
set disableAutoUpdate(bool disableAutoUpdate) =>
|
||||
bool? _disableAutoUpdate;
|
||||
bool? get disableAutoUpdate => _$this._disableAutoUpdate;
|
||||
set disableAutoUpdate(bool? disableAutoUpdate) =>
|
||||
_$this._disableAutoUpdate = disableAutoUpdate;
|
||||
|
||||
String _defaultCompanyId;
|
||||
String get defaultCompanyId => _$this._defaultCompanyId;
|
||||
set defaultCompanyId(String defaultCompanyId) =>
|
||||
String? _defaultCompanyId;
|
||||
String? get defaultCompanyId => _$this._defaultCompanyId;
|
||||
set defaultCompanyId(String? defaultCompanyId) =>
|
||||
_$this._defaultCompanyId = defaultCompanyId;
|
||||
|
||||
int _hostedClientCount;
|
||||
int get hostedClientCount => _$this._hostedClientCount;
|
||||
set hostedClientCount(int hostedClientCount) =>
|
||||
int? _hostedClientCount;
|
||||
int? get hostedClientCount => _$this._hostedClientCount;
|
||||
set hostedClientCount(int? hostedClientCount) =>
|
||||
_$this._hostedClientCount = hostedClientCount;
|
||||
|
||||
int _hostedCompanyCount;
|
||||
int get hostedCompanyCount => _$this._hostedCompanyCount;
|
||||
set hostedCompanyCount(int hostedCompanyCount) =>
|
||||
int? _hostedCompanyCount;
|
||||
int? get hostedCompanyCount => _$this._hostedCompanyCount;
|
||||
set hostedCompanyCount(int? hostedCompanyCount) =>
|
||||
_$this._hostedCompanyCount = hostedCompanyCount;
|
||||
|
||||
bool _setReactAsDefaultAP;
|
||||
bool get setReactAsDefaultAP => _$this._setReactAsDefaultAP;
|
||||
set setReactAsDefaultAP(bool setReactAsDefaultAP) =>
|
||||
bool? _setReactAsDefaultAP;
|
||||
bool? get setReactAsDefaultAP => _$this._setReactAsDefaultAP;
|
||||
set setReactAsDefaultAP(bool? setReactAsDefaultAP) =>
|
||||
_$this._setReactAsDefaultAP = setReactAsDefaultAP;
|
||||
|
||||
bool _accountSmsVerified;
|
||||
bool get accountSmsVerified => _$this._accountSmsVerified;
|
||||
set accountSmsVerified(bool accountSmsVerified) =>
|
||||
bool? _accountSmsVerified;
|
||||
bool? get accountSmsVerified => _$this._accountSmsVerified;
|
||||
set accountSmsVerified(bool? accountSmsVerified) =>
|
||||
_$this._accountSmsVerified = accountSmsVerified;
|
||||
|
||||
int _trialDaysLeft;
|
||||
int get trialDaysLeft => _$this._trialDaysLeft;
|
||||
set trialDaysLeft(int trialDaysLeft) => _$this._trialDaysLeft = trialDaysLeft;
|
||||
int? _trialDaysLeft;
|
||||
int? get trialDaysLeft => _$this._trialDaysLeft;
|
||||
set trialDaysLeft(int? trialDaysLeft) =>
|
||||
_$this._trialDaysLeft = trialDaysLeft;
|
||||
|
||||
bool _hasIapPlan;
|
||||
bool get hasIapPlan => _$this._hasIapPlan;
|
||||
set hasIapPlan(bool hasIapPlan) => _$this._hasIapPlan = hasIapPlan;
|
||||
bool? _hasIapPlan;
|
||||
bool? get hasIapPlan => _$this._hasIapPlan;
|
||||
set hasIapPlan(bool? hasIapPlan) => _$this._hasIapPlan = hasIapPlan;
|
||||
|
||||
String _paymentId;
|
||||
String get paymentId => _$this._paymentId;
|
||||
set paymentId(String paymentId) => _$this._paymentId = paymentId;
|
||||
String? _paymentId;
|
||||
String? get paymentId => _$this._paymentId;
|
||||
set paymentId(String? paymentId) => _$this._paymentId = paymentId;
|
||||
|
||||
bool _taxApiEnabled;
|
||||
bool get taxApiEnabled => _$this._taxApiEnabled;
|
||||
set taxApiEnabled(bool taxApiEnabled) =>
|
||||
bool? _taxApiEnabled;
|
||||
bool? get taxApiEnabled => _$this._taxApiEnabled;
|
||||
set taxApiEnabled(bool? taxApiEnabled) =>
|
||||
_$this._taxApiEnabled = taxApiEnabled;
|
||||
|
||||
AccountEntityBuilder() {
|
||||
|
|
@ -588,7 +589,7 @@ class AccountEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(AccountEntityBuilder) updates) {
|
||||
void update(void Function(AccountEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class BankAccountFields {
|
|||
abstract class BankAccountEntity extends Object
|
||||
with BaseEntity
|
||||
implements Built<BankAccountEntity, BankAccountEntityBuilder> {
|
||||
factory BankAccountEntity({String id, AppState state}) {
|
||||
factory BankAccountEntity({String? id, AppState? state}) {
|
||||
return _$BankAccountEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -118,15 +118,15 @@ abstract class BankAccountEntity extends Object
|
|||
bool get isConnected => type.isNotEmpty;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (!multiselect && includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted!) {
|
||||
if (!multiselect && includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ abstract class BankAccountEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo(
|
||||
BankAccountEntity bankAccount, String sortField, bool sortAscending) {
|
||||
BankAccountEntity? bankAccount, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final bankAccountA = sortAscending ? this : bankAccount;
|
||||
final bankAccountB = sortAscending ? bankAccount : this;
|
||||
|
|
@ -143,17 +143,17 @@ abstract class BankAccountEntity extends Object
|
|||
switch (sortField) {
|
||||
// STARTER: sort switch - do not remove comment
|
||||
case BankAccountFields.name:
|
||||
response = bankAccountA.name
|
||||
response = bankAccountA!.name
|
||||
.toLowerCase()
|
||||
.compareTo(bankAccountB.name.toLowerCase());
|
||||
.compareTo(bankAccountB!.name.toLowerCase());
|
||||
break;
|
||||
case BankAccountFields.balance:
|
||||
response = bankAccountA.balance.compareTo(bankAccountB.balance);
|
||||
response = bankAccountA!.balance.compareTo(bankAccountB!.balance);
|
||||
break;
|
||||
case BankAccountFields.type:
|
||||
response = bankAccountA.type
|
||||
response = bankAccountA!.type
|
||||
.toLowerCase()
|
||||
.compareTo(bankAccountB.type.toLowerCase());
|
||||
.compareTo(bankAccountB!.type.toLowerCase());
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by bankAccount.$sortField is not implemented');
|
||||
|
|
@ -162,14 +162,14 @@ abstract class BankAccountEntity extends Object
|
|||
|
||||
if (response == 0) {
|
||||
// STARTER: sort default - do not remove comment
|
||||
return bankAccountA.name.compareTo(bankAccountB.name);
|
||||
return bankAccountA!.name.compareTo(bankAccountB!.name);
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -180,7 +180,7 @@ abstract class BankAccountEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$BankAccountListResponseSerializer
|
|||
final String wireName = 'BankAccountListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, BankAccountListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$BankAccountListResponseSerializer
|
|||
|
||||
@override
|
||||
BankAccountListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new BankAccountListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(BankAccountEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(BankAccountEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$BankAccountItemResponseSerializer
|
|||
final String wireName = 'BankAccountItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, BankAccountItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(BankAccountEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$BankAccountItemResponseSerializer
|
|||
|
||||
@override
|
||||
BankAccountItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new BankAccountItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BankAccountEntity))
|
||||
specifiedType: const FullType(BankAccountEntity))!
|
||||
as BankAccountEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -117,9 +117,9 @@ class _$BankAccountEntitySerializer
|
|||
final String wireName = 'BankAccountEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, BankAccountEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, BankAccountEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'bank_account_name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'bank_account_status',
|
||||
|
|
@ -157,7 +157,7 @@ class _$BankAccountEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -191,83 +191,83 @@ class _$BankAccountEntitySerializer
|
|||
|
||||
@override
|
||||
BankAccountEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new BankAccountEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'bank_account_name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'bank_account_status':
|
||||
result.status = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'bank_account_type':
|
||||
result.type = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'provider_name':
|
||||
result.provider = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'from_date':
|
||||
result.fromDate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'auto_sync':
|
||||
result.autoSync = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'disabled_upstream':
|
||||
result.disabledUpstream = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'balance':
|
||||
result.balance = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'currency':
|
||||
result.currency = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -281,10 +281,10 @@ class _$BankAccountListResponse extends BankAccountListResponse {
|
|||
final BuiltList<BankAccountEntity> data;
|
||||
|
||||
factory _$BankAccountListResponse(
|
||||
[void Function(BankAccountListResponseBuilder) updates]) =>
|
||||
[void Function(BankAccountListResponseBuilder)? updates]) =>
|
||||
(new BankAccountListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$BankAccountListResponse._({this.data}) : super._() {
|
||||
_$BankAccountListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'BankAccountListResponse', 'data');
|
||||
}
|
||||
|
|
@ -304,10 +304,10 @@ class _$BankAccountListResponse extends BankAccountListResponse {
|
|||
return other is BankAccountListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -325,12 +325,12 @@ class _$BankAccountListResponse extends BankAccountListResponse {
|
|||
class BankAccountListResponseBuilder
|
||||
implements
|
||||
Builder<BankAccountListResponse, BankAccountListResponseBuilder> {
|
||||
_$BankAccountListResponse _$v;
|
||||
_$BankAccountListResponse? _$v;
|
||||
|
||||
ListBuilder<BankAccountEntity> _data;
|
||||
ListBuilder<BankAccountEntity>? _data;
|
||||
ListBuilder<BankAccountEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<BankAccountEntity>();
|
||||
set data(ListBuilder<BankAccountEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<BankAccountEntity>? data) => _$this._data = data;
|
||||
|
||||
BankAccountListResponseBuilder();
|
||||
|
||||
|
|
@ -350,7 +350,7 @@ class BankAccountListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(BankAccountListResponseBuilder) updates) {
|
||||
void update(void Function(BankAccountListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ class BankAccountListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$BankAccountListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -382,10 +382,10 @@ class _$BankAccountItemResponse extends BankAccountItemResponse {
|
|||
final BankAccountEntity data;
|
||||
|
||||
factory _$BankAccountItemResponse(
|
||||
[void Function(BankAccountItemResponseBuilder) updates]) =>
|
||||
[void Function(BankAccountItemResponseBuilder)? updates]) =>
|
||||
(new BankAccountItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$BankAccountItemResponse._({this.data}) : super._() {
|
||||
_$BankAccountItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'BankAccountItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -405,10 +405,10 @@ class _$BankAccountItemResponse extends BankAccountItemResponse {
|
|||
return other is BankAccountItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -426,12 +426,12 @@ class _$BankAccountItemResponse extends BankAccountItemResponse {
|
|||
class BankAccountItemResponseBuilder
|
||||
implements
|
||||
Builder<BankAccountItemResponse, BankAccountItemResponseBuilder> {
|
||||
_$BankAccountItemResponse _$v;
|
||||
_$BankAccountItemResponse? _$v;
|
||||
|
||||
BankAccountEntityBuilder _data;
|
||||
BankAccountEntityBuilder? _data;
|
||||
BankAccountEntityBuilder get data =>
|
||||
_$this._data ??= new BankAccountEntityBuilder();
|
||||
set data(BankAccountEntityBuilder data) => _$this._data = data;
|
||||
set data(BankAccountEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
BankAccountItemResponseBuilder();
|
||||
|
||||
|
|
@ -451,7 +451,7 @@ class BankAccountItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(BankAccountItemResponseBuilder) updates) {
|
||||
void update(void Function(BankAccountItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -463,7 +463,7 @@ class BankAccountItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$BankAccountItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -498,7 +498,7 @@ class _$BankAccountEntity extends BankAccountEntity {
|
|||
@override
|
||||
final String currency;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -506,36 +506,36 @@ class _$BankAccountEntity extends BankAccountEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$BankAccountEntity(
|
||||
[void Function(BankAccountEntityBuilder) updates]) =>
|
||||
[void Function(BankAccountEntityBuilder)? updates]) =>
|
||||
(new BankAccountEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$BankAccountEntity._(
|
||||
{this.name,
|
||||
this.status,
|
||||
this.type,
|
||||
this.provider,
|
||||
this.fromDate,
|
||||
this.autoSync,
|
||||
this.disabledUpstream,
|
||||
this.balance,
|
||||
this.currency,
|
||||
{required this.name,
|
||||
required this.status,
|
||||
required this.type,
|
||||
required this.provider,
|
||||
required this.fromDate,
|
||||
required this.autoSync,
|
||||
required this.disabledUpstream,
|
||||
required this.balance,
|
||||
required this.currency,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'BankAccountEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -593,10 +593,10 @@ class _$BankAccountEntity extends BankAccountEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, status.hashCode);
|
||||
|
|
@ -645,78 +645,78 @@ class _$BankAccountEntity extends BankAccountEntity {
|
|||
|
||||
class BankAccountEntityBuilder
|
||||
implements Builder<BankAccountEntity, BankAccountEntityBuilder> {
|
||||
_$BankAccountEntity _$v;
|
||||
_$BankAccountEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _status;
|
||||
String get status => _$this._status;
|
||||
set status(String status) => _$this._status = status;
|
||||
String? _status;
|
||||
String? get status => _$this._status;
|
||||
set status(String? status) => _$this._status = status;
|
||||
|
||||
String _type;
|
||||
String get type => _$this._type;
|
||||
set type(String type) => _$this._type = type;
|
||||
String? _type;
|
||||
String? get type => _$this._type;
|
||||
set type(String? type) => _$this._type = type;
|
||||
|
||||
String _provider;
|
||||
String get provider => _$this._provider;
|
||||
set provider(String provider) => _$this._provider = provider;
|
||||
String? _provider;
|
||||
String? get provider => _$this._provider;
|
||||
set provider(String? provider) => _$this._provider = provider;
|
||||
|
||||
String _fromDate;
|
||||
String get fromDate => _$this._fromDate;
|
||||
set fromDate(String fromDate) => _$this._fromDate = fromDate;
|
||||
String? _fromDate;
|
||||
String? get fromDate => _$this._fromDate;
|
||||
set fromDate(String? fromDate) => _$this._fromDate = fromDate;
|
||||
|
||||
bool _autoSync;
|
||||
bool get autoSync => _$this._autoSync;
|
||||
set autoSync(bool autoSync) => _$this._autoSync = autoSync;
|
||||
bool? _autoSync;
|
||||
bool? get autoSync => _$this._autoSync;
|
||||
set autoSync(bool? autoSync) => _$this._autoSync = autoSync;
|
||||
|
||||
bool _disabledUpstream;
|
||||
bool get disabledUpstream => _$this._disabledUpstream;
|
||||
set disabledUpstream(bool disabledUpstream) =>
|
||||
bool? _disabledUpstream;
|
||||
bool? get disabledUpstream => _$this._disabledUpstream;
|
||||
set disabledUpstream(bool? disabledUpstream) =>
|
||||
_$this._disabledUpstream = disabledUpstream;
|
||||
|
||||
double _balance;
|
||||
double get balance => _$this._balance;
|
||||
set balance(double balance) => _$this._balance = balance;
|
||||
double? _balance;
|
||||
double? get balance => _$this._balance;
|
||||
set balance(double? balance) => _$this._balance = balance;
|
||||
|
||||
String _currency;
|
||||
String get currency => _$this._currency;
|
||||
set currency(String currency) => _$this._currency = currency;
|
||||
String? _currency;
|
||||
String? get currency => _$this._currency;
|
||||
set currency(String? currency) => _$this._currency = currency;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
BankAccountEntityBuilder() {
|
||||
BankAccountEntity._initializeBuilder(this);
|
||||
|
|
@ -754,7 +754,7 @@ class BankAccountEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(BankAccountEntityBuilder) updates) {
|
||||
void update(void Function(BankAccountEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
// Flutter imports:
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
// Package imports:
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
|
|
@ -114,10 +111,10 @@ abstract class ClientEntity extends Object
|
|||
with BaseEntity, SelectableEntity, HasActivities
|
||||
implements Built<ClientEntity, ClientEntityBuilder> {
|
||||
factory ClientEntity({
|
||||
String id,
|
||||
AppState state,
|
||||
UserEntity user,
|
||||
GroupEntity group,
|
||||
String? id,
|
||||
AppState? state,
|
||||
UserEntity? user,
|
||||
GroupEntity? group,
|
||||
}) {
|
||||
return _$ClientEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
|
|
@ -197,18 +194,17 @@ abstract class ClientEntity extends Object
|
|||
@BuiltValueField(wireName: 'group_settings_id')
|
||||
String get groupId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(compare: false)
|
||||
int get loadedAt;
|
||||
int? get loadedAt;
|
||||
|
||||
bool get isLoaded => loadedAt != null && loadedAt > 0;
|
||||
bool get isLoaded => loadedAt != null && loadedAt! > 0;
|
||||
|
||||
bool get isStale {
|
||||
if (!isLoaded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt >
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt! >
|
||||
kMillisecondsToRefreshActivities;
|
||||
}
|
||||
|
||||
|
|
@ -322,7 +318,7 @@ abstract class ClientEntity extends Object
|
|||
|
||||
String get classification;
|
||||
|
||||
BuiltList<ClientContactEntity> get contacts;
|
||||
BuiltList<ClientContactEntity?> get contacts;
|
||||
|
||||
@override
|
||||
BuiltList<ActivityEntity> get activities;
|
||||
|
|
@ -345,12 +341,12 @@ abstract class ClientEntity extends Object
|
|||
return displayName;
|
||||
}
|
||||
|
||||
bool getManualPaymentEmail(
|
||||
{@required CompanyEntity company, @required GroupEntity group}) {
|
||||
bool? getManualPaymentEmail(
|
||||
{required CompanyEntity company, required GroupEntity? group}) {
|
||||
if (settings.clientManualPaymentNotification != null) {
|
||||
return settings.clientManualPaymentNotification;
|
||||
} else if (group?.settings?.clientManualPaymentNotification != null) {
|
||||
return group.settings.clientManualPaymentNotification;
|
||||
} else if (group?.settings.clientManualPaymentNotification != null) {
|
||||
return group!.settings.clientManualPaymentNotification;
|
||||
} else {
|
||||
return company.settings.clientManualPaymentNotification;
|
||||
}
|
||||
|
|
@ -372,192 +368,192 @@ abstract class ClientEntity extends Object
|
|||
return template;
|
||||
}
|
||||
|
||||
ClientContactEntity get primaryContact =>
|
||||
contacts.firstWhere((contact) => contact.isPrimary,
|
||||
ClientContactEntity? get primaryContact =>
|
||||
contacts.firstWhere((contact) => contact!.isPrimary,
|
||||
orElse: () => ClientContactEntity());
|
||||
|
||||
List<ClientContactEntity> get emailContacts {
|
||||
final list = contacts.where((contact) => contact.sendEmail).toList();
|
||||
List<ClientContactEntity?> get emailContacts {
|
||||
final list = contacts.where((contact) => contact!.sendEmail).toList();
|
||||
return list.isEmpty ? [primaryContact] : list;
|
||||
}
|
||||
|
||||
bool get hasGroup => groupId != null && groupId.isNotEmpty;
|
||||
bool get hasGroup => groupId.isNotEmpty;
|
||||
|
||||
bool get hasUser => assignedUserId != null && assignedUserId.isNotEmpty;
|
||||
bool get hasUser => assignedUserId != null && assignedUserId!.isNotEmpty;
|
||||
|
||||
bool get hasLanguage =>
|
||||
settings.languageId != null && settings.languageId.isNotEmpty;
|
||||
settings.languageId != null && settings.languageId!.isNotEmpty;
|
||||
|
||||
bool get hasEmailAddress =>
|
||||
contacts.where((contact) => contact.email?.isNotEmpty).isNotEmpty;
|
||||
contacts.where((contact) => contact!.email.isNotEmpty).isNotEmpty;
|
||||
|
||||
int compareTo(ClientEntity client, String sortField, bool sortAscending,
|
||||
BuiltMap<String, UserEntity> userMap, StaticState staticState) {
|
||||
int compareTo(ClientEntity? client, String sortField, bool sortAscending,
|
||||
BuiltMap<String?, UserEntity?> userMap, StaticState staticState) {
|
||||
int response = 0;
|
||||
final ClientEntity clientA = sortAscending ? this : client;
|
||||
final ClientEntity clientB = sortAscending ? client : this;
|
||||
final ClientEntity? clientA = sortAscending ? this : client;
|
||||
final ClientEntity? clientB = sortAscending ? client : this;
|
||||
|
||||
switch (sortField) {
|
||||
case ClientFields.name:
|
||||
response = removeDiacritics(clientA.displayName)
|
||||
response = removeDiacritics(clientA!.displayName)
|
||||
.toLowerCase()
|
||||
.compareTo(removeDiacritics(clientB.displayName).toLowerCase());
|
||||
.compareTo(removeDiacritics(clientB!.displayName).toLowerCase());
|
||||
break;
|
||||
case ClientFields.contactName:
|
||||
response = removeDiacritics(clientA.primaryContact.fullName)
|
||||
response = removeDiacritics(clientA!.primaryContact!.fullName)
|
||||
.toLowerCase()
|
||||
.compareTo(removeDiacritics(clientB.primaryContact.fullName)
|
||||
.compareTo(removeDiacritics(clientB!.primaryContact!.fullName)
|
||||
.toLowerCase());
|
||||
break;
|
||||
case ClientFields.contactEmail:
|
||||
response = clientA.primaryContact.email
|
||||
response = clientA!.primaryContact!.email
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.primaryContact.email.toLowerCase());
|
||||
.compareTo(clientB!.primaryContact!.email.toLowerCase());
|
||||
break;
|
||||
case ClientFields.balance:
|
||||
response = clientA.balance.compareTo(clientB.balance);
|
||||
response = clientA!.balance.compareTo(clientB!.balance);
|
||||
break;
|
||||
case ClientFields.creditBalance:
|
||||
response = clientA.creditBalance.compareTo(clientB.creditBalance);
|
||||
response = clientA!.creditBalance.compareTo(clientB!.creditBalance);
|
||||
break;
|
||||
case ClientFields.paymentBalance:
|
||||
response = clientA.paymentBalance.compareTo(clientB.paymentBalance);
|
||||
response = clientA!.paymentBalance.compareTo(clientB!.paymentBalance);
|
||||
break;
|
||||
case ClientFields.paidToDate:
|
||||
response = clientA.paidToDate.compareTo(clientB.paidToDate);
|
||||
response = clientA!.paidToDate.compareTo(clientB!.paidToDate);
|
||||
break;
|
||||
case ClientFields.updatedAt:
|
||||
response = clientA.updatedAt.compareTo(clientB.updatedAt);
|
||||
response = clientA!.updatedAt.compareTo(clientB!.updatedAt);
|
||||
break;
|
||||
case ClientFields.idNumber:
|
||||
response = clientA.idNumber.compareTo(clientB.idNumber);
|
||||
response = clientA!.idNumber.compareTo(clientB!.idNumber);
|
||||
break;
|
||||
case ClientFields.number:
|
||||
response = compareNatural(
|
||||
clientA.number.toLowerCase(), clientB.number.toLowerCase());
|
||||
clientA!.number.toLowerCase(), clientB!.number.toLowerCase());
|
||||
break;
|
||||
case ClientFields.website:
|
||||
response = clientA.website
|
||||
response = clientA!.website
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.website.toLowerCase());
|
||||
.compareTo(clientB!.website.toLowerCase());
|
||||
break;
|
||||
case ClientFields.address1:
|
||||
response = clientA.address1
|
||||
response = clientA!.address1
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.address1.toLowerCase());
|
||||
.compareTo(clientB!.address1.toLowerCase());
|
||||
break;
|
||||
case ClientFields.address2:
|
||||
response = clientA.address2
|
||||
response = clientA!.address2
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.address2.toLowerCase());
|
||||
.compareTo(clientB!.address2.toLowerCase());
|
||||
break;
|
||||
case ClientFields.phone:
|
||||
response =
|
||||
clientA.phone.toLowerCase().compareTo(clientB.phone.toLowerCase());
|
||||
response = clientA!.phone
|
||||
.toLowerCase()
|
||||
.compareTo(clientB!.phone.toLowerCase());
|
||||
break;
|
||||
case ClientFields.publicNotes:
|
||||
response = clientA.publicNotes
|
||||
response = clientA!.publicNotes
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.publicNotes.toLowerCase());
|
||||
.compareTo(clientB!.publicNotes.toLowerCase());
|
||||
break;
|
||||
case ClientFields.privateNotes:
|
||||
response = clientA.privateNotes
|
||||
response = clientA!.privateNotes
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.privateNotes.toLowerCase());
|
||||
.compareTo(clientB!.privateNotes.toLowerCase());
|
||||
break;
|
||||
case ClientFields.vatNumber:
|
||||
response = clientA.vatNumber
|
||||
response = clientA!.vatNumber
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.vatNumber.toLowerCase());
|
||||
.compareTo(clientB!.vatNumber.toLowerCase());
|
||||
break;
|
||||
case ClientFields.assignedToId:
|
||||
case EntityFields.assignedTo:
|
||||
final userA = userMap[clientA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[clientB.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap[clientA!.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[clientB!.assignedUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case ClientFields.createdById:
|
||||
case EntityFields.createdBy:
|
||||
final userA = userMap[clientA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[clientB.createdUserId] ?? UserEntity();
|
||||
final userA = userMap[clientA!.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[clientB!.createdUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case ClientFields.country:
|
||||
final countryA =
|
||||
staticState.countryMap[clientA.countryId] ?? CountryEntity();
|
||||
staticState.countryMap[clientA!.countryId] ?? CountryEntity();
|
||||
final countryB =
|
||||
staticState.countryMap[clientB.countryId] ?? CountryEntity();
|
||||
staticState.countryMap[clientB!.countryId] ?? CountryEntity();
|
||||
response =
|
||||
countryA.name.toLowerCase().compareTo(countryB.name.toLowerCase());
|
||||
break;
|
||||
case ClientFields.currency:
|
||||
final currencyA =
|
||||
staticState.currencyMap[clientA.currencyId] ?? CurrencyEntity();
|
||||
staticState.currencyMap[clientA!.currencyId] ?? CurrencyEntity();
|
||||
final currencyB =
|
||||
staticState.currencyMap[clientB.currencyId] ?? CurrencyEntity();
|
||||
staticState.currencyMap[clientB!.currencyId] ?? CurrencyEntity();
|
||||
response = currencyA.name
|
||||
.toLowerCase()
|
||||
.compareTo(currencyB.name.toLowerCase());
|
||||
break;
|
||||
case EntityFields.state:
|
||||
case ClientFields.state:
|
||||
final stateA =
|
||||
EntityState.valueOf(clientA.entityState) ?? EntityState.active;
|
||||
final stateB =
|
||||
EntityState.valueOf(clientB.entityState) ?? EntityState.active;
|
||||
final stateA = EntityState.valueOf(clientA!.entityState);
|
||||
final stateB = EntityState.valueOf(clientB!.entityState);
|
||||
response =
|
||||
stateA.name.toLowerCase().compareTo(stateB.name.toLowerCase());
|
||||
break;
|
||||
case ClientFields.language:
|
||||
final languageA =
|
||||
staticState.languageMap[clientA.languageId] ?? LanguageEntity();
|
||||
staticState.languageMap[clientA!.languageId] ?? LanguageEntity();
|
||||
final languageB =
|
||||
staticState.languageMap[clientB.languageId] ?? LanguageEntity();
|
||||
staticState.languageMap[clientB!.languageId] ?? LanguageEntity();
|
||||
response = languageA.name
|
||||
.toLowerCase()
|
||||
.compareTo(languageB.name.toLowerCase());
|
||||
break;
|
||||
case ClientFields.createdAt:
|
||||
response = clientA.createdAt.compareTo(clientB.createdAt);
|
||||
response = clientA!.createdAt.compareTo(clientB!.createdAt);
|
||||
break;
|
||||
case ClientFields.archivedAt:
|
||||
response = clientA.archivedAt.compareTo(clientB.archivedAt);
|
||||
response = clientA!.archivedAt.compareTo(clientB!.archivedAt);
|
||||
break;
|
||||
case ClientFields.lastLoginAt:
|
||||
response = clientA.lastLogin.compareTo(clientB.lastLogin);
|
||||
response = clientA!.lastLogin.compareTo(clientB!.lastLogin);
|
||||
break;
|
||||
case ClientFields.custom1:
|
||||
response = clientA.customValue1
|
||||
response = clientA!.customValue1
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.customValue1.toLowerCase());
|
||||
.compareTo(clientB!.customValue1.toLowerCase());
|
||||
break;
|
||||
case ClientFields.custom2:
|
||||
response = clientA.customValue2
|
||||
response = clientA!.customValue2
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.customValue2.toLowerCase());
|
||||
.compareTo(clientB!.customValue2.toLowerCase());
|
||||
break;
|
||||
case ClientFields.custom3:
|
||||
response = clientA.customValue3
|
||||
response = clientA!.customValue3
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.customValue3.toLowerCase());
|
||||
.compareTo(clientB!.customValue3.toLowerCase());
|
||||
break;
|
||||
case ClientFields.custom4:
|
||||
response = clientA.customValue4
|
||||
response = clientA!.customValue4
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.customValue4.toLowerCase());
|
||||
.compareTo(clientB!.customValue4.toLowerCase());
|
||||
break;
|
||||
case ClientFields.documents:
|
||||
response = clientA.documents.length.compareTo(clientA.documents.length);
|
||||
response =
|
||||
clientA!.documents.length.compareTo(clientA.documents.length);
|
||||
break;
|
||||
case ClientFields.group:
|
||||
response = clientA.groupId.compareTo(clientB.groupId);
|
||||
response = clientA!.groupId.compareTo(clientB!.groupId);
|
||||
break;
|
||||
case ClientFields.classification:
|
||||
response = clientA.classification.compareTo(clientB.classification);
|
||||
response = clientA!.classification.compareTo(clientB!.classification);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by client.$sortField not implemented');
|
||||
|
|
@ -565,19 +561,19 @@ abstract class ClientEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = client.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
response = client!.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
bool matchesNameOrEmail(String filter) {
|
||||
bool matchesNameOrEmail(String? filter) {
|
||||
if (matchesString(haystack: name, needle: filter)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (var i = 0; i < contacts.length; i++) {
|
||||
final contact = contacts[i];
|
||||
final contact = contacts[i]!;
|
||||
if (matchesString(haystack: contact.fullName, needle: filter)) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -591,9 +587,9 @@ abstract class ClientEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
for (var i = 0; i < contacts.length; i++) {
|
||||
if (contacts[i].matchesFilter(filter)) {
|
||||
if (contacts[i]!.matchesFilter(filter)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -618,9 +614,9 @@ abstract class ClientEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
for (var i = 0; i < contacts.length; i++) {
|
||||
final value = contacts[i].matchesFilterValue(filter);
|
||||
final value = contacts[i]!.matchesFilterValue(filter);
|
||||
if (value != null) {
|
||||
return value;
|
||||
}
|
||||
|
|
@ -645,15 +641,15 @@ abstract class ClientEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
|
|
@ -661,21 +657,21 @@ abstract class ClientEntity extends Object
|
|||
|
||||
actions.add(EntityAction.clientPortal);
|
||||
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
if (userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.settings);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isDeleted && multiselect) {
|
||||
if (!isDeleted! && multiselect) {
|
||||
actions.add(EntityAction.documents);
|
||||
}
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (actions.isNotEmpty && actions.last != null) {
|
||||
actions.add(null);
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.invoice)) {
|
||||
if (userCompany!.canCreate(EntityType.invoice)) {
|
||||
actions.add(EntityAction.newInvoice);
|
||||
}
|
||||
|
||||
|
|
@ -700,7 +696,7 @@ abstract class ClientEntity extends Object
|
|||
actions.add(null);
|
||||
}
|
||||
|
||||
if (userCompany.isAdmin && !multiselect) {
|
||||
if (userCompany!.isAdmin && !multiselect) {
|
||||
actions.add(EntityAction.merge);
|
||||
}
|
||||
|
||||
|
|
@ -714,7 +710,7 @@ abstract class ClientEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
@ -723,7 +719,7 @@ abstract class ClientEntity extends Object
|
|||
if (name.isNotEmpty) {
|
||||
return name;
|
||||
} else {
|
||||
return primaryContact.fullNameOrEmail;
|
||||
return primaryContact!.fullNameOrEmail;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -741,7 +737,7 @@ abstract class ClientEntity extends Object
|
|||
shippingCity.isNotEmpty ||
|
||||
shippingState.isNotEmpty ||
|
||||
shippingPostalCode.isNotEmpty ||
|
||||
(shippingCountryId ?? '').isNotEmpty;
|
||||
shippingCountryId.isNotEmpty;
|
||||
|
||||
bool get hasBillingAddress =>
|
||||
address1.isNotEmpty ||
|
||||
|
|
@ -749,19 +745,19 @@ abstract class ClientEntity extends Object
|
|||
city.isNotEmpty ||
|
||||
state.isNotEmpty ||
|
||||
postalCode.isNotEmpty ||
|
||||
(countryId ?? '').isNotEmpty;
|
||||
countryId.isNotEmpty;
|
||||
|
||||
bool get hasCountry => countryId != null && countryId.isNotEmpty;
|
||||
bool get hasCountry => countryId.isNotEmpty;
|
||||
|
||||
String get currencyId => settings.currencyId;
|
||||
String? get currencyId => settings.currencyId;
|
||||
|
||||
bool get hasCurrency =>
|
||||
settings.currencyId != null && settings.currencyId.isNotEmpty;
|
||||
settings.currencyId != null && settings.currencyId!.isNotEmpty;
|
||||
|
||||
String get languageId => settings.languageId;
|
||||
String? get languageId => settings.languageId;
|
||||
|
||||
ClientContactEntity getContact(String contactId) => contacts
|
||||
.firstWhere((contact) => contact.id == contactId, orElse: () => null);
|
||||
ClientContactEntity? getContact(String? contactId) => contacts
|
||||
.firstWhere((contact) => contact!.id == contactId, orElse: () => null);
|
||||
|
||||
bool get hasNameSet {
|
||||
if (contacts.isEmpty) {
|
||||
|
|
@ -771,7 +767,7 @@ abstract class ClientEntity extends Object
|
|||
final contact = contacts.first;
|
||||
|
||||
return name.isNotEmpty ||
|
||||
contact.fullName.isNotEmpty ||
|
||||
contact!.fullName.isNotEmpty ||
|
||||
contact.email.isNotEmpty;
|
||||
}
|
||||
|
||||
|
|
@ -914,7 +910,7 @@ abstract class ClientContactEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
'$firstName $lastName',
|
||||
|
|
@ -926,7 +922,7 @@ abstract class ClientContactEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
'$firstName $lastName',
|
||||
|
|
@ -943,7 +939,7 @@ abstract class ClientContactEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -62,7 +62,7 @@ class CompanyGatewayFields {
|
|||
abstract class CompanyGatewayEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<CompanyGatewayEntity, CompanyGatewayEntityBuilder> {
|
||||
factory CompanyGatewayEntity({String id, AppState state}) {
|
||||
factory CompanyGatewayEntity({String? id, AppState? state}) {
|
||||
return _$CompanyGatewayEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -106,18 +106,17 @@ abstract class CompanyGatewayEntity extends Object
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(compare: false)
|
||||
int get loadedAt;
|
||||
int? get loadedAt;
|
||||
|
||||
bool get isLoaded => loadedAt != null && loadedAt > 0;
|
||||
bool get isLoaded => loadedAt != null && loadedAt! > 0;
|
||||
|
||||
bool get isStale {
|
||||
if (!isLoaded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt >
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt! >
|
||||
kMillisecondsToRefreshActivities;
|
||||
}
|
||||
|
||||
|
|
@ -141,9 +140,9 @@ abstract class CompanyGatewayEntity extends Object
|
|||
@BuiltValueField(wireName: 'require_client_name')
|
||||
bool get requireClientName;
|
||||
|
||||
@nullable // TODO remove nullable
|
||||
// TODO remove nullable
|
||||
@BuiltValueField(wireName: 'require_postal_code')
|
||||
bool get requirePostalCode;
|
||||
bool? get requirePostalCode;
|
||||
|
||||
@BuiltValueField(wireName: 'require_client_phone')
|
||||
bool get requireClientPhone;
|
||||
|
|
@ -173,7 +172,7 @@ abstract class CompanyGatewayEntity extends Object
|
|||
bool get updateDetails;
|
||||
|
||||
@BuiltValueField(wireName: 'fees_and_limits')
|
||||
BuiltMap<String, FeesAndLimitsSettings> get feesAndLimitsMap;
|
||||
BuiltMap<String?, FeesAndLimitsSettings> get feesAndLimitsMap;
|
||||
|
||||
@BuiltValueField(wireName: 'system_logs')
|
||||
BuiltList<SystemLogEntity> get systemLogs;
|
||||
|
|
@ -200,15 +199,15 @@ abstract class CompanyGatewayEntity extends Object
|
|||
|
||||
String get label;
|
||||
|
||||
Map<String, dynamic> get parsedConfig =>
|
||||
Map<String, dynamic>? get parsedConfig =>
|
||||
config.isEmpty ? <String, dynamic>{} : jsonDecode(config);
|
||||
|
||||
FeesAndLimitsSettings getSettingsForGatewayTypeId(String gatewayTypeId) =>
|
||||
FeesAndLimitsSettings getSettingsForGatewayTypeId(String? gatewayTypeId) =>
|
||||
feesAndLimitsMap[gatewayTypeId] ?? FeesAndLimitsSettings();
|
||||
|
||||
@override
|
||||
String get listDisplayName =>
|
||||
(gatewayId == kGatewayCustom ? parsedConfig['name'] : label) ?? label;
|
||||
(gatewayId == kGatewayCustom ? parsedConfig!['name'] : label) ?? label;
|
||||
|
||||
bool get isCustom => gatewayId == kGatewayCustom;
|
||||
|
||||
|
|
@ -217,36 +216,36 @@ abstract class CompanyGatewayEntity extends Object
|
|||
return true;
|
||||
}
|
||||
|
||||
final accountId = (parsedConfig['account_id'] ?? '').toString();
|
||||
final accountId = (parsedConfig!['account_id'] ?? '').toString();
|
||||
|
||||
return accountId.isNotEmpty;
|
||||
}
|
||||
|
||||
bool supportsCard(int cardType) => acceptedCreditCards & cardType > 0;
|
||||
|
||||
CompanyGatewayEntity addCard(int cardType) =>
|
||||
rebuild((b) => b..acceptedCreditCards = acceptedCreditCards | cardType);
|
||||
CompanyGatewayEntity addCard(int? cardType) =>
|
||||
rebuild((b) => b..acceptedCreditCards = acceptedCreditCards | cardType!);
|
||||
|
||||
CompanyGatewayEntity removeCard(int cardType) =>
|
||||
rebuild((b) => b..acceptedCreditCards = acceptedCreditCards ^ cardType);
|
||||
CompanyGatewayEntity removeCard(int? cardType) =>
|
||||
rebuild((b) => b..acceptedCreditCards = acceptedCreditCards ^ cardType!);
|
||||
|
||||
CompanyGatewayEntity updateConfig(String field, dynamic value) {
|
||||
final updatedConfig = parsedConfig;
|
||||
if (value.runtimeType == String && value == '') {
|
||||
updatedConfig.remove(field);
|
||||
updatedConfig!.remove(field);
|
||||
} else {
|
||||
updatedConfig[field] = value;
|
||||
updatedConfig![field] = value;
|
||||
}
|
||||
|
||||
return rebuild((b) => b..config = jsonEncode(updatedConfig));
|
||||
}
|
||||
|
||||
int compareTo(CompanyGatewayEntity companyGateway, String sortField,
|
||||
int compareTo(CompanyGatewayEntity? companyGateway, String sortField,
|
||||
bool sortAscending) =>
|
||||
0;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
label,
|
||||
|
|
@ -260,7 +259,7 @@ abstract class CompanyGatewayEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
customValue1,
|
||||
|
|
@ -273,15 +272,15 @@ abstract class CompanyGatewayEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect && userCompany!.canEditEntity(this)) {
|
||||
if (includeEdit) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
|
@ -299,10 +298,10 @@ abstract class CompanyGatewayEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
// ignore: unused_element
|
||||
static void _initializeBuilder(CompanyGatewayEntityBuilder builder) => builder
|
||||
|
|
@ -317,7 +316,7 @@ abstract class CompanyGatewayEntity extends Object
|
|||
|
||||
abstract class FeesAndLimitsSettings
|
||||
implements Built<FeesAndLimitsSettings, FeesAndLimitsSettingsBuilder> {
|
||||
factory FeesAndLimitsSettings({String id, bool isEnabled}) {
|
||||
factory FeesAndLimitsSettings({String? id, bool? isEnabled}) {
|
||||
return _$FeesAndLimitsSettings._(
|
||||
maxLimit: -1,
|
||||
minLimit: -1,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -490,7 +490,7 @@ abstract class CompanyEntity extends Object
|
|||
bool get isActive => true;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
for (final user in users) {
|
||||
if (user.matchesFilter(filter)) {
|
||||
return true;
|
||||
|
|
@ -514,7 +514,7 @@ abstract class CompanyEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
for (final user in users) {
|
||||
final value = user.matchesFilterValue(filter);
|
||||
if (value != null) {
|
||||
|
|
@ -541,10 +541,10 @@ abstract class CompanyEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
@override
|
||||
String get listDisplayName => settings?.name ?? '';
|
||||
|
|
@ -625,15 +625,15 @@ abstract class CompanyEntity extends Object
|
|||
}
|
||||
|
||||
if (customFields.containsKey(field)) {
|
||||
return customFields[field].split('|').first;
|
||||
return customFields[field]!.split('|').first;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
String getCustomFieldType(String field) {
|
||||
String getCustomFieldType(String? field) {
|
||||
if ((customFields[field] ?? '').contains('|')) {
|
||||
final value = customFields[field].split('|').last;
|
||||
final value = customFields[field]!.split('|').last;
|
||||
if ([kFieldTypeSingleLineText, kFieldTypeDate, kFieldTypeSwitch]
|
||||
.contains(value)) {
|
||||
return value;
|
||||
|
|
@ -646,14 +646,14 @@ abstract class CompanyEntity extends Object
|
|||
}
|
||||
|
||||
String formatCustomFieldValue(String field, String value) {
|
||||
final context = navigatorKey.currentContext;
|
||||
final context = navigatorKey.currentContext!;
|
||||
final type = getCustomFieldType(field);
|
||||
final localization = AppLocalization.of(context);
|
||||
|
||||
if (type == kFieldTypeDate) {
|
||||
value = formatDate(value, context);
|
||||
} else if (type == kFieldTypeSwitch) {
|
||||
value = value == kSwitchValueYes ? localization.yes : localization.no;
|
||||
value = value == kSwitchValueYes ? localization!.yes : localization!.no;
|
||||
}
|
||||
|
||||
return getCustomFieldLabel(field) + ': $value';
|
||||
|
|
@ -705,7 +705,7 @@ abstract class CompanyEntity extends Object
|
|||
..companyGateways.clear(),
|
||||
);
|
||||
|
||||
bool isModuleEnabled(EntityType entityType) {
|
||||
bool isModuleEnabled(EntityType? entityType) {
|
||||
if ((entityType == EntityType.invoice ||
|
||||
entityType == EntityType.payment) &&
|
||||
enabledModules & kModuleInvoices == 0) {
|
||||
|
|
@ -860,13 +860,13 @@ abstract class GatewayEntity extends Object
|
|||
String get fields;
|
||||
|
||||
bool get supportsTokenBilling => options.keys
|
||||
.where((typeId) => options[typeId].supportTokenBilling)
|
||||
.where((typeId) => options[typeId]!.supportTokenBilling)
|
||||
.isNotEmpty;
|
||||
|
||||
bool supportsRefunds(String gatewayTypeId) =>
|
||||
options[gatewayTypeId]?.supportRefunds ?? false;
|
||||
|
||||
Map<String, dynamic> get parsedFields =>
|
||||
Map<String, dynamic>? get parsedFields =>
|
||||
fields.isEmpty ? <String, dynamic>{} : jsonDecode(fields);
|
||||
|
||||
int compareTo(GatewayEntity gateway, String sortField, bool sortAscending) {
|
||||
|
|
@ -887,7 +887,7 @@ abstract class GatewayEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -906,11 +906,11 @@ abstract class GatewayEntity extends Object
|
|||
}
|
||||
|
||||
final gatewayIds = options.keys.toList();
|
||||
final localization = AppLocalization.of(navigatorKey.currentContext);
|
||||
final localization = AppLocalization.of(navigatorKey.currentContext!);
|
||||
|
||||
for (var i = 0; i < gatewayIds.length; i++) {
|
||||
final gatewayTypeId = gatewayIds[i];
|
||||
final gatewayType = localization.lookup(kGatewayTypes[gatewayTypeId]);
|
||||
final gatewayType = localization!.lookup(kGatewayTypes[gatewayTypeId])!;
|
||||
|
||||
if (gatewayType.toLowerCase().contains(filter)) {
|
||||
return true;
|
||||
|
|
@ -921,7 +921,7 @@ abstract class GatewayEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -934,11 +934,11 @@ abstract class GatewayEntity extends Object
|
|||
}
|
||||
|
||||
final gatewayIds = options.keys.toList();
|
||||
final localization = AppLocalization.of(navigatorKey.currentContext);
|
||||
final localization = AppLocalization.of(navigatorKey.currentContext!);
|
||||
|
||||
for (var i = 0; i < gatewayIds.length; i++) {
|
||||
final gatewayTypeId = gatewayIds[i];
|
||||
final gatewayType = localization.lookup(kGatewayTypes[gatewayTypeId]);
|
||||
final gatewayType = localization!.lookup(kGatewayTypes[gatewayTypeId])!;
|
||||
|
||||
if (gatewayType.toLowerCase().contains(filter)) {
|
||||
return gatewayType;
|
||||
|
|
@ -952,9 +952,9 @@ abstract class GatewayEntity extends Object
|
|||
String get listDisplayName => name;
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static String getClientUrl({String gatewayId, String customerReference}) {
|
||||
static String? getClientUrl({String? gatewayId, String? customerReference}) {
|
||||
switch (gatewayId) {
|
||||
case kGatewayStripe:
|
||||
case kGatewayStripeConnect:
|
||||
|
|
@ -964,11 +964,11 @@ abstract class GatewayEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
static String getPaymentUrl({String gatewayId, String transactionReference}) {
|
||||
static String? getPaymentUrl({String? gatewayId, String? transactionReference}) {
|
||||
switch (gatewayId) {
|
||||
case kGatewayStripe:
|
||||
case kGatewayStripeConnect:
|
||||
if (transactionReference.startsWith('src'))
|
||||
if (transactionReference!.startsWith('src'))
|
||||
return 'https://dashboard.stripe.com/sources/$transactionReference';
|
||||
else
|
||||
return 'https://dashboard.stripe.com/payments/$transactionReference';
|
||||
|
|
@ -989,7 +989,7 @@ abstract class GatewayEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
// ignore: unused_element
|
||||
static void _initializeBuilder(GatewayEntityBuilder builder) =>
|
||||
|
|
@ -1019,8 +1019,7 @@ abstract class GatewayOptionsEntity
|
|||
@BuiltValueField(wireName: 'token_billing')
|
||||
bool get supportTokenBilling;
|
||||
|
||||
@nullable
|
||||
BuiltList<String> get webhooks;
|
||||
BuiltList<String>? get webhooks;
|
||||
|
||||
static Serializer<GatewayOptionsEntity> get serializer =>
|
||||
_$gatewayOptionsEntitySerializer;
|
||||
|
|
@ -1062,33 +1061,27 @@ abstract class UserCompanyEntity
|
|||
|
||||
String get permissions;
|
||||
|
||||
@nullable
|
||||
BuiltMap<String, BuiltList<String>> get notifications;
|
||||
BuiltMap<String, BuiltList<String>>? get notifications;
|
||||
|
||||
@nullable
|
||||
CompanyEntity get company;
|
||||
CompanyEntity? get company;
|
||||
|
||||
@nullable
|
||||
UserEntity get user;
|
||||
UserEntity? get user;
|
||||
|
||||
@nullable
|
||||
TokenEntity get token;
|
||||
TokenEntity? get token;
|
||||
|
||||
@nullable
|
||||
AccountEntity get account;
|
||||
AccountEntity? get account;
|
||||
|
||||
@nullable
|
||||
UserSettingsEntity get settings;
|
||||
UserSettingsEntity? get settings;
|
||||
|
||||
@BuiltValueField(wireName: 'ninja_portal_url')
|
||||
String get ninjaPortalUrl;
|
||||
|
||||
bool can(UserPermission permission, EntityType entityType) {
|
||||
bool can(UserPermission permission, EntityType? entityType) {
|
||||
if (entityType == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!company.isModuleEnabled(entityType)) {
|
||||
if (!company!.isModuleEnabled(entityType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1105,20 +1098,20 @@ abstract class UserCompanyEntity
|
|||
}
|
||||
|
||||
bool receivesAllNotifications(String channel) =>
|
||||
notifications.containsKey(channel) &&
|
||||
notifications[channel].contains(kNotificationsAll);
|
||||
notifications!.containsKey(channel) &&
|
||||
notifications![channel]!.contains(kNotificationsAll);
|
||||
|
||||
bool canView(EntityType entityType) => can(UserPermission.view, entityType);
|
||||
bool canView(EntityType? entityType) => can(UserPermission.view, entityType);
|
||||
|
||||
bool canEdit(EntityType entityType) => can(UserPermission.edit, entityType);
|
||||
bool canEdit(EntityType? entityType) => can(UserPermission.edit, entityType);
|
||||
|
||||
bool canCreate(EntityType entityType) =>
|
||||
bool canCreate(EntityType? entityType) =>
|
||||
can(UserPermission.create, entityType);
|
||||
|
||||
bool canViewCreateOrEdit(EntityType entityType) =>
|
||||
bool canViewCreateOrEdit(EntityType? entityType) =>
|
||||
canView(entityType) || canCreate(entityType) || canEdit(entityType);
|
||||
|
||||
bool canEditEntity(BaseEntity entity) {
|
||||
bool canEditEntity(BaseEntity? entity) {
|
||||
if (entity == null) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1126,7 +1119,7 @@ abstract class UserCompanyEntity
|
|||
if (entity.isNew) {
|
||||
return canCreate(entity.entityType);
|
||||
} else {
|
||||
return canEdit(entity.entityType) || user.canEdit(entity);
|
||||
return canEdit(entity.entityType) || user!.canEdit(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1194,9 +1187,8 @@ abstract class UserSettingsEntity
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'accent_color')
|
||||
String get accentColor;
|
||||
String? get accentColor;
|
||||
|
||||
@BuiltValueField(wireName: 'table_columns')
|
||||
BuiltMap<String, BuiltList<String>> get tableColumns;
|
||||
|
|
@ -1219,20 +1211,20 @@ abstract class UserSettingsEntity
|
|||
@BuiltValueField(wireName: 'dashboard_fields_per_row_desktop')
|
||||
int get dashboardFieldsPerRowDesktop;
|
||||
|
||||
List<String> getTableColumns(EntityType entityType) {
|
||||
List<String>? getTableColumns(EntityType entityType) {
|
||||
if (tableColumns != null && tableColumns.containsKey('$entityType')) {
|
||||
return tableColumns['$entityType'].toList();
|
||||
return tableColumns['$entityType']!.toList();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
String get validatedAccentColor {
|
||||
String? get validatedAccentColor {
|
||||
if ((accentColor ?? '').isEmpty) {
|
||||
return kDefaultAccentColor;
|
||||
}
|
||||
|
||||
if (accentColor.toLowerCase() == '#ffffff') {
|
||||
if (accentColor!.toLowerCase() == '#ffffff') {
|
||||
return kDefaultAccentColor;
|
||||
}
|
||||
|
||||
|
|
@ -1270,10 +1262,10 @@ abstract class UserSettingsEntity
|
|||
abstract class ReportSettingsEntity
|
||||
implements Built<ReportSettingsEntity, ReportSettingsEntityBuilder> {
|
||||
factory ReportSettingsEntity({
|
||||
String sortColumn,
|
||||
bool sortAscending,
|
||||
int sortTotalsIndex,
|
||||
bool sortTotalsAscending,
|
||||
String? sortColumn,
|
||||
bool? sortAscending,
|
||||
int? sortTotalsIndex,
|
||||
bool? sortTotalsAscending,
|
||||
}) {
|
||||
return _$ReportSettingsEntity._(
|
||||
sortColumn: sortColumn ?? '',
|
||||
|
|
@ -1380,9 +1372,9 @@ abstract class RegistrationFieldEntity
|
|||
abstract class DashboardField
|
||||
implements Built<DashboardField, DashboardFieldBuilder> {
|
||||
factory DashboardField({
|
||||
String field,
|
||||
String period,
|
||||
String type,
|
||||
String? field,
|
||||
String? period,
|
||||
String? type,
|
||||
}) {
|
||||
return _$DashboardField._(
|
||||
field: field ?? '',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -19,9 +19,10 @@ class _$CreditListResponseSerializer
|
|||
final String wireName = 'CreditListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, CreditListResponse object,
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, CreditListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -33,21 +34,21 @@ class _$CreditListResponseSerializer
|
|||
|
||||
@override
|
||||
CreditListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CreditListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(InvoiceEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(InvoiceEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -64,9 +65,10 @@ class _$CreditItemResponseSerializer
|
|||
final String wireName = 'CreditItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, CreditItemResponse object,
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, CreditItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(InvoiceEntity)),
|
||||
|
|
@ -77,19 +79,19 @@ class _$CreditItemResponseSerializer
|
|||
|
||||
@override
|
||||
CreditItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CreditItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(InvoiceEntity)) as InvoiceEntity);
|
||||
specifiedType: const FullType(InvoiceEntity))! as InvoiceEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -103,10 +105,10 @@ class _$CreditListResponse extends CreditListResponse {
|
|||
final BuiltList<InvoiceEntity> data;
|
||||
|
||||
factory _$CreditListResponse(
|
||||
[void Function(CreditListResponseBuilder) updates]) =>
|
||||
[void Function(CreditListResponseBuilder)? updates]) =>
|
||||
(new CreditListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$CreditListResponse._({this.data}) : super._() {
|
||||
_$CreditListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'CreditListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -125,10 +127,10 @@ class _$CreditListResponse extends CreditListResponse {
|
|||
return other is CreditListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -145,12 +147,12 @@ class _$CreditListResponse extends CreditListResponse {
|
|||
|
||||
class CreditListResponseBuilder
|
||||
implements Builder<CreditListResponse, CreditListResponseBuilder> {
|
||||
_$CreditListResponse _$v;
|
||||
_$CreditListResponse? _$v;
|
||||
|
||||
ListBuilder<InvoiceEntity> _data;
|
||||
ListBuilder<InvoiceEntity>? _data;
|
||||
ListBuilder<InvoiceEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<InvoiceEntity>();
|
||||
set data(ListBuilder<InvoiceEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<InvoiceEntity>? data) => _$this._data = data;
|
||||
|
||||
CreditListResponseBuilder();
|
||||
|
||||
|
|
@ -170,7 +172,7 @@ class CreditListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CreditListResponseBuilder) updates) {
|
||||
void update(void Function(CreditListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +184,7 @@ class CreditListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$CreditListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -202,10 +204,10 @@ class _$CreditItemResponse extends CreditItemResponse {
|
|||
final InvoiceEntity data;
|
||||
|
||||
factory _$CreditItemResponse(
|
||||
[void Function(CreditItemResponseBuilder) updates]) =>
|
||||
[void Function(CreditItemResponseBuilder)? updates]) =>
|
||||
(new CreditItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$CreditItemResponse._({this.data}) : super._() {
|
||||
_$CreditItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'CreditItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -224,10 +226,10 @@ class _$CreditItemResponse extends CreditItemResponse {
|
|||
return other is CreditItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -244,11 +246,11 @@ class _$CreditItemResponse extends CreditItemResponse {
|
|||
|
||||
class CreditItemResponseBuilder
|
||||
implements Builder<CreditItemResponse, CreditItemResponseBuilder> {
|
||||
_$CreditItemResponse _$v;
|
||||
_$CreditItemResponse? _$v;
|
||||
|
||||
InvoiceEntityBuilder _data;
|
||||
InvoiceEntityBuilder? _data;
|
||||
InvoiceEntityBuilder get data => _$this._data ??= new InvoiceEntityBuilder();
|
||||
set data(InvoiceEntityBuilder data) => _$this._data = data;
|
||||
set data(InvoiceEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
CreditItemResponseBuilder();
|
||||
|
||||
|
|
@ -268,7 +270,7 @@ class CreditItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CreditItemResponseBuilder) updates) {
|
||||
void update(void Function(CreditItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -280,7 +282,7 @@ class CreditItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$CreditItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
|
|||
|
|
@ -49,13 +49,13 @@ class DateRangeComparison extends EnumClass {
|
|||
}
|
||||
|
||||
class DashboardSettings {
|
||||
DateRange dateRange;
|
||||
String startDate;
|
||||
String endDate;
|
||||
bool enableComparison;
|
||||
DateRangeComparison compareDateRange;
|
||||
String compareStartDate;
|
||||
String compareEndDate;
|
||||
DateRange? dateRange;
|
||||
String? startDate;
|
||||
String? endDate;
|
||||
bool? enableComparison;
|
||||
DateRangeComparison? compareDateRange;
|
||||
String? compareStartDate;
|
||||
String? compareEndDate;
|
||||
|
||||
static DashboardSettings fromState(DashboardUIState state) {
|
||||
final settings = state.settings;
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ abstract class DesignItemResponse
|
|||
abstract class DesignPreviewRequest
|
||||
implements Built<DesignPreviewRequest, DesignPreviewRequestBuilder> {
|
||||
factory DesignPreviewRequest({
|
||||
EntityType entityType,
|
||||
String entityId,
|
||||
DesignEntity design,
|
||||
EntityType? entityType,
|
||||
String? entityId,
|
||||
required DesignEntity design,
|
||||
}) {
|
||||
return _$DesignPreviewRequest._(
|
||||
entityType: entityType ?? EntityType.invoice,
|
||||
|
|
@ -87,10 +87,10 @@ abstract class DesignEntity extends Object
|
|||
with BaseEntity
|
||||
implements Built<DesignEntity, DesignEntityBuilder> {
|
||||
factory DesignEntity(
|
||||
{String id, AppState state, BuiltMap<String, String> design}) {
|
||||
{String? id, AppState? state, BuiltMap<String, String>? design}) {
|
||||
if (design == null && state != null) {
|
||||
final designMap = state.designState.map;
|
||||
design = designMap[state.company.settings.defaultInvoiceDesignId]?.design;
|
||||
design = designMap[state.company!.settings.defaultInvoiceDesignId]?.design;
|
||||
}
|
||||
|
||||
return _$DesignEntity._(
|
||||
|
|
@ -141,23 +141,23 @@ abstract class DesignEntity extends Object
|
|||
|
||||
String get displayName => name;
|
||||
|
||||
String getSection(String section) => design[section];
|
||||
String? getSection(String section) => design[section];
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.invoice)) {
|
||||
if (userCompany!.canCreate(EntityType.invoice)) {
|
||||
actions.add(EntityAction.newInvoice);
|
||||
}
|
||||
if (userCompany.canCreate(EntityType.quote)) {
|
||||
|
|
@ -171,7 +171,7 @@ abstract class DesignEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.design) && !multiselect) {
|
||||
if (userCompany!.canCreate(EntityType.design) && !multiselect) {
|
||||
actions.add(EntityAction.clone);
|
||||
}
|
||||
|
||||
|
|
@ -182,25 +182,25 @@ abstract class DesignEntity extends Object
|
|||
return actions..addAll(super.getActions(userCompany: userCompany));
|
||||
}
|
||||
|
||||
int compareTo(DesignEntity design, String sortField, bool sortAscending) {
|
||||
int compareTo(DesignEntity? design, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final designA = sortAscending ? this : design;
|
||||
final designB = sortAscending ? design : this;
|
||||
|
||||
switch (sortField) {
|
||||
case DesignFields.updatedAt:
|
||||
response = designA.updatedAt.compareTo(designB.updatedAt);
|
||||
response = designA!.updatedAt.compareTo(designB!.updatedAt);
|
||||
}
|
||||
|
||||
if (response == 0) {
|
||||
return designA.name.toLowerCase().compareTo(designB.name.toLowerCase());
|
||||
return designA!.name.toLowerCase().compareTo(designB!.name.toLowerCase());
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [name],
|
||||
needle: filter,
|
||||
|
|
@ -208,7 +208,7 @@ abstract class DesignEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [name],
|
||||
needle: filter,
|
||||
|
|
@ -219,10 +219,10 @@ abstract class DesignEntity extends Object
|
|||
String get listDisplayName => name;
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
// ignore: unused_element
|
||||
static void _initializeBuilder(DesignEntityBuilder builder) =>
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@ class _$DesignListResponseSerializer
|
|||
final String wireName = 'DesignListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, DesignListResponse object,
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DesignListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -37,21 +38,21 @@ class _$DesignListResponseSerializer
|
|||
|
||||
@override
|
||||
DesignListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DesignListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DesignEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DesignEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -68,9 +69,10 @@ class _$DesignItemResponseSerializer
|
|||
final String wireName = 'DesignItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, DesignItemResponse object,
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DesignItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(DesignEntity)),
|
||||
|
|
@ -81,19 +83,19 @@ class _$DesignItemResponseSerializer
|
|||
|
||||
@override
|
||||
DesignItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DesignItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(DesignEntity)) as DesignEntity);
|
||||
specifiedType: const FullType(DesignEntity))! as DesignEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -113,10 +115,10 @@ class _$DesignPreviewRequestSerializer
|
|||
final String wireName = 'DesignPreviewRequest';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DesignPreviewRequest object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'entity_type',
|
||||
serializers.serialize(object.entityType,
|
||||
specifiedType: const FullType(EntityType)),
|
||||
|
|
@ -133,27 +135,27 @@ class _$DesignPreviewRequestSerializer
|
|||
|
||||
@override
|
||||
DesignPreviewRequest deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DesignPreviewRequestBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'entity_type':
|
||||
result.entityType = serializers.deserialize(value,
|
||||
specifiedType: const FullType(EntityType)) as EntityType;
|
||||
specifiedType: const FullType(EntityType))! as EntityType;
|
||||
break;
|
||||
case 'entity_id':
|
||||
result.entityId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'design':
|
||||
result.design.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(DesignEntity)) as DesignEntity);
|
||||
specifiedType: const FullType(DesignEntity))! as DesignEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -169,9 +171,9 @@ class _$DesignEntitySerializer implements StructuredSerializer<DesignEntity> {
|
|||
final String wireName = 'DesignEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, DesignEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, DesignEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'design',
|
||||
|
|
@ -195,7 +197,7 @@ class _$DesignEntitySerializer implements StructuredSerializer<DesignEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -228,64 +230,65 @@ class _$DesignEntitySerializer implements StructuredSerializer<DesignEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
DesignEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
DesignEntity deserialize(
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DesignEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'design':
|
||||
result.design.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(String)])));
|
||||
const [const FullType(String), const FullType(String)]))!);
|
||||
break;
|
||||
case 'is_custom':
|
||||
result.isCustom = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'is_free':
|
||||
result.isFree = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -299,10 +302,10 @@ class _$DesignListResponse extends DesignListResponse {
|
|||
final BuiltList<DesignEntity> data;
|
||||
|
||||
factory _$DesignListResponse(
|
||||
[void Function(DesignListResponseBuilder) updates]) =>
|
||||
[void Function(DesignListResponseBuilder)? updates]) =>
|
||||
(new DesignListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DesignListResponse._({this.data}) : super._() {
|
||||
_$DesignListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'DesignListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -321,10 +324,10 @@ class _$DesignListResponse extends DesignListResponse {
|
|||
return other is DesignListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -341,12 +344,12 @@ class _$DesignListResponse extends DesignListResponse {
|
|||
|
||||
class DesignListResponseBuilder
|
||||
implements Builder<DesignListResponse, DesignListResponseBuilder> {
|
||||
_$DesignListResponse _$v;
|
||||
_$DesignListResponse? _$v;
|
||||
|
||||
ListBuilder<DesignEntity> _data;
|
||||
ListBuilder<DesignEntity>? _data;
|
||||
ListBuilder<DesignEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<DesignEntity>();
|
||||
set data(ListBuilder<DesignEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<DesignEntity>? data) => _$this._data = data;
|
||||
|
||||
DesignListResponseBuilder();
|
||||
|
||||
|
|
@ -366,7 +369,7 @@ class DesignListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DesignListResponseBuilder) updates) {
|
||||
void update(void Function(DesignListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -378,7 +381,7 @@ class DesignListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DesignListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -398,10 +401,10 @@ class _$DesignItemResponse extends DesignItemResponse {
|
|||
final DesignEntity data;
|
||||
|
||||
factory _$DesignItemResponse(
|
||||
[void Function(DesignItemResponseBuilder) updates]) =>
|
||||
[void Function(DesignItemResponseBuilder)? updates]) =>
|
||||
(new DesignItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DesignItemResponse._({this.data}) : super._() {
|
||||
_$DesignItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'DesignItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -420,10 +423,10 @@ class _$DesignItemResponse extends DesignItemResponse {
|
|||
return other is DesignItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -440,11 +443,11 @@ class _$DesignItemResponse extends DesignItemResponse {
|
|||
|
||||
class DesignItemResponseBuilder
|
||||
implements Builder<DesignItemResponse, DesignItemResponseBuilder> {
|
||||
_$DesignItemResponse _$v;
|
||||
_$DesignItemResponse? _$v;
|
||||
|
||||
DesignEntityBuilder _data;
|
||||
DesignEntityBuilder? _data;
|
||||
DesignEntityBuilder get data => _$this._data ??= new DesignEntityBuilder();
|
||||
set data(DesignEntityBuilder data) => _$this._data = data;
|
||||
set data(DesignEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
DesignItemResponseBuilder();
|
||||
|
||||
|
|
@ -464,7 +467,7 @@ class DesignItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DesignItemResponseBuilder) updates) {
|
||||
void update(void Function(DesignItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -476,7 +479,7 @@ class DesignItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DesignItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -500,10 +503,11 @@ class _$DesignPreviewRequest extends DesignPreviewRequest {
|
|||
final DesignEntity design;
|
||||
|
||||
factory _$DesignPreviewRequest(
|
||||
[void Function(DesignPreviewRequestBuilder) updates]) =>
|
||||
[void Function(DesignPreviewRequestBuilder)? updates]) =>
|
||||
(new DesignPreviewRequestBuilder()..update(updates))._build();
|
||||
|
||||
_$DesignPreviewRequest._({this.entityType, this.entityId, this.design})
|
||||
_$DesignPreviewRequest._(
|
||||
{required this.entityType, required this.entityId, required this.design})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
entityType, r'DesignPreviewRequest', 'entityType');
|
||||
|
|
@ -531,10 +535,10 @@ class _$DesignPreviewRequest extends DesignPreviewRequest {
|
|||
design == other.design;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, entityType.hashCode);
|
||||
_$hash = $jc(_$hash, entityId.hashCode);
|
||||
|
|
@ -555,20 +559,20 @@ class _$DesignPreviewRequest extends DesignPreviewRequest {
|
|||
|
||||
class DesignPreviewRequestBuilder
|
||||
implements Builder<DesignPreviewRequest, DesignPreviewRequestBuilder> {
|
||||
_$DesignPreviewRequest _$v;
|
||||
_$DesignPreviewRequest? _$v;
|
||||
|
||||
EntityType _entityType;
|
||||
EntityType get entityType => _$this._entityType;
|
||||
set entityType(EntityType entityType) => _$this._entityType = entityType;
|
||||
EntityType? _entityType;
|
||||
EntityType? get entityType => _$this._entityType;
|
||||
set entityType(EntityType? entityType) => _$this._entityType = entityType;
|
||||
|
||||
String _entityId;
|
||||
String get entityId => _$this._entityId;
|
||||
set entityId(String entityId) => _$this._entityId = entityId;
|
||||
String? _entityId;
|
||||
String? get entityId => _$this._entityId;
|
||||
set entityId(String? entityId) => _$this._entityId = entityId;
|
||||
|
||||
DesignEntityBuilder _design;
|
||||
DesignEntityBuilder? _design;
|
||||
DesignEntityBuilder get design =>
|
||||
_$this._design ??= new DesignEntityBuilder();
|
||||
set design(DesignEntityBuilder design) => _$this._design = design;
|
||||
set design(DesignEntityBuilder? design) => _$this._design = design;
|
||||
|
||||
DesignPreviewRequestBuilder();
|
||||
|
||||
|
|
@ -590,7 +594,7 @@ class DesignPreviewRequestBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DesignPreviewRequestBuilder) updates) {
|
||||
void update(void Function(DesignPreviewRequestBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -608,7 +612,7 @@ class DesignPreviewRequestBuilder
|
|||
entityId, r'DesignPreviewRequest', 'entityId'),
|
||||
design: design.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'design';
|
||||
design.build();
|
||||
|
|
@ -633,7 +637,7 @@ class _$DesignEntity extends DesignEntity {
|
|||
@override
|
||||
final bool isFree;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -641,30 +645,30 @@ class _$DesignEntity extends DesignEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$DesignEntity([void Function(DesignEntityBuilder) updates]) =>
|
||||
factory _$DesignEntity([void Function(DesignEntityBuilder)? updates]) =>
|
||||
(new DesignEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$DesignEntity._(
|
||||
{this.name,
|
||||
this.design,
|
||||
this.isCustom,
|
||||
this.isFree,
|
||||
{required this.name,
|
||||
required this.design,
|
||||
required this.isCustom,
|
||||
required this.isFree,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'DesignEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(design, r'DesignEntity', 'design');
|
||||
|
|
@ -705,10 +709,10 @@ class _$DesignEntity extends DesignEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, design.hashCode);
|
||||
|
|
@ -747,58 +751,58 @@ class _$DesignEntity extends DesignEntity {
|
|||
|
||||
class DesignEntityBuilder
|
||||
implements Builder<DesignEntity, DesignEntityBuilder> {
|
||||
_$DesignEntity _$v;
|
||||
_$DesignEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
MapBuilder<String, String> _design;
|
||||
MapBuilder<String, String>? _design;
|
||||
MapBuilder<String, String> get design =>
|
||||
_$this._design ??= new MapBuilder<String, String>();
|
||||
set design(MapBuilder<String, String> design) => _$this._design = design;
|
||||
set design(MapBuilder<String, String>? design) => _$this._design = design;
|
||||
|
||||
bool _isCustom;
|
||||
bool get isCustom => _$this._isCustom;
|
||||
set isCustom(bool isCustom) => _$this._isCustom = isCustom;
|
||||
bool? _isCustom;
|
||||
bool? get isCustom => _$this._isCustom;
|
||||
set isCustom(bool? isCustom) => _$this._isCustom = isCustom;
|
||||
|
||||
bool _isFree;
|
||||
bool get isFree => _$this._isFree;
|
||||
set isFree(bool isFree) => _$this._isFree = isFree;
|
||||
bool? _isFree;
|
||||
bool? get isFree => _$this._isFree;
|
||||
set isFree(bool? isFree) => _$this._isFree = isFree;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
DesignEntityBuilder() {
|
||||
DesignEntity._initializeBuilder(this);
|
||||
|
|
@ -831,7 +835,7 @@ class DesignEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DesignEntityBuilder) updates) {
|
||||
void update(void Function(DesignEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -863,7 +867,7 @@ class DesignEntityBuilder
|
|||
id: BuiltValueNullFieldError.checkNotNull(
|
||||
id, r'DesignEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'design';
|
||||
design.build();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class DocumentFields {
|
|||
abstract class DocumentEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<DocumentEntity, DocumentEntityBuilder> {
|
||||
factory DocumentEntity({String id}) {
|
||||
factory DocumentEntity({String? id}) {
|
||||
return _$DocumentEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -129,9 +129,8 @@ abstract class DocumentEntity extends Object
|
|||
|
||||
String get preview;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(serialize: false)
|
||||
Uint8List get data;
|
||||
Uint8List? get data;
|
||||
|
||||
@BuiltValueField(wireName: 'is_default')
|
||||
bool get isDefault;
|
||||
|
|
@ -139,13 +138,11 @@ abstract class DocumentEntity extends Object
|
|||
@BuiltValueField(wireName: 'is_public')
|
||||
bool get isPublic;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'parent_id')
|
||||
String get parentId;
|
||||
String? get parentId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'parent_type')
|
||||
EntityType get parentType;
|
||||
EntityType? get parentType;
|
||||
|
||||
DocumentEntity get clone => rebuild((b) => b
|
||||
..id = BaseEntity.nextId
|
||||
|
|
@ -163,7 +160,7 @@ abstract class DocumentEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
@ -189,42 +186,42 @@ abstract class DocumentEntity extends Object
|
|||
return fileName.endsWith('.pdf');
|
||||
}
|
||||
|
||||
int compareTo(DocumentEntity document,
|
||||
[String sortField, bool sortAscending = true]) {
|
||||
int compareTo(DocumentEntity? document,
|
||||
[String? sortField, bool sortAscending = true]) {
|
||||
int response = 0;
|
||||
final DocumentEntity documentA = sortAscending ? this : document;
|
||||
final DocumentEntity documentB = sortAscending ? document : this;
|
||||
final DocumentEntity? documentA = sortAscending ? this : document;
|
||||
final DocumentEntity? documentB = sortAscending ? document : this;
|
||||
|
||||
switch (sortField) {
|
||||
case DocumentFields.name:
|
||||
response = documentA.name
|
||||
response = documentA!.name
|
||||
.toLowerCase()
|
||||
.compareTo(documentB.name.toLowerCase());
|
||||
.compareTo(documentB!.name.toLowerCase());
|
||||
break;
|
||||
case DocumentFields.id:
|
||||
response = documentA.id.compareTo(documentB.id);
|
||||
response = documentA!.id.compareTo(documentB!.id);
|
||||
break;
|
||||
case DocumentFields.createdAt:
|
||||
response = documentA.createdAt.compareTo(documentB.createdAt);
|
||||
response = documentA!.createdAt.compareTo(documentB!.createdAt);
|
||||
break;
|
||||
case DocumentFields.type:
|
||||
response = documentA.type.compareTo(documentB.type);
|
||||
response = documentA!.type.compareTo(documentB!.type);
|
||||
break;
|
||||
case DocumentFields.size:
|
||||
response = documentA.size.compareTo(documentB.size);
|
||||
response = documentA!.size.compareTo(documentB!.size);
|
||||
break;
|
||||
case DocumentFields.width:
|
||||
response = documentA.width.compareTo(documentB.width);
|
||||
response = documentA!.width.compareTo(documentB!.width);
|
||||
break;
|
||||
case DocumentFields.height:
|
||||
response = documentA.height.compareTo(documentB.height);
|
||||
response = documentA!.height.compareTo(documentB!.height);
|
||||
break;
|
||||
case DocumentFields.hash:
|
||||
response = documentA.hash.compareTo(documentB.hash);
|
||||
response = documentA!.hash.compareTo(documentB!.hash);
|
||||
break;
|
||||
case DocumentFields.linkedTo:
|
||||
if (documentA.parentType == documentB.parentType) {
|
||||
response = documentA.parentId.compareTo(documentB.parentId);
|
||||
if (documentA!.parentType == documentB!.parentType) {
|
||||
response = documentA.parentId!.compareTo(documentB.parentId!);
|
||||
} else {
|
||||
response =
|
||||
'${documentA.parentType}'.compareTo('${documentB.parentType}');
|
||||
|
|
@ -272,7 +269,7 @@ abstract class DocumentEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -287,7 +284,7 @@ abstract class DocumentEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -299,16 +296,16 @@ abstract class DocumentEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
|
@ -317,7 +314,7 @@ abstract class DocumentEntity extends Object
|
|||
actions.add(EntityAction.viewDocument);
|
||||
}
|
||||
|
||||
if (!isDeleted) {
|
||||
if (!isDeleted!) {
|
||||
if (multiselect) {
|
||||
actions.add(EntityAction.bulkDownload);
|
||||
} else {
|
||||
|
|
@ -329,7 +326,7 @@ abstract class DocumentEntity extends Object
|
|||
actions.add(null);
|
||||
}
|
||||
|
||||
if (userCompany.canEditEntity(this) && !multiselect) {
|
||||
if (userCompany!.canEditEntity(this) && !multiselect) {
|
||||
actions.add(EntityAction.delete);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$DocumentListResponseSerializer
|
|||
final String wireName = 'DocumentListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DocumentListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$DocumentListResponseSerializer
|
|||
|
||||
@override
|
||||
DocumentListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DocumentListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DocumentEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DocumentEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$DocumentItemResponseSerializer
|
|||
final String wireName = 'DocumentItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DocumentItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(DocumentEntity)),
|
||||
|
|
@ -87,19 +87,20 @@ class _$DocumentItemResponseSerializer
|
|||
|
||||
@override
|
||||
DocumentItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DocumentItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(DocumentEntity)) as DocumentEntity);
|
||||
specifiedType: const FullType(DocumentEntity))!
|
||||
as DocumentEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,9 +117,9 @@ class _$DocumentEntitySerializer
|
|||
final String wireName = 'DocumentEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, DocumentEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, DocumentEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'hash',
|
||||
|
|
@ -154,7 +155,7 @@ class _$DocumentEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.parentId;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -202,95 +203,95 @@ class _$DocumentEntitySerializer
|
|||
|
||||
@override
|
||||
DocumentEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DocumentEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'hash':
|
||||
result.hash = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'type':
|
||||
result.type = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'url':
|
||||
result.url = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'width':
|
||||
result.width = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'height':
|
||||
result.height = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'size':
|
||||
result.size = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'preview':
|
||||
result.preview = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'is_default':
|
||||
result.isDefault = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'is_public':
|
||||
result.isPublic = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'parent_id':
|
||||
result.parentId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'parent_type':
|
||||
result.parentType = serializers.deserialize(value,
|
||||
specifiedType: const FullType(EntityType)) as EntityType;
|
||||
specifiedType: const FullType(EntityType)) as EntityType?;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -304,10 +305,10 @@ class _$DocumentListResponse extends DocumentListResponse {
|
|||
final BuiltList<DocumentEntity> data;
|
||||
|
||||
factory _$DocumentListResponse(
|
||||
[void Function(DocumentListResponseBuilder) updates]) =>
|
||||
[void Function(DocumentListResponseBuilder)? updates]) =>
|
||||
(new DocumentListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DocumentListResponse._({this.data}) : super._() {
|
||||
_$DocumentListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'DocumentListResponse', 'data');
|
||||
}
|
||||
|
|
@ -327,10 +328,10 @@ class _$DocumentListResponse extends DocumentListResponse {
|
|||
return other is DocumentListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -347,12 +348,12 @@ class _$DocumentListResponse extends DocumentListResponse {
|
|||
|
||||
class DocumentListResponseBuilder
|
||||
implements Builder<DocumentListResponse, DocumentListResponseBuilder> {
|
||||
_$DocumentListResponse _$v;
|
||||
_$DocumentListResponse? _$v;
|
||||
|
||||
ListBuilder<DocumentEntity> _data;
|
||||
ListBuilder<DocumentEntity>? _data;
|
||||
ListBuilder<DocumentEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<DocumentEntity>();
|
||||
set data(ListBuilder<DocumentEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<DocumentEntity>? data) => _$this._data = data;
|
||||
|
||||
DocumentListResponseBuilder();
|
||||
|
||||
|
|
@ -372,7 +373,7 @@ class DocumentListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DocumentListResponseBuilder) updates) {
|
||||
void update(void Function(DocumentListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -384,7 +385,7 @@ class DocumentListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DocumentListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -404,10 +405,10 @@ class _$DocumentItemResponse extends DocumentItemResponse {
|
|||
final DocumentEntity data;
|
||||
|
||||
factory _$DocumentItemResponse(
|
||||
[void Function(DocumentItemResponseBuilder) updates]) =>
|
||||
[void Function(DocumentItemResponseBuilder)? updates]) =>
|
||||
(new DocumentItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DocumentItemResponse._({this.data}) : super._() {
|
||||
_$DocumentItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'DocumentItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -427,10 +428,10 @@ class _$DocumentItemResponse extends DocumentItemResponse {
|
|||
return other is DocumentItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -447,12 +448,12 @@ class _$DocumentItemResponse extends DocumentItemResponse {
|
|||
|
||||
class DocumentItemResponseBuilder
|
||||
implements Builder<DocumentItemResponse, DocumentItemResponseBuilder> {
|
||||
_$DocumentItemResponse _$v;
|
||||
_$DocumentItemResponse? _$v;
|
||||
|
||||
DocumentEntityBuilder _data;
|
||||
DocumentEntityBuilder? _data;
|
||||
DocumentEntityBuilder get data =>
|
||||
_$this._data ??= new DocumentEntityBuilder();
|
||||
set data(DocumentEntityBuilder data) => _$this._data = data;
|
||||
set data(DocumentEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
DocumentItemResponseBuilder();
|
||||
|
||||
|
|
@ -472,7 +473,7 @@ class DocumentItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DocumentItemResponseBuilder) updates) {
|
||||
void update(void Function(DocumentItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -484,7 +485,7 @@ class DocumentItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DocumentItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -517,17 +518,17 @@ class _$DocumentEntity extends DocumentEntity {
|
|||
@override
|
||||
final String preview;
|
||||
@override
|
||||
final Uint8List data;
|
||||
final Uint8List? data;
|
||||
@override
|
||||
final bool isDefault;
|
||||
@override
|
||||
final bool isPublic;
|
||||
@override
|
||||
final String parentId;
|
||||
final String? parentId;
|
||||
@override
|
||||
final EntityType parentType;
|
||||
final EntityType? parentType;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -535,39 +536,39 @@ class _$DocumentEntity extends DocumentEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$DocumentEntity([void Function(DocumentEntityBuilder) updates]) =>
|
||||
factory _$DocumentEntity([void Function(DocumentEntityBuilder)? updates]) =>
|
||||
(new DocumentEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$DocumentEntity._(
|
||||
{this.name,
|
||||
this.hash,
|
||||
this.type,
|
||||
this.url,
|
||||
this.width,
|
||||
this.height,
|
||||
this.size,
|
||||
this.preview,
|
||||
{required this.name,
|
||||
required this.hash,
|
||||
required this.type,
|
||||
required this.url,
|
||||
required this.width,
|
||||
required this.height,
|
||||
required this.size,
|
||||
required this.preview,
|
||||
this.data,
|
||||
this.isDefault,
|
||||
this.isPublic,
|
||||
required this.isDefault,
|
||||
required this.isPublic,
|
||||
this.parentId,
|
||||
this.parentType,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'DocumentEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(hash, r'DocumentEntity', 'hash');
|
||||
|
|
@ -626,10 +627,10 @@ class _$DocumentEntity extends DocumentEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, hash.hashCode);
|
||||
|
|
@ -686,93 +687,93 @@ class _$DocumentEntity extends DocumentEntity {
|
|||
|
||||
class DocumentEntityBuilder
|
||||
implements Builder<DocumentEntity, DocumentEntityBuilder> {
|
||||
_$DocumentEntity _$v;
|
||||
_$DocumentEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _hash;
|
||||
String get hash => _$this._hash;
|
||||
set hash(String hash) => _$this._hash = hash;
|
||||
String? _hash;
|
||||
String? get hash => _$this._hash;
|
||||
set hash(String? hash) => _$this._hash = hash;
|
||||
|
||||
String _type;
|
||||
String get type => _$this._type;
|
||||
set type(String type) => _$this._type = type;
|
||||
String? _type;
|
||||
String? get type => _$this._type;
|
||||
set type(String? type) => _$this._type = type;
|
||||
|
||||
String _url;
|
||||
String get url => _$this._url;
|
||||
set url(String url) => _$this._url = url;
|
||||
String? _url;
|
||||
String? get url => _$this._url;
|
||||
set url(String? url) => _$this._url = url;
|
||||
|
||||
int _width;
|
||||
int get width => _$this._width;
|
||||
set width(int width) => _$this._width = width;
|
||||
int? _width;
|
||||
int? get width => _$this._width;
|
||||
set width(int? width) => _$this._width = width;
|
||||
|
||||
int _height;
|
||||
int get height => _$this._height;
|
||||
set height(int height) => _$this._height = height;
|
||||
int? _height;
|
||||
int? get height => _$this._height;
|
||||
set height(int? height) => _$this._height = height;
|
||||
|
||||
int _size;
|
||||
int get size => _$this._size;
|
||||
set size(int size) => _$this._size = size;
|
||||
int? _size;
|
||||
int? get size => _$this._size;
|
||||
set size(int? size) => _$this._size = size;
|
||||
|
||||
String _preview;
|
||||
String get preview => _$this._preview;
|
||||
set preview(String preview) => _$this._preview = preview;
|
||||
String? _preview;
|
||||
String? get preview => _$this._preview;
|
||||
set preview(String? preview) => _$this._preview = preview;
|
||||
|
||||
Uint8List _data;
|
||||
Uint8List get data => _$this._data;
|
||||
set data(Uint8List data) => _$this._data = data;
|
||||
Uint8List? _data;
|
||||
Uint8List? get data => _$this._data;
|
||||
set data(Uint8List? data) => _$this._data = data;
|
||||
|
||||
bool _isDefault;
|
||||
bool get isDefault => _$this._isDefault;
|
||||
set isDefault(bool isDefault) => _$this._isDefault = isDefault;
|
||||
bool? _isDefault;
|
||||
bool? get isDefault => _$this._isDefault;
|
||||
set isDefault(bool? isDefault) => _$this._isDefault = isDefault;
|
||||
|
||||
bool _isPublic;
|
||||
bool get isPublic => _$this._isPublic;
|
||||
set isPublic(bool isPublic) => _$this._isPublic = isPublic;
|
||||
bool? _isPublic;
|
||||
bool? get isPublic => _$this._isPublic;
|
||||
set isPublic(bool? isPublic) => _$this._isPublic = isPublic;
|
||||
|
||||
String _parentId;
|
||||
String get parentId => _$this._parentId;
|
||||
set parentId(String parentId) => _$this._parentId = parentId;
|
||||
String? _parentId;
|
||||
String? get parentId => _$this._parentId;
|
||||
set parentId(String? parentId) => _$this._parentId = parentId;
|
||||
|
||||
EntityType _parentType;
|
||||
EntityType get parentType => _$this._parentType;
|
||||
set parentType(EntityType parentType) => _$this._parentType = parentType;
|
||||
EntityType? _parentType;
|
||||
EntityType? get parentType => _$this._parentType;
|
||||
set parentType(EntityType? parentType) => _$this._parentType = parentType;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
DocumentEntityBuilder() {
|
||||
DocumentEntity._initializeBuilder(this);
|
||||
|
|
@ -814,7 +815,7 @@ class DocumentEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DocumentEntityBuilder) updates) {
|
||||
void update(void Function(DocumentEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -329,23 +329,23 @@ class EntityStats {
|
|||
this.currencyId,
|
||||
});
|
||||
|
||||
final int countActive;
|
||||
final int? countActive;
|
||||
|
||||
final int countArchived;
|
||||
final int? countArchived;
|
||||
|
||||
final double total;
|
||||
final double? total;
|
||||
|
||||
final String currencyId;
|
||||
final String? currencyId;
|
||||
|
||||
String present(String activeLabel, String archivedLabel) {
|
||||
String str = '';
|
||||
if (countActive > 0) {
|
||||
if (countActive! > 0) {
|
||||
str = '$countActive $activeLabel';
|
||||
if (countArchived > 0) {
|
||||
if (countArchived! > 0) {
|
||||
str += ' • ';
|
||||
}
|
||||
}
|
||||
if (countArchived > 0) {
|
||||
if (countArchived! > 0) {
|
||||
str += '$countArchived $archivedLabel';
|
||||
}
|
||||
return str;
|
||||
|
|
@ -355,15 +355,15 @@ class EntityStats {
|
|||
abstract class SelectableEntity {
|
||||
String get id;
|
||||
|
||||
bool matchesFilter(String filter) => true;
|
||||
bool matchesFilter(String? filter) => true;
|
||||
|
||||
String matchesFilterValue(String filter) => null;
|
||||
String? matchesFilterValue(String? filter) => null;
|
||||
|
||||
String get listDisplayName => 'Error: listDisplayName not set';
|
||||
String? get listDisplayName => 'Error: listDisplayName not set';
|
||||
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
FormatNumberType? get listDisplayAmountType => FormatNumberType.money;
|
||||
}
|
||||
|
||||
class EntityFields {
|
||||
|
|
@ -383,8 +383,7 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
|
||||
static String get nextIdempotencyKey => getRandomString();
|
||||
|
||||
@nullable
|
||||
bool get isChanged;
|
||||
bool? get isChanged;
|
||||
|
||||
@BuiltValueField(wireName: 'created_at')
|
||||
int get createdAt;
|
||||
|
|
@ -395,37 +394,33 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
@BuiltValueField(wireName: 'archived_at')
|
||||
int get archivedAt;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'is_deleted')
|
||||
bool get isDeleted;
|
||||
bool? get isDeleted;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'user_id')
|
||||
String get createdUserId;
|
||||
String? get createdUserId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'assigned_user_id')
|
||||
String get assignedUserId;
|
||||
String? get assignedUserId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'entity_type')
|
||||
EntityType get entityType;
|
||||
EntityType? get entityType;
|
||||
|
||||
String get entityKey => '__${entityType}__${id}__';
|
||||
|
||||
bool get isNew => (id ?? '').isEmpty || (int.tryParse(id) ?? 0) < 0;
|
||||
bool get isNew => id.isEmpty || (int.tryParse(id) ?? 0) < 0;
|
||||
|
||||
bool get isOld => !isNew;
|
||||
|
||||
bool get isDeletable => true;
|
||||
|
||||
bool get isActive => !isArchived && !isDeleted;
|
||||
bool get isActive => !isArchived && !isDeleted!;
|
||||
|
||||
bool get isNotActive => isArchived || isDeleted;
|
||||
bool get isNotActive => isArchived || isDeleted!;
|
||||
|
||||
bool get isArchived => archivedAt != null && archivedAt > 0 && !isDeleted;
|
||||
bool get isArchived => archivedAt != null && archivedAt > 0 && !isDeleted!;
|
||||
|
||||
bool get isEditable => !isDeleted;
|
||||
bool get isEditable => !isDeleted!;
|
||||
|
||||
bool get isRestorable => true;
|
||||
|
||||
|
|
@ -436,22 +431,23 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
? kEntityStateActive
|
||||
: (isArchived ? kEntityStateArchived : kEntityStateDeleted);
|
||||
|
||||
ReportStringValue getReportString({String value}) =>
|
||||
ReportStringValue getReportString({String? value}) =>
|
||||
ReportStringValue(entityId: id, entityType: entityType, value: value);
|
||||
|
||||
ReportEntityTypeValue getReportEntityType() => ReportEntityTypeValue(
|
||||
entityId: id, entityType: entityType, value: entityType);
|
||||
|
||||
ReportBoolValue getReportBool({bool value}) =>
|
||||
ReportBoolValue getReportBool({bool? value}) =>
|
||||
ReportBoolValue(entityId: id, entityType: entityType, value: value);
|
||||
|
||||
ReportAgeValue getReportAge({int value, String currencyId}) => ReportAgeValue(
|
||||
entityType: entityType,
|
||||
entityId: id,
|
||||
value: value,
|
||||
currencyId: currencyId);
|
||||
ReportAgeValue getReportAge({int? value, String? currencyId}) =>
|
||||
ReportAgeValue(
|
||||
entityType: entityType,
|
||||
entityId: id,
|
||||
value: value,
|
||||
currencyId: currencyId);
|
||||
|
||||
ReportDurationValue getReportDuration({int value, String currencyId}) =>
|
||||
ReportDurationValue getReportDuration({int? value, String? currencyId}) =>
|
||||
ReportDurationValue(
|
||||
entityType: entityType,
|
||||
entityId: id,
|
||||
|
|
@ -460,10 +456,10 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
);
|
||||
|
||||
ReportNumberValue getReportDouble(
|
||||
{double value,
|
||||
String currencyId,
|
||||
double exchangeRate,
|
||||
FormatNumberType formatNumberType}) =>
|
||||
{double? value,
|
||||
String? currencyId,
|
||||
double? exchangeRate,
|
||||
FormatNumberType? formatNumberType}) =>
|
||||
ReportNumberValue(
|
||||
entityId: id,
|
||||
entityType: entityType,
|
||||
|
|
@ -473,16 +469,18 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
formatNumberType: formatNumberType);
|
||||
|
||||
ReportIntValue getReportInt(
|
||||
{int value, String currencyId, FormatNumberType formatNumberType}) =>
|
||||
{int? value,
|
||||
String? currencyId,
|
||||
FormatNumberType? formatNumberType}) =>
|
||||
ReportIntValue(
|
||||
entityId: id,
|
||||
entityType: entityType,
|
||||
value: value,
|
||||
);
|
||||
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool multiselect = false}) {
|
||||
if (isNew || entityType == EntityType.company) {
|
||||
|
|
@ -491,7 +489,7 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
|
||||
final actions = <EntityAction>[];
|
||||
|
||||
if (userCompany.canEditEntity(this) && (isArchived || isDeleted)) {
|
||||
if (userCompany!.canEditEntity(this) && (isArchived || isDeleted!)) {
|
||||
actions.add(EntityAction.restore);
|
||||
}
|
||||
|
||||
|
|
@ -506,7 +504,8 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
return actions;
|
||||
}
|
||||
|
||||
bool matchesEntityFilter(EntityType filterEntityType, String filterEntityId) {
|
||||
bool matchesEntityFilter(
|
||||
EntityType? filterEntityType, String? filterEntityId) {
|
||||
return id == filterEntityId && entityType == filterEntityType;
|
||||
}
|
||||
|
||||
|
|
@ -527,7 +526,7 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (states.contains(EntityState.deleted) && isDeleted) {
|
||||
if (states.contains(EntityState.deleted) && isDeleted!) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -538,7 +537,7 @@ abstract class BaseEntity implements SelectableEntity {
|
|||
abstract class HasActivities {
|
||||
BuiltList<ActivityEntity> get activities;
|
||||
|
||||
Iterable<ActivityEntity> getActivities({String invoiceId, String typeId}) {
|
||||
Iterable<ActivityEntity> getActivities({String? invoiceId, String? typeId}) {
|
||||
return activities.where((activity) {
|
||||
if (invoiceId != null && activity.invoiceId != invoiceId) {
|
||||
return false;
|
||||
|
|
@ -552,7 +551,7 @@ abstract class HasActivities {
|
|||
}
|
||||
|
||||
abstract class BelongsToClient {
|
||||
String get clientId;
|
||||
String? get clientId;
|
||||
}
|
||||
|
||||
abstract class BelongsToVendor {
|
||||
|
|
@ -692,40 +691,32 @@ abstract class ActivityEntity
|
|||
@BuiltValueField(wireName: 'activity_type_id')
|
||||
String get activityTypeId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'client_id')
|
||||
String get clientId;
|
||||
String? get clientId;
|
||||
|
||||
@BuiltValueField(wireName: 'user_id')
|
||||
String get userId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'invoice_id')
|
||||
String get invoiceId;
|
||||
String? get invoiceId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'recurring_invoice_id')
|
||||
String get recurringInvoiceId;
|
||||
String? get recurringInvoiceId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'recurring_expense_id')
|
||||
String get recurringExpenseId;
|
||||
String? get recurringExpenseId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'purchase_order_id')
|
||||
String get purchaseOrderId;
|
||||
String? get purchaseOrderId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'quote_id')
|
||||
String get quoteId;
|
||||
String? get quoteId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'payment_id')
|
||||
String get paymentId;
|
||||
String? get paymentId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'credit_id')
|
||||
String get creditId;
|
||||
String? get creditId;
|
||||
|
||||
@BuiltValueField(wireName: 'updated_at')
|
||||
int get updatedAt;
|
||||
|
|
@ -733,45 +724,35 @@ abstract class ActivityEntity
|
|||
@BuiltValueField(wireName: 'created_at')
|
||||
int get createdAt;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'expense_id')
|
||||
String get expenseId;
|
||||
String? get expenseId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'is_system')
|
||||
bool get isSystem;
|
||||
bool? get isSystem;
|
||||
|
||||
@nullable
|
||||
String get ip;
|
||||
String? get ip;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'contact_id')
|
||||
String get contactId;
|
||||
String? get contactId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'task_id')
|
||||
String get taskId;
|
||||
String? get taskId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'project_id')
|
||||
String get projectId;
|
||||
String? get projectId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'vendor_id')
|
||||
String get vendorId;
|
||||
String? get vendorId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'vendor_contact_id')
|
||||
String get vendorContactId;
|
||||
String? get vendorContactId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'token_id')
|
||||
String get tokenId;
|
||||
String? get tokenId;
|
||||
|
||||
@nullable
|
||||
InvoiceHistoryEntity get history;
|
||||
InvoiceHistoryEntity? get history;
|
||||
|
||||
EntityType get entityType {
|
||||
EntityType? get entityType {
|
||||
if ([
|
||||
kActivityCreateClient,
|
||||
kActivityUpdateClient,
|
||||
|
|
@ -906,43 +887,43 @@ abstract class ActivityEntity
|
|||
}
|
||||
|
||||
String getDescription(
|
||||
String activity,
|
||||
String systemString,
|
||||
String recurringString, {
|
||||
UserEntity user,
|
||||
ClientEntity client,
|
||||
InvoiceEntity invoice,
|
||||
PaymentEntity payment,
|
||||
InvoiceEntity credit,
|
||||
InvoiceEntity quote,
|
||||
TaskEntity task,
|
||||
ExpenseEntity expense,
|
||||
VendorEntity vendor,
|
||||
InvoiceEntity recurringInvoice,
|
||||
ExpenseEntity recurringExpense,
|
||||
InvoiceEntity purchaseOrder,
|
||||
String? activity,
|
||||
String? systemString,
|
||||
String? recurringString, {
|
||||
UserEntity? user,
|
||||
ClientEntity? client,
|
||||
InvoiceEntity? invoice,
|
||||
PaymentEntity? payment,
|
||||
InvoiceEntity? credit,
|
||||
InvoiceEntity? quote,
|
||||
TaskEntity? task,
|
||||
ExpenseEntity? expense,
|
||||
VendorEntity? vendor,
|
||||
InvoiceEntity? recurringInvoice,
|
||||
ExpenseEntity? recurringExpense,
|
||||
InvoiceEntity? purchaseOrder,
|
||||
}) {
|
||||
ClientContactEntity clientContact;
|
||||
VendorContactEntity vendorContact;
|
||||
if (client != null && contactId != null && contactId.isNotEmpty) {
|
||||
ClientContactEntity? clientContact;
|
||||
VendorContactEntity? vendorContact;
|
||||
if (client != null && contactId != null && contactId!.isNotEmpty) {
|
||||
clientContact = client.getContact(contactId);
|
||||
}
|
||||
if (vendor != null &&
|
||||
vendorContactId != null &&
|
||||
vendorContactId.isNotEmpty) {
|
||||
vendorContactId!.isNotEmpty) {
|
||||
vendorContact = vendor.getContact(vendorContactId);
|
||||
}
|
||||
|
||||
if ((recurringInvoice?.isOld ?? false) && (invoice?.isOld ?? false)) {
|
||||
activity = activity.replaceFirst(
|
||||
':user', '$recurringString ${recurringInvoice.number}');
|
||||
activity = activity!.replaceFirst(
|
||||
':user', '$recurringString ${recurringInvoice!.number}');
|
||||
} else if ((recurringExpense?.isOld ?? false) &&
|
||||
(expense?.isOld ?? false)) {
|
||||
activity = activity.replaceFirst(
|
||||
':user', '$recurringString ${recurringExpense.number}');
|
||||
activity = activity!.replaceFirst(
|
||||
':user', '$recurringString ${recurringExpense!.number}');
|
||||
} else {
|
||||
activity =
|
||||
activity.replaceFirst(':user', user?.listDisplayName ?? systemString);
|
||||
activity = activity!
|
||||
.replaceFirst(':user', user?.listDisplayName ?? systemString!);
|
||||
}
|
||||
|
||||
activity = activity.replaceFirst(':client', client?.displayName ?? '');
|
||||
|
|
@ -957,14 +938,14 @@ abstract class ActivityEntity
|
|||
kActivityAcceptPurchaseOrder,
|
||||
].contains(activityTypeId)) {
|
||||
final name = (vendorContact?.fullName ?? '').isNotEmpty
|
||||
? (vendorContact.fullName + ' (' + (vendor?.name ?? '') + ')')
|
||||
? (vendorContact!.fullName + ' (' + (vendor?.name ?? '') + ')')
|
||||
: (vendor?.name ?? '');
|
||||
activity = activity.replaceFirst(':contact', name);
|
||||
} else {
|
||||
final name = (clientContact?.fullName ?? '').isNotEmpty
|
||||
? clientContact.fullName +
|
||||
? clientContact!.fullName +
|
||||
((client?.name ?? '').isNotEmpty
|
||||
? (' (' + client.name + ')')
|
||||
? (' (' + client!.name + ')')
|
||||
: '')
|
||||
: (client?.displayName ?? '');
|
||||
activity = activity.replaceFirst(':contact', name);
|
||||
|
|
@ -1011,17 +992,14 @@ abstract class LedgerEntity
|
|||
@BuiltValueField(wireName: 'created_at')
|
||||
int get createdAt;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'invoice_id')
|
||||
String get invoiceId;
|
||||
String? get invoiceId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'credit_id')
|
||||
String get creditId;
|
||||
String? get creditId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'payment_id')
|
||||
String get paymentId;
|
||||
String? get paymentId;
|
||||
|
||||
EntityType get entityType {
|
||||
if (creditId != null) {
|
||||
|
|
@ -1033,7 +1011,7 @@ abstract class LedgerEntity
|
|||
}
|
||||
}
|
||||
|
||||
String get entityId {
|
||||
String? get entityId {
|
||||
if (creditId != null) {
|
||||
return creditId;
|
||||
} else if (paymentId != null) {
|
||||
|
|
|
|||
|
|
@ -419,9 +419,9 @@ class _$ErrorMessageSerializer implements StructuredSerializer<ErrorMessage> {
|
|||
final String wireName = 'ErrorMessage';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, ErrorMessage object,
|
||||
Iterable<Object?> serialize(Serializers serializers, ErrorMessage object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'message',
|
||||
serializers.serialize(object.message,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -431,19 +431,20 @@ class _$ErrorMessageSerializer implements StructuredSerializer<ErrorMessage> {
|
|||
}
|
||||
|
||||
@override
|
||||
ErrorMessage deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
ErrorMessage deserialize(
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ErrorMessageBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'message':
|
||||
result.message = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -459,9 +460,9 @@ class _$LoginResponseSerializer implements StructuredSerializer<LoginResponse> {
|
|||
final String wireName = 'LoginResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, LoginResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, LoginResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.userCompanies,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -476,25 +477,25 @@ class _$LoginResponseSerializer implements StructuredSerializer<LoginResponse> {
|
|||
|
||||
@override
|
||||
LoginResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new LoginResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.userCompanies.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(UserCompanyEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(UserCompanyEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'static':
|
||||
result.static.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(StaticDataEntity))
|
||||
specifiedType: const FullType(StaticDataEntity))!
|
||||
as StaticDataEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -512,9 +513,9 @@ class _$ActivityEntitySerializer
|
|||
final String wireName = 'ActivityEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, ActivityEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, ActivityEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'notes',
|
||||
serializers.serialize(object.notes,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -533,7 +534,7 @@ class _$ActivityEntitySerializer
|
|||
serializers.serialize(object.createdAt,
|
||||
specifiedType: const FullType(int)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.clientId;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -665,111 +666,111 @@ class _$ActivityEntitySerializer
|
|||
|
||||
@override
|
||||
ActivityEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ActivityEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'notes':
|
||||
result.notes = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.key = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'activity_type_id':
|
||||
result.activityTypeId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'client_id':
|
||||
result.clientId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.userId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'invoice_id':
|
||||
result.invoiceId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'recurring_invoice_id':
|
||||
result.recurringInvoiceId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'recurring_expense_id':
|
||||
result.recurringExpenseId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'purchase_order_id':
|
||||
result.purchaseOrderId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'quote_id':
|
||||
result.quoteId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'payment_id':
|
||||
result.paymentId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'credit_id':
|
||||
result.creditId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'expense_id':
|
||||
result.expenseId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'is_system':
|
||||
result.isSystem = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'ip':
|
||||
result.ip = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'contact_id':
|
||||
result.contactId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'task_id':
|
||||
result.taskId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'project_id':
|
||||
result.projectId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'vendor_id':
|
||||
result.vendorId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'vendor_contact_id':
|
||||
result.vendorContactId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'token_id':
|
||||
result.tokenId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'history':
|
||||
result.history.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(InvoiceHistoryEntity))
|
||||
specifiedType: const FullType(InvoiceHistoryEntity))!
|
||||
as InvoiceHistoryEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -786,9 +787,9 @@ class _$LedgerEntitySerializer implements StructuredSerializer<LedgerEntity> {
|
|||
final String wireName = 'LedgerEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, LedgerEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, LedgerEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'notes',
|
||||
serializers.serialize(object.notes,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -802,7 +803,7 @@ class _$LedgerEntitySerializer implements StructuredSerializer<LedgerEntity> {
|
|||
serializers.serialize(object.createdAt,
|
||||
specifiedType: const FullType(int)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.invoiceId;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -828,43 +829,44 @@ class _$LedgerEntitySerializer implements StructuredSerializer<LedgerEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
LedgerEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
LedgerEntity deserialize(
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new LedgerEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'notes':
|
||||
result.notes = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'balance':
|
||||
result.balance = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'adjustment':
|
||||
result.adjustment = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'invoice_id':
|
||||
result.invoiceId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'credit_id':
|
||||
result.creditId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'payment_id':
|
||||
result.paymentId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -877,10 +879,10 @@ class _$ErrorMessage extends ErrorMessage {
|
|||
@override
|
||||
final String message;
|
||||
|
||||
factory _$ErrorMessage([void Function(ErrorMessageBuilder) updates]) =>
|
||||
factory _$ErrorMessage([void Function(ErrorMessageBuilder)? updates]) =>
|
||||
(new ErrorMessageBuilder()..update(updates))._build();
|
||||
|
||||
_$ErrorMessage._({this.message}) : super._() {
|
||||
_$ErrorMessage._({required this.message}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(message, r'ErrorMessage', 'message');
|
||||
}
|
||||
|
||||
|
|
@ -897,10 +899,10 @@ class _$ErrorMessage extends ErrorMessage {
|
|||
return other is ErrorMessage && message == other.message;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, message.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -917,11 +919,11 @@ class _$ErrorMessage extends ErrorMessage {
|
|||
|
||||
class ErrorMessageBuilder
|
||||
implements Builder<ErrorMessage, ErrorMessageBuilder> {
|
||||
_$ErrorMessage _$v;
|
||||
_$ErrorMessage? _$v;
|
||||
|
||||
String _message;
|
||||
String get message => _$this._message;
|
||||
set message(String message) => _$this._message = message;
|
||||
String? _message;
|
||||
String? get message => _$this._message;
|
||||
set message(String? message) => _$this._message = message;
|
||||
|
||||
ErrorMessageBuilder();
|
||||
|
||||
|
|
@ -941,7 +943,7 @@ class ErrorMessageBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ErrorMessageBuilder) updates) {
|
||||
void update(void Function(ErrorMessageBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -964,10 +966,11 @@ class _$LoginResponse extends LoginResponse {
|
|||
@override
|
||||
final StaticDataEntity static;
|
||||
|
||||
factory _$LoginResponse([void Function(LoginResponseBuilder) updates]) =>
|
||||
factory _$LoginResponse([void Function(LoginResponseBuilder)? updates]) =>
|
||||
(new LoginResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$LoginResponse._({this.userCompanies, this.static}) : super._() {
|
||||
_$LoginResponse._({required this.userCompanies, required this.static})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
userCompanies, r'LoginResponse', 'userCompanies');
|
||||
BuiltValueNullFieldError.checkNotNull(static, r'LoginResponse', 'static');
|
||||
|
|
@ -988,10 +991,10 @@ class _$LoginResponse extends LoginResponse {
|
|||
static == other.static;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, userCompanies.hashCode);
|
||||
_$hash = $jc(_$hash, static.hashCode);
|
||||
|
|
@ -1010,18 +1013,18 @@ class _$LoginResponse extends LoginResponse {
|
|||
|
||||
class LoginResponseBuilder
|
||||
implements Builder<LoginResponse, LoginResponseBuilder> {
|
||||
_$LoginResponse _$v;
|
||||
_$LoginResponse? _$v;
|
||||
|
||||
ListBuilder<UserCompanyEntity> _userCompanies;
|
||||
ListBuilder<UserCompanyEntity>? _userCompanies;
|
||||
ListBuilder<UserCompanyEntity> get userCompanies =>
|
||||
_$this._userCompanies ??= new ListBuilder<UserCompanyEntity>();
|
||||
set userCompanies(ListBuilder<UserCompanyEntity> userCompanies) =>
|
||||
set userCompanies(ListBuilder<UserCompanyEntity>? userCompanies) =>
|
||||
_$this._userCompanies = userCompanies;
|
||||
|
||||
StaticDataEntityBuilder _static;
|
||||
StaticDataEntityBuilder? _static;
|
||||
StaticDataEntityBuilder get static =>
|
||||
_$this._static ??= new StaticDataEntityBuilder();
|
||||
set static(StaticDataEntityBuilder static) => _$this._static = static;
|
||||
set static(StaticDataEntityBuilder? static) => _$this._static = static;
|
||||
|
||||
LoginResponseBuilder();
|
||||
|
||||
|
|
@ -1042,7 +1045,7 @@ class LoginResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(LoginResponseBuilder) updates) {
|
||||
void update(void Function(LoginResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1056,7 +1059,7 @@ class LoginResponseBuilder
|
|||
new _$LoginResponse._(
|
||||
userCompanies: userCompanies.build(), static: static.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'userCompanies';
|
||||
userCompanies.build();
|
||||
|
|
@ -1081,57 +1084,57 @@ class _$ActivityEntity extends ActivityEntity {
|
|||
@override
|
||||
final String activityTypeId;
|
||||
@override
|
||||
final String clientId;
|
||||
final String? clientId;
|
||||
@override
|
||||
final String userId;
|
||||
@override
|
||||
final String invoiceId;
|
||||
final String? invoiceId;
|
||||
@override
|
||||
final String recurringInvoiceId;
|
||||
final String? recurringInvoiceId;
|
||||
@override
|
||||
final String recurringExpenseId;
|
||||
final String? recurringExpenseId;
|
||||
@override
|
||||
final String purchaseOrderId;
|
||||
final String? purchaseOrderId;
|
||||
@override
|
||||
final String quoteId;
|
||||
final String? quoteId;
|
||||
@override
|
||||
final String paymentId;
|
||||
final String? paymentId;
|
||||
@override
|
||||
final String creditId;
|
||||
final String? creditId;
|
||||
@override
|
||||
final int updatedAt;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
final String expenseId;
|
||||
final String? expenseId;
|
||||
@override
|
||||
final bool isSystem;
|
||||
final bool? isSystem;
|
||||
@override
|
||||
final String ip;
|
||||
final String? ip;
|
||||
@override
|
||||
final String contactId;
|
||||
final String? contactId;
|
||||
@override
|
||||
final String taskId;
|
||||
final String? taskId;
|
||||
@override
|
||||
final String projectId;
|
||||
final String? projectId;
|
||||
@override
|
||||
final String vendorId;
|
||||
final String? vendorId;
|
||||
@override
|
||||
final String vendorContactId;
|
||||
final String? vendorContactId;
|
||||
@override
|
||||
final String tokenId;
|
||||
final String? tokenId;
|
||||
@override
|
||||
final InvoiceHistoryEntity history;
|
||||
final InvoiceHistoryEntity? history;
|
||||
|
||||
factory _$ActivityEntity([void Function(ActivityEntityBuilder) updates]) =>
|
||||
factory _$ActivityEntity([void Function(ActivityEntityBuilder)? updates]) =>
|
||||
(new ActivityEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$ActivityEntity._(
|
||||
{this.notes,
|
||||
this.key,
|
||||
this.activityTypeId,
|
||||
{required this.notes,
|
||||
required this.key,
|
||||
required this.activityTypeId,
|
||||
this.clientId,
|
||||
this.userId,
|
||||
required this.userId,
|
||||
this.invoiceId,
|
||||
this.recurringInvoiceId,
|
||||
this.recurringExpenseId,
|
||||
|
|
@ -1139,8 +1142,8 @@ class _$ActivityEntity extends ActivityEntity {
|
|||
this.quoteId,
|
||||
this.paymentId,
|
||||
this.creditId,
|
||||
this.updatedAt,
|
||||
this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.createdAt,
|
||||
this.expenseId,
|
||||
this.isSystem,
|
||||
this.ip,
|
||||
|
|
@ -1201,10 +1204,10 @@ class _$ActivityEntity extends ActivityEntity {
|
|||
history == other.history;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, notes.hashCode);
|
||||
_$hash = $jc(_$hash, key.hashCode);
|
||||
|
|
@ -1267,109 +1270,110 @@ class _$ActivityEntity extends ActivityEntity {
|
|||
|
||||
class ActivityEntityBuilder
|
||||
implements Builder<ActivityEntity, ActivityEntityBuilder> {
|
||||
_$ActivityEntity _$v;
|
||||
_$ActivityEntity? _$v;
|
||||
|
||||
String _notes;
|
||||
String get notes => _$this._notes;
|
||||
set notes(String notes) => _$this._notes = notes;
|
||||
String? _notes;
|
||||
String? get notes => _$this._notes;
|
||||
set notes(String? notes) => _$this._notes = notes;
|
||||
|
||||
String _key;
|
||||
String get key => _$this._key;
|
||||
set key(String key) => _$this._key = key;
|
||||
String? _key;
|
||||
String? get key => _$this._key;
|
||||
set key(String? key) => _$this._key = key;
|
||||
|
||||
String _activityTypeId;
|
||||
String get activityTypeId => _$this._activityTypeId;
|
||||
set activityTypeId(String activityTypeId) =>
|
||||
String? _activityTypeId;
|
||||
String? get activityTypeId => _$this._activityTypeId;
|
||||
set activityTypeId(String? activityTypeId) =>
|
||||
_$this._activityTypeId = activityTypeId;
|
||||
|
||||
String _clientId;
|
||||
String get clientId => _$this._clientId;
|
||||
set clientId(String clientId) => _$this._clientId = clientId;
|
||||
String? _clientId;
|
||||
String? get clientId => _$this._clientId;
|
||||
set clientId(String? clientId) => _$this._clientId = clientId;
|
||||
|
||||
String _userId;
|
||||
String get userId => _$this._userId;
|
||||
set userId(String userId) => _$this._userId = userId;
|
||||
String? _userId;
|
||||
String? get userId => _$this._userId;
|
||||
set userId(String? userId) => _$this._userId = userId;
|
||||
|
||||
String _invoiceId;
|
||||
String get invoiceId => _$this._invoiceId;
|
||||
set invoiceId(String invoiceId) => _$this._invoiceId = invoiceId;
|
||||
String? _invoiceId;
|
||||
String? get invoiceId => _$this._invoiceId;
|
||||
set invoiceId(String? invoiceId) => _$this._invoiceId = invoiceId;
|
||||
|
||||
String _recurringInvoiceId;
|
||||
String get recurringInvoiceId => _$this._recurringInvoiceId;
|
||||
set recurringInvoiceId(String recurringInvoiceId) =>
|
||||
String? _recurringInvoiceId;
|
||||
String? get recurringInvoiceId => _$this._recurringInvoiceId;
|
||||
set recurringInvoiceId(String? recurringInvoiceId) =>
|
||||
_$this._recurringInvoiceId = recurringInvoiceId;
|
||||
|
||||
String _recurringExpenseId;
|
||||
String get recurringExpenseId => _$this._recurringExpenseId;
|
||||
set recurringExpenseId(String recurringExpenseId) =>
|
||||
String? _recurringExpenseId;
|
||||
String? get recurringExpenseId => _$this._recurringExpenseId;
|
||||
set recurringExpenseId(String? recurringExpenseId) =>
|
||||
_$this._recurringExpenseId = recurringExpenseId;
|
||||
|
||||
String _purchaseOrderId;
|
||||
String get purchaseOrderId => _$this._purchaseOrderId;
|
||||
set purchaseOrderId(String purchaseOrderId) =>
|
||||
String? _purchaseOrderId;
|
||||
String? get purchaseOrderId => _$this._purchaseOrderId;
|
||||
set purchaseOrderId(String? purchaseOrderId) =>
|
||||
_$this._purchaseOrderId = purchaseOrderId;
|
||||
|
||||
String _quoteId;
|
||||
String get quoteId => _$this._quoteId;
|
||||
set quoteId(String quoteId) => _$this._quoteId = quoteId;
|
||||
String? _quoteId;
|
||||
String? get quoteId => _$this._quoteId;
|
||||
set quoteId(String? quoteId) => _$this._quoteId = quoteId;
|
||||
|
||||
String _paymentId;
|
||||
String get paymentId => _$this._paymentId;
|
||||
set paymentId(String paymentId) => _$this._paymentId = paymentId;
|
||||
String? _paymentId;
|
||||
String? get paymentId => _$this._paymentId;
|
||||
set paymentId(String? paymentId) => _$this._paymentId = paymentId;
|
||||
|
||||
String _creditId;
|
||||
String get creditId => _$this._creditId;
|
||||
set creditId(String creditId) => _$this._creditId = creditId;
|
||||
String? _creditId;
|
||||
String? get creditId => _$this._creditId;
|
||||
set creditId(String? creditId) => _$this._creditId = creditId;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
String _expenseId;
|
||||
String get expenseId => _$this._expenseId;
|
||||
set expenseId(String expenseId) => _$this._expenseId = expenseId;
|
||||
String? _expenseId;
|
||||
String? get expenseId => _$this._expenseId;
|
||||
set expenseId(String? expenseId) => _$this._expenseId = expenseId;
|
||||
|
||||
bool _isSystem;
|
||||
bool get isSystem => _$this._isSystem;
|
||||
set isSystem(bool isSystem) => _$this._isSystem = isSystem;
|
||||
bool? _isSystem;
|
||||
bool? get isSystem => _$this._isSystem;
|
||||
set isSystem(bool? isSystem) => _$this._isSystem = isSystem;
|
||||
|
||||
String _ip;
|
||||
String get ip => _$this._ip;
|
||||
set ip(String ip) => _$this._ip = ip;
|
||||
String? _ip;
|
||||
String? get ip => _$this._ip;
|
||||
set ip(String? ip) => _$this._ip = ip;
|
||||
|
||||
String _contactId;
|
||||
String get contactId => _$this._contactId;
|
||||
set contactId(String contactId) => _$this._contactId = contactId;
|
||||
String? _contactId;
|
||||
String? get contactId => _$this._contactId;
|
||||
set contactId(String? contactId) => _$this._contactId = contactId;
|
||||
|
||||
String _taskId;
|
||||
String get taskId => _$this._taskId;
|
||||
set taskId(String taskId) => _$this._taskId = taskId;
|
||||
String? _taskId;
|
||||
String? get taskId => _$this._taskId;
|
||||
set taskId(String? taskId) => _$this._taskId = taskId;
|
||||
|
||||
String _projectId;
|
||||
String get projectId => _$this._projectId;
|
||||
set projectId(String projectId) => _$this._projectId = projectId;
|
||||
String? _projectId;
|
||||
String? get projectId => _$this._projectId;
|
||||
set projectId(String? projectId) => _$this._projectId = projectId;
|
||||
|
||||
String _vendorId;
|
||||
String get vendorId => _$this._vendorId;
|
||||
set vendorId(String vendorId) => _$this._vendorId = vendorId;
|
||||
String? _vendorId;
|
||||
String? get vendorId => _$this._vendorId;
|
||||
set vendorId(String? vendorId) => _$this._vendorId = vendorId;
|
||||
|
||||
String _vendorContactId;
|
||||
String get vendorContactId => _$this._vendorContactId;
|
||||
set vendorContactId(String vendorContactId) =>
|
||||
String? _vendorContactId;
|
||||
String? get vendorContactId => _$this._vendorContactId;
|
||||
set vendorContactId(String? vendorContactId) =>
|
||||
_$this._vendorContactId = vendorContactId;
|
||||
|
||||
String _tokenId;
|
||||
String get tokenId => _$this._tokenId;
|
||||
set tokenId(String tokenId) => _$this._tokenId = tokenId;
|
||||
String? _tokenId;
|
||||
String? get tokenId => _$this._tokenId;
|
||||
set tokenId(String? tokenId) => _$this._tokenId = tokenId;
|
||||
|
||||
InvoiceHistoryEntityBuilder _history;
|
||||
InvoiceHistoryEntityBuilder? _history;
|
||||
InvoiceHistoryEntityBuilder get history =>
|
||||
_$this._history ??= new InvoiceHistoryEntityBuilder();
|
||||
set history(InvoiceHistoryEntityBuilder history) => _$this._history = history;
|
||||
set history(InvoiceHistoryEntityBuilder? history) =>
|
||||
_$this._history = history;
|
||||
|
||||
ActivityEntityBuilder() {
|
||||
ActivityEntity._initializeBuilder(this);
|
||||
|
|
@ -1414,7 +1418,7 @@ class ActivityEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ActivityEntityBuilder) updates) {
|
||||
void update(void Function(ActivityEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1457,7 +1461,7 @@ class ActivityEntityBuilder
|
|||
tokenId: tokenId,
|
||||
history: _history?.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'history';
|
||||
_history?.build();
|
||||
|
|
@ -1482,20 +1486,20 @@ class _$LedgerEntity extends LedgerEntity {
|
|||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
final String invoiceId;
|
||||
final String? invoiceId;
|
||||
@override
|
||||
final String creditId;
|
||||
final String? creditId;
|
||||
@override
|
||||
final String paymentId;
|
||||
final String? paymentId;
|
||||
|
||||
factory _$LedgerEntity([void Function(LedgerEntityBuilder) updates]) =>
|
||||
factory _$LedgerEntity([void Function(LedgerEntityBuilder)? updates]) =>
|
||||
(new LedgerEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$LedgerEntity._(
|
||||
{this.notes,
|
||||
this.balance,
|
||||
this.adjustment,
|
||||
this.createdAt,
|
||||
{required this.notes,
|
||||
required this.balance,
|
||||
required this.adjustment,
|
||||
required this.createdAt,
|
||||
this.invoiceId,
|
||||
this.creditId,
|
||||
this.paymentId})
|
||||
|
|
@ -1528,10 +1532,10 @@ class _$LedgerEntity extends LedgerEntity {
|
|||
paymentId == other.paymentId;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, notes.hashCode);
|
||||
_$hash = $jc(_$hash, balance.hashCode);
|
||||
|
|
@ -1560,35 +1564,35 @@ class _$LedgerEntity extends LedgerEntity {
|
|||
|
||||
class LedgerEntityBuilder
|
||||
implements Builder<LedgerEntity, LedgerEntityBuilder> {
|
||||
_$LedgerEntity _$v;
|
||||
_$LedgerEntity? _$v;
|
||||
|
||||
String _notes;
|
||||
String get notes => _$this._notes;
|
||||
set notes(String notes) => _$this._notes = notes;
|
||||
String? _notes;
|
||||
String? get notes => _$this._notes;
|
||||
set notes(String? notes) => _$this._notes = notes;
|
||||
|
||||
double _balance;
|
||||
double get balance => _$this._balance;
|
||||
set balance(double balance) => _$this._balance = balance;
|
||||
double? _balance;
|
||||
double? get balance => _$this._balance;
|
||||
set balance(double? balance) => _$this._balance = balance;
|
||||
|
||||
double _adjustment;
|
||||
double get adjustment => _$this._adjustment;
|
||||
set adjustment(double adjustment) => _$this._adjustment = adjustment;
|
||||
double? _adjustment;
|
||||
double? get adjustment => _$this._adjustment;
|
||||
set adjustment(double? adjustment) => _$this._adjustment = adjustment;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
String _invoiceId;
|
||||
String get invoiceId => _$this._invoiceId;
|
||||
set invoiceId(String invoiceId) => _$this._invoiceId = invoiceId;
|
||||
String? _invoiceId;
|
||||
String? get invoiceId => _$this._invoiceId;
|
||||
set invoiceId(String? invoiceId) => _$this._invoiceId = invoiceId;
|
||||
|
||||
String _creditId;
|
||||
String get creditId => _$this._creditId;
|
||||
set creditId(String creditId) => _$this._creditId = creditId;
|
||||
String? _creditId;
|
||||
String? get creditId => _$this._creditId;
|
||||
set creditId(String? creditId) => _$this._creditId = creditId;
|
||||
|
||||
String _paymentId;
|
||||
String get paymentId => _$this._paymentId;
|
||||
set paymentId(String paymentId) => _$this._paymentId = paymentId;
|
||||
String? _paymentId;
|
||||
String? get paymentId => _$this._paymentId;
|
||||
set paymentId(String? paymentId) => _$this._paymentId = paymentId;
|
||||
|
||||
LedgerEntityBuilder();
|
||||
|
||||
|
|
@ -1614,7 +1618,7 @@ class LedgerEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(LedgerEntityBuilder) updates) {
|
||||
void update(void Function(LedgerEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class ExpenseCategoryFields {
|
|||
abstract class ExpenseCategoryEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<ExpenseCategoryEntity, ExpenseCategoryEntityBuilder> {
|
||||
factory ExpenseCategoryEntity({String id, AppState state}) {
|
||||
factory ExpenseCategoryEntity({String? id, AppState? state}) {
|
||||
return _$ExpenseCategoryEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -82,16 +82,16 @@ abstract class ExpenseCategoryEntity extends Object
|
|||
int get hashCode;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ abstract class ExpenseCategoryEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ abstract class ExpenseCategoryEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ abstract class ExpenseCategoryEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
@ -142,20 +142,20 @@ abstract class ExpenseCategoryEntity extends Object
|
|||
String get color;
|
||||
|
||||
int compareTo(
|
||||
{ExpenseCategoryEntity expenseCategory,
|
||||
String sortField,
|
||||
bool sortAscending}) {
|
||||
{ExpenseCategoryEntity? expenseCategory,
|
||||
String? sortField,
|
||||
required bool sortAscending}) {
|
||||
int response = 0;
|
||||
final ExpenseCategoryEntity categoryA =
|
||||
final ExpenseCategoryEntity? categoryA =
|
||||
sortAscending ? this : expenseCategory;
|
||||
final ExpenseCategoryEntity categoryB =
|
||||
final ExpenseCategoryEntity? categoryB =
|
||||
sortAscending ? expenseCategory : this;
|
||||
|
||||
switch (sortField) {
|
||||
case ExpenseCategoryFields.name:
|
||||
response = categoryA.name
|
||||
response = categoryA!.name
|
||||
.toLowerCase()
|
||||
.compareTo(categoryB.name.toLowerCase());
|
||||
.compareTo(categoryB!.name.toLowerCase());
|
||||
break;
|
||||
default:
|
||||
print(
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ class _$ExpenseCategoryListResponseSerializer
|
|||
final String wireName = 'ExpenseCategoryListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ExpenseCategoryListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -41,21 +41,21 @@ class _$ExpenseCategoryListResponseSerializer
|
|||
|
||||
@override
|
||||
ExpenseCategoryListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ExpenseCategoryListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(ExpenseCategoryEntity)]))
|
||||
as BuiltList<Object>);
|
||||
specifiedType: const FullType(BuiltList, const [
|
||||
const FullType(ExpenseCategoryEntity)
|
||||
]))! as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,10 +75,10 @@ class _$ExpenseCategoryItemResponseSerializer
|
|||
final String wireName = 'ExpenseCategoryItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ExpenseCategoryItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(ExpenseCategoryEntity)),
|
||||
|
|
@ -89,19 +89,19 @@ class _$ExpenseCategoryItemResponseSerializer
|
|||
|
||||
@override
|
||||
ExpenseCategoryItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ExpenseCategoryItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(ExpenseCategoryEntity))
|
||||
specifiedType: const FullType(ExpenseCategoryEntity))!
|
||||
as ExpenseCategoryEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -122,10 +122,10 @@ class _$ExpenseCategoryEntitySerializer
|
|||
final String wireName = 'ExpenseCategoryEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ExpenseCategoryEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'color',
|
||||
|
|
@ -143,7 +143,7 @@ class _$ExpenseCategoryEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -177,55 +177,55 @@ class _$ExpenseCategoryEntitySerializer
|
|||
|
||||
@override
|
||||
ExpenseCategoryEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ExpenseCategoryEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'color':
|
||||
result.color = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -239,10 +239,10 @@ class _$ExpenseCategoryListResponse extends ExpenseCategoryListResponse {
|
|||
final BuiltList<ExpenseCategoryEntity> data;
|
||||
|
||||
factory _$ExpenseCategoryListResponse(
|
||||
[void Function(ExpenseCategoryListResponseBuilder) updates]) =>
|
||||
[void Function(ExpenseCategoryListResponseBuilder)? updates]) =>
|
||||
(new ExpenseCategoryListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ExpenseCategoryListResponse._({this.data}) : super._() {
|
||||
_$ExpenseCategoryListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'ExpenseCategoryListResponse', 'data');
|
||||
}
|
||||
|
|
@ -262,10 +262,10 @@ class _$ExpenseCategoryListResponse extends ExpenseCategoryListResponse {
|
|||
return other is ExpenseCategoryListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -284,12 +284,12 @@ class ExpenseCategoryListResponseBuilder
|
|||
implements
|
||||
Builder<ExpenseCategoryListResponse,
|
||||
ExpenseCategoryListResponseBuilder> {
|
||||
_$ExpenseCategoryListResponse _$v;
|
||||
_$ExpenseCategoryListResponse? _$v;
|
||||
|
||||
ListBuilder<ExpenseCategoryEntity> _data;
|
||||
ListBuilder<ExpenseCategoryEntity>? _data;
|
||||
ListBuilder<ExpenseCategoryEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<ExpenseCategoryEntity>();
|
||||
set data(ListBuilder<ExpenseCategoryEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<ExpenseCategoryEntity>? data) => _$this._data = data;
|
||||
|
||||
ExpenseCategoryListResponseBuilder();
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ class ExpenseCategoryListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ExpenseCategoryListResponseBuilder) updates) {
|
||||
void update(void Function(ExpenseCategoryListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -321,7 +321,7 @@ class ExpenseCategoryListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ExpenseCategoryListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -341,10 +341,10 @@ class _$ExpenseCategoryItemResponse extends ExpenseCategoryItemResponse {
|
|||
final ExpenseCategoryEntity data;
|
||||
|
||||
factory _$ExpenseCategoryItemResponse(
|
||||
[void Function(ExpenseCategoryItemResponseBuilder) updates]) =>
|
||||
[void Function(ExpenseCategoryItemResponseBuilder)? updates]) =>
|
||||
(new ExpenseCategoryItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ExpenseCategoryItemResponse._({this.data}) : super._() {
|
||||
_$ExpenseCategoryItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'ExpenseCategoryItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -364,10 +364,10 @@ class _$ExpenseCategoryItemResponse extends ExpenseCategoryItemResponse {
|
|||
return other is ExpenseCategoryItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -386,12 +386,12 @@ class ExpenseCategoryItemResponseBuilder
|
|||
implements
|
||||
Builder<ExpenseCategoryItemResponse,
|
||||
ExpenseCategoryItemResponseBuilder> {
|
||||
_$ExpenseCategoryItemResponse _$v;
|
||||
_$ExpenseCategoryItemResponse? _$v;
|
||||
|
||||
ExpenseCategoryEntityBuilder _data;
|
||||
ExpenseCategoryEntityBuilder? _data;
|
||||
ExpenseCategoryEntityBuilder get data =>
|
||||
_$this._data ??= new ExpenseCategoryEntityBuilder();
|
||||
set data(ExpenseCategoryEntityBuilder data) => _$this._data = data;
|
||||
set data(ExpenseCategoryEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
ExpenseCategoryItemResponseBuilder();
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ class ExpenseCategoryItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ExpenseCategoryItemResponseBuilder) updates) {
|
||||
void update(void Function(ExpenseCategoryItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ class ExpenseCategoryItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ExpenseCategoryItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -444,7 +444,7 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
|
|||
@override
|
||||
final String color;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -452,29 +452,29 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$ExpenseCategoryEntity(
|
||||
[void Function(ExpenseCategoryEntityBuilder) updates]) =>
|
||||
[void Function(ExpenseCategoryEntityBuilder)? updates]) =>
|
||||
(new ExpenseCategoryEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$ExpenseCategoryEntity._(
|
||||
{this.name,
|
||||
this.color,
|
||||
{required this.name,
|
||||
required this.color,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
name, r'ExpenseCategoryEntity', 'name');
|
||||
|
|
@ -514,10 +514,10 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, color.hashCode);
|
||||
|
|
@ -552,49 +552,49 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
|
|||
|
||||
class ExpenseCategoryEntityBuilder
|
||||
implements Builder<ExpenseCategoryEntity, ExpenseCategoryEntityBuilder> {
|
||||
_$ExpenseCategoryEntity _$v;
|
||||
_$ExpenseCategoryEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _color;
|
||||
String get color => _$this._color;
|
||||
set color(String color) => _$this._color = color;
|
||||
String? _color;
|
||||
String? get color => _$this._color;
|
||||
set color(String? color) => _$this._color = color;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
ExpenseCategoryEntityBuilder() {
|
||||
ExpenseCategoryEntity._initializeBuilder(this);
|
||||
|
|
@ -625,7 +625,7 @@ class ExpenseCategoryEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ExpenseCategoryEntityBuilder) updates) {
|
||||
void update(void Function(ExpenseCategoryEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,13 +101,13 @@ abstract class ExpenseEntity extends Object
|
|||
with BaseEntity, SelectableEntity, BelongsToClient
|
||||
implements Built<ExpenseEntity, ExpenseEntityBuilder> {
|
||||
factory ExpenseEntity({
|
||||
String id,
|
||||
AppState state,
|
||||
VendorEntity vendor,
|
||||
ClientEntity client,
|
||||
UserEntity user,
|
||||
ProjectEntity project,
|
||||
EntityType entityType,
|
||||
String? id,
|
||||
AppState? state,
|
||||
VendorEntity? vendor,
|
||||
ClientEntity? client,
|
||||
UserEntity? user,
|
||||
ProjectEntity? project,
|
||||
EntityType? entityType,
|
||||
}) {
|
||||
final company = state?.company;
|
||||
return _$ExpenseEntity._(
|
||||
|
|
@ -134,7 +134,7 @@ abstract class ExpenseEntity extends Object
|
|||
? vendor.currencyId
|
||||
: (state?.company?.currencyId ?? kDefaultCurrencyId),
|
||||
invoiceCurrencyId: (client != null && client.hasCurrency)
|
||||
? client.settings.currencyId // TODO handle group currency
|
||||
? client.settings.currencyId! // TODO handle group currency
|
||||
: (state?.company?.currencyId ?? kDefaultCurrencyId),
|
||||
documents: BuiltList<DocumentEntity>(),
|
||||
taxName1: '',
|
||||
|
|
@ -219,9 +219,9 @@ abstract class ExpenseEntity extends Object
|
|||
|
||||
double get amount;
|
||||
|
||||
@nullable // TODO remove this
|
||||
// TODO remove this
|
||||
@BuiltValueField(wireName: 'date')
|
||||
String get date;
|
||||
String? get date;
|
||||
|
||||
@BuiltValueField(wireName: 'payment_date')
|
||||
String get paymentDate;
|
||||
|
|
@ -253,26 +253,21 @@ abstract class ExpenseEntity extends Object
|
|||
@BuiltValueField(wireName: 'tax_rate3')
|
||||
double get taxRate3;
|
||||
|
||||
@nullable
|
||||
@override
|
||||
@BuiltValueField(wireName: 'client_id')
|
||||
String get clientId;
|
||||
String? get clientId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'invoice_id')
|
||||
String get invoiceId;
|
||||
String? get invoiceId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'vendor_id')
|
||||
String get vendorId;
|
||||
String? get vendorId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'project_id')
|
||||
String get projectId;
|
||||
String? get projectId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'status_id')
|
||||
String get statusId;
|
||||
String? get statusId;
|
||||
|
||||
@BuiltValueField(wireName: 'custom_value1')
|
||||
String get customValue1;
|
||||
|
|
@ -298,17 +293,16 @@ abstract class ExpenseEntity extends Object
|
|||
@BuiltValueField(wireName: 'uses_inclusive_taxes')
|
||||
bool get usesInclusiveTaxes;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'calculate_tax_by_amount')
|
||||
bool get calculateTaxByAmount;
|
||||
bool? get calculateTaxByAmount;
|
||||
|
||||
BuiltList<DocumentEntity> get documents;
|
||||
|
||||
String get number;
|
||||
|
||||
@nullable // TODO remove this
|
||||
// TODO remove this
|
||||
@BuiltValueField(wireName: 'recurring_expense_id')
|
||||
String get recurringExpenseId;
|
||||
String? get recurringExpenseId;
|
||||
|
||||
@BuiltValueField(wireName: 'frequency_id')
|
||||
String get frequencyId;
|
||||
|
|
@ -322,23 +316,22 @@ abstract class ExpenseEntity extends Object
|
|||
@BuiltValueField(wireName: 'remaining_cycles')
|
||||
int get remainingCycles;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'recurring_dates')
|
||||
BuiltList<ExpenseScheduleEntity> get recurringDates;
|
||||
BuiltList<ExpenseScheduleEntity>? get recurringDates;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (!isDeleted!) {
|
||||
if (includeEdit &&
|
||||
!multiselect &&
|
||||
userCompany.canEditEntity(this) &&
|
||||
userCompany!.canEditEntity(this) &&
|
||||
!multiselect) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
|
@ -354,7 +347,7 @@ abstract class ExpenseEntity extends Object
|
|||
if (!isInvoiced &&
|
||||
!isRecurring &&
|
||||
shouldBeInvoiced &&
|
||||
userCompany.canCreate(EntityType.invoice)) {
|
||||
userCompany!.canCreate(EntityType.invoice)) {
|
||||
actions.add(EntityAction.invoiceExpense);
|
||||
if ((clientId ?? '').isNotEmpty) {
|
||||
actions.add(EntityAction.addToInvoice);
|
||||
|
|
@ -363,7 +356,7 @@ abstract class ExpenseEntity extends Object
|
|||
}
|
||||
|
||||
if (!multiselect && isOld) {
|
||||
if (userCompany.canCreate(EntityType.expense) && !isRecurring) {
|
||||
if (userCompany!.canCreate(EntityType.expense) && !isRecurring) {
|
||||
actions.add(EntityAction.cloneToExpense);
|
||||
}
|
||||
|
||||
|
|
@ -376,7 +369,7 @@ abstract class ExpenseEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (!isDeleted && multiselect) {
|
||||
if (!isDeleted! && multiselect) {
|
||||
actions.add(EntityAction.documents);
|
||||
}
|
||||
|
||||
|
|
@ -390,112 +383,112 @@ abstract class ExpenseEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo(
|
||||
ExpenseEntity expense,
|
||||
ExpenseEntity? expense,
|
||||
String sortField,
|
||||
bool sortAscending,
|
||||
BuiltMap<String, ClientEntity> clientMap,
|
||||
BuiltMap<String, UserEntity> userMap,
|
||||
BuiltMap<String, VendorEntity> vendorMap,
|
||||
BuiltMap<String, InvoiceEntity> invoiceMap,
|
||||
BuiltMap<String, ExpenseCategoryEntity> expenseCategoryMap,
|
||||
BuiltMap<String?, ClientEntity?> clientMap,
|
||||
BuiltMap<String?, UserEntity?> userMap,
|
||||
BuiltMap<String?, VendorEntity?> vendorMap,
|
||||
BuiltMap<String?, InvoiceEntity?> invoiceMap,
|
||||
BuiltMap<String?, ExpenseCategoryEntity?> expenseCategoryMap,
|
||||
StaticState staticState) {
|
||||
int response = 0;
|
||||
final ExpenseEntity expenseA = sortAscending ? this : expense;
|
||||
final ExpenseEntity expenseB = sortAscending ? expense : this;
|
||||
final ExpenseEntity? expenseA = sortAscending ? this : expense;
|
||||
final ExpenseEntity? expenseB = sortAscending ? expense : this;
|
||||
|
||||
switch (sortField) {
|
||||
case ExpenseFields.netAmount:
|
||||
response = expenseA.netAmount.compareTo(expenseB.netAmount);
|
||||
response = expenseA!.netAmount.compareTo(expenseB!.netAmount);
|
||||
break;
|
||||
case ExpenseFields.amount:
|
||||
response = expenseA.amount.compareTo(expenseB.amount);
|
||||
response = expenseA!.amount.compareTo(expenseB!.amount);
|
||||
break;
|
||||
case EntityFields.assignedTo:
|
||||
final userA = userMap[expenseA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[expenseB.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap[expenseA!.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[expenseB!.assignedUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdBy:
|
||||
final userA = userMap[expenseA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[expenseB.createdUserId] ?? UserEntity();
|
||||
final userA = userMap[expenseA!.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[expenseB!.createdUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.clientId:
|
||||
case ExpenseFields.client:
|
||||
final clientA = clientMap[expenseA.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[expenseB.clientId] ?? ClientEntity();
|
||||
final clientA = clientMap[expenseA!.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[expenseB!.clientId] ?? ClientEntity();
|
||||
response = removeDiacritics(clientA.listDisplayName)
|
||||
.toLowerCase()
|
||||
.compareTo(removeDiacritics(clientB.listDisplayName).toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.vendorId:
|
||||
case ExpenseFields.vendor:
|
||||
final vendorA = vendorMap[expenseA.vendorId] ?? VendorEntity();
|
||||
final vendorB = vendorMap[expenseB.vendorId] ?? VendorEntity();
|
||||
final vendorA = vendorMap[expenseA!.vendorId] ?? VendorEntity();
|
||||
final vendorB = vendorMap[expenseB!.vendorId] ?? VendorEntity();
|
||||
response = removeDiacritics(vendorA.listDisplayName)
|
||||
.toLowerCase()
|
||||
.compareTo(removeDiacritics(vendorB.listDisplayName).toLowerCase());
|
||||
break;
|
||||
case EntityFields.state:
|
||||
final stateA =
|
||||
EntityState.valueOf(expenseA.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(expenseA!.entityState) ?? EntityState.active;
|
||||
final stateB =
|
||||
EntityState.valueOf(expenseB.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(expenseB!.entityState) ?? EntityState.active;
|
||||
response =
|
||||
stateA.name.toLowerCase().compareTo(stateB.name.toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.publicNotes:
|
||||
response = expenseA.publicNotes
|
||||
response = expenseA!.publicNotes
|
||||
.toLowerCase()
|
||||
.compareTo(expenseB.publicNotes.toLowerCase());
|
||||
.compareTo(expenseB!.publicNotes.toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.expenseDate:
|
||||
response =
|
||||
expenseA.date.toLowerCase().compareTo(expenseB.date.toLowerCase());
|
||||
expenseA!.date!.toLowerCase().compareTo(expenseB!.date!.toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.paymentDate:
|
||||
response = expenseA.paymentDate
|
||||
response = expenseA!.paymentDate
|
||||
.toLowerCase()
|
||||
.compareTo(expenseB.paymentDate.toLowerCase());
|
||||
.compareTo(expenseB!.paymentDate.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdAt:
|
||||
response = expenseA.createdAt.compareTo(expenseB.createdAt);
|
||||
response = expenseA!.createdAt.compareTo(expenseB!.createdAt);
|
||||
break;
|
||||
case ExpenseFields.updatedAt:
|
||||
response = expenseA.updatedAt.compareTo(expenseB.updatedAt);
|
||||
response = expenseA!.updatedAt.compareTo(expenseB!.updatedAt);
|
||||
break;
|
||||
case ExpenseFields.archivedAt:
|
||||
response = expenseA.archivedAt.compareTo(expenseB.archivedAt);
|
||||
response = expenseA!.archivedAt.compareTo(expenseB!.archivedAt);
|
||||
break;
|
||||
case ExpenseFields.documents:
|
||||
response =
|
||||
expenseA.documents.length.compareTo(expenseB.documents.length);
|
||||
expenseA!.documents.length.compareTo(expenseB!.documents.length);
|
||||
break;
|
||||
case ExpenseFields.number:
|
||||
response = compareNatural(
|
||||
expenseA.number.toLowerCase(), expenseB.number.toLowerCase());
|
||||
expenseA!.number.toLowerCase(), expenseB!.number.toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.privateNotes:
|
||||
response = expenseA.privateNotes.compareTo(expenseB.privateNotes);
|
||||
response = expenseA!.privateNotes.compareTo(expenseB!.privateNotes);
|
||||
break;
|
||||
case ExpenseFields.transactionId:
|
||||
response = expenseA.transactionId.compareTo(expenseB.transactionId);
|
||||
response = expenseA!.transactionId.compareTo(expenseB!.transactionId);
|
||||
break;
|
||||
case ExpenseFields.transactionReference:
|
||||
response = expenseA.transactionReference
|
||||
.compareTo(expenseB.transactionReference);
|
||||
response = expenseA!.transactionReference
|
||||
.compareTo(expenseB!.transactionReference);
|
||||
break;
|
||||
case ExpenseFields.bankId:
|
||||
response = expenseA.bankId.compareTo(expenseB.bankId);
|
||||
response = expenseA!.bankId.compareTo(expenseB!.bankId);
|
||||
break;
|
||||
case ExpenseFields.currencyId:
|
||||
final currencyMap = staticState.currencyMap;
|
||||
final currencyA = currencyMap[expenseA.currencyId] ?? CurrencyEntity();
|
||||
final currencyB = currencyMap[expenseB.currencyId] ?? CurrencyEntity();
|
||||
final currencyA = currencyMap[expenseA!.currencyId] ?? CurrencyEntity();
|
||||
final currencyB = currencyMap[expenseB!.currencyId] ?? CurrencyEntity();
|
||||
response = currencyA.name
|
||||
.toLowerCase()
|
||||
.compareTo(currencyB.name.toLowerCase());
|
||||
|
|
@ -503,67 +496,67 @@ abstract class ExpenseEntity extends Object
|
|||
case ExpenseFields.categoryId:
|
||||
case ExpenseFields.category:
|
||||
final categoryA =
|
||||
expenseCategoryMap[expenseA.categoryId] ?? ExpenseCategoryEntity();
|
||||
expenseCategoryMap[expenseA!.categoryId] ?? ExpenseCategoryEntity();
|
||||
final categoryB =
|
||||
expenseCategoryMap[expenseB.categoryId] ?? ExpenseCategoryEntity();
|
||||
expenseCategoryMap[expenseB!.categoryId] ?? ExpenseCategoryEntity();
|
||||
response = categoryA.name
|
||||
.toLowerCase()
|
||||
.compareTo(categoryB.name.toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.exchangeRate:
|
||||
response = expenseA.exchangeRate.compareTo(expenseB.exchangeRate);
|
||||
response = expenseA!.exchangeRate.compareTo(expenseB!.exchangeRate);
|
||||
break;
|
||||
case ExpenseFields.invoiceCurrencyId:
|
||||
final currencyMap = staticState.currencyMap;
|
||||
final currencyA =
|
||||
currencyMap[expenseA.invoiceCurrencyId] ?? CurrencyEntity();
|
||||
currencyMap[expenseA!.invoiceCurrencyId] ?? CurrencyEntity();
|
||||
final currencyB =
|
||||
currencyMap[expenseB.invoiceCurrencyId] ?? CurrencyEntity();
|
||||
currencyMap[expenseB!.invoiceCurrencyId] ?? CurrencyEntity();
|
||||
response = currencyA.name
|
||||
.toLowerCase()
|
||||
.compareTo(currencyB.name.toLowerCase());
|
||||
break;
|
||||
case ExpenseFields.taxName1:
|
||||
response = expenseA.taxName1.compareTo(expenseB.taxName1);
|
||||
response = expenseA!.taxName1.compareTo(expenseB!.taxName1);
|
||||
break;
|
||||
case ExpenseFields.taxName2:
|
||||
response = expenseA.taxName2.compareTo(expenseB.taxName2);
|
||||
response = expenseA!.taxName2.compareTo(expenseB!.taxName2);
|
||||
break;
|
||||
case ExpenseFields.taxRate1:
|
||||
response = expenseA.taxRate1.compareTo(expenseB.taxRate1);
|
||||
response = expenseA!.taxRate1.compareTo(expenseB!.taxRate1);
|
||||
break;
|
||||
case ExpenseFields.taxRate2:
|
||||
response = expenseA.taxRate2.compareTo(expenseB.taxRate2);
|
||||
response = expenseA!.taxRate2.compareTo(expenseB!.taxRate2);
|
||||
break;
|
||||
case ExpenseFields.invoiceId:
|
||||
final invoiceA = invoiceMap[expenseA.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceB = invoiceMap[expenseB.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceA = invoiceMap[expenseA!.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceB = invoiceMap[expenseB!.invoiceId] ?? InvoiceEntity();
|
||||
response = invoiceA.listDisplayName.compareTo(invoiceB.listDisplayName);
|
||||
break;
|
||||
case ExpenseFields.customValue1:
|
||||
response = expenseA.customValue1.compareTo(expenseB.customValue1);
|
||||
response = expenseA!.customValue1.compareTo(expenseB!.customValue1);
|
||||
break;
|
||||
case ExpenseFields.customValue2:
|
||||
response = expenseA.customValue2.compareTo(expenseB.customValue2);
|
||||
response = expenseA!.customValue2.compareTo(expenseB!.customValue2);
|
||||
break;
|
||||
case ExpenseFields.customValue3:
|
||||
response = expenseA.customValue3.compareTo(expenseB.customValue3);
|
||||
response = expenseA!.customValue3.compareTo(expenseB!.customValue3);
|
||||
break;
|
||||
case ExpenseFields.customValue4:
|
||||
response = expenseA.customValue4.compareTo(expenseB.customValue4);
|
||||
response = expenseA!.customValue4.compareTo(expenseB!.customValue4);
|
||||
break;
|
||||
case RecurringExpenseFields.frequency:
|
||||
response = expenseA.frequencyId.compareTo(expenseB.frequencyId);
|
||||
response = expenseA!.frequencyId.compareTo(expenseB!.frequencyId);
|
||||
break;
|
||||
case RecurringExpenseFields.nextSendDate:
|
||||
response = expenseA.nextSendDate.compareTo(expenseB.nextSendDate);
|
||||
response = expenseA!.nextSendDate.compareTo(expenseB!.nextSendDate);
|
||||
break;
|
||||
case RecurringExpenseFields.lastSentDate:
|
||||
response = expenseA.lastSentDate.compareTo(expenseB.lastSentDate);
|
||||
response = expenseA!.lastSentDate.compareTo(expenseB!.lastSentDate);
|
||||
break;
|
||||
case ExpenseFields.status:
|
||||
response =
|
||||
expenseA.calculatedStatusId.compareTo(expenseB.calculatedStatusId);
|
||||
expenseA!.calculatedStatusId!.compareTo(expenseB!.calculatedStatusId!);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by expense.$sortField is not implemented');
|
||||
|
|
@ -571,14 +564,14 @@ abstract class ExpenseEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = expense.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
response = expense!.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
number,
|
||||
|
|
@ -600,7 +593,7 @@ abstract class ExpenseEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
number,
|
||||
|
|
@ -661,28 +654,27 @@ abstract class ExpenseEntity extends Object
|
|||
@override
|
||||
String get listDisplayName => number ?? '';
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(compare: false)
|
||||
int get loadedAt;
|
||||
int? get loadedAt;
|
||||
|
||||
bool get isPaid =>
|
||||
paymentDate.isNotEmpty ||
|
||||
paymentTypeId.isNotEmpty ||
|
||||
transactionReference.isNotEmpty;
|
||||
|
||||
bool isBetween(String startDate, String endDate) {
|
||||
bool isBetween(String? startDate, String? endDate) {
|
||||
return (startDate ?? '').compareTo(date ?? '') <= 0 &&
|
||||
(endDate ?? '').compareTo(date ?? '') >= 0;
|
||||
}
|
||||
|
||||
bool get isLoaded => loadedAt != null && loadedAt > 0;
|
||||
bool get isLoaded => loadedAt != null && loadedAt! > 0;
|
||||
|
||||
bool get isStale {
|
||||
if (!isLoaded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt >
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt! >
|
||||
kMillisecondsToRefreshActivities;
|
||||
}
|
||||
|
||||
|
|
@ -705,7 +697,7 @@ abstract class ExpenseEntity extends Object
|
|||
.contains(calculatedStatusId);
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
@ -807,7 +799,7 @@ abstract class ExpenseEntity extends Object
|
|||
|
||||
double get grossAmount => usesInclusiveTaxes ? amount : amount + taxAmount;
|
||||
|
||||
String get calculatedStatusId {
|
||||
String? get calculatedStatusId {
|
||||
if (isRecurring) {
|
||||
if (remainingCycles == 0) {
|
||||
return kRecurringInvoiceStatusCompleted;
|
||||
|
|
@ -838,7 +830,7 @@ abstract class ExpenseEntity extends Object
|
|||
double get convertedAmountWithTax =>
|
||||
round(grossAmount * convertedExchangeRate, 2);
|
||||
|
||||
bool get isInvoiced => invoiceId != null && invoiceId.isNotEmpty;
|
||||
bool get isInvoiced => invoiceId != null && invoiceId!.isNotEmpty;
|
||||
|
||||
bool get isPending {
|
||||
if (isRecurring) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -57,7 +57,7 @@ class GatewayTokenFields {
|
|||
abstract class GatewayTokenEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<GatewayTokenEntity, GatewayTokenEntityBuilder> {
|
||||
factory GatewayTokenEntity({String id}) {
|
||||
factory GatewayTokenEntity({String? id}) {
|
||||
return _$GatewayTokenEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -132,7 +132,7 @@ abstract class GatewayTokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [customerReference],
|
||||
needle: filter,
|
||||
|
|
@ -140,7 +140,7 @@ abstract class GatewayTokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [customerReference],
|
||||
needle: filter,
|
||||
|
|
@ -148,16 +148,16 @@ abstract class GatewayTokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
|
@ -170,10 +170,10 @@ abstract class GatewayTokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
static Serializer<GatewayTokenEntity> get serializer =>
|
||||
_$gatewayTokenEntitySerializer;
|
||||
|
|
@ -191,22 +191,17 @@ abstract class GatewayTokenMetaEntity
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
@nullable
|
||||
String get brand;
|
||||
String? get brand;
|
||||
|
||||
@nullable
|
||||
String get last4;
|
||||
String? get last4;
|
||||
|
||||
@nullable
|
||||
int get type;
|
||||
int? get type;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'exp_month')
|
||||
String get expMonth;
|
||||
String? get expMonth;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'exp_year')
|
||||
String get expYear;
|
||||
String? get expYear;
|
||||
|
||||
static Serializer<GatewayTokenMetaEntity> get serializer =>
|
||||
_$gatewayTokenMetaEntitySerializer;
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ class _$GatewayTokenListResponseSerializer
|
|||
final String wireName = 'GatewayTokenListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, GatewayTokenListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -41,21 +41,21 @@ class _$GatewayTokenListResponseSerializer
|
|||
|
||||
@override
|
||||
GatewayTokenListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new GatewayTokenListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(GatewayTokenEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(GatewayTokenEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,10 +75,10 @@ class _$GatewayTokenItemResponseSerializer
|
|||
final String wireName = 'GatewayTokenItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, GatewayTokenItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(GatewayTokenEntity)),
|
||||
|
|
@ -89,19 +89,19 @@ class _$GatewayTokenItemResponseSerializer
|
|||
|
||||
@override
|
||||
GatewayTokenItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new GatewayTokenItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(GatewayTokenEntity))
|
||||
specifiedType: const FullType(GatewayTokenEntity))!
|
||||
as GatewayTokenEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -119,9 +119,10 @@ class _$GatewayTokenEntitySerializer
|
|||
final String wireName = 'GatewayTokenEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, GatewayTokenEntity object,
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, GatewayTokenEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'token',
|
||||
serializers.serialize(object.token,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -152,7 +153,7 @@ class _$GatewayTokenEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -186,72 +187,72 @@ class _$GatewayTokenEntitySerializer
|
|||
|
||||
@override
|
||||
GatewayTokenEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new GatewayTokenEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'token':
|
||||
result.token = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'gateway_customer_reference':
|
||||
result.customerReference = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'company_gateway_id':
|
||||
result.companyGatewayId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'gateway_type_id':
|
||||
result.gatewayTypeId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'is_default':
|
||||
result.isDefault = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'meta':
|
||||
result.meta.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(GatewayTokenMetaEntity))
|
||||
specifiedType: const FullType(GatewayTokenMetaEntity))!
|
||||
as GatewayTokenMetaEntity);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -271,11 +272,11 @@ class _$GatewayTokenMetaEntitySerializer
|
|||
final String wireName = 'GatewayTokenMetaEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, GatewayTokenMetaEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[];
|
||||
Object value;
|
||||
final result = <Object?>[];
|
||||
Object? value;
|
||||
value = object.brand;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -315,35 +316,35 @@ class _$GatewayTokenMetaEntitySerializer
|
|||
|
||||
@override
|
||||
GatewayTokenMetaEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new GatewayTokenMetaEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'brand':
|
||||
result.brand = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'last4':
|
||||
result.last4 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'type':
|
||||
result.type = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
case 'exp_month':
|
||||
result.expMonth = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'exp_year':
|
||||
result.expYear = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -357,10 +358,10 @@ class _$GatewayTokenListResponse extends GatewayTokenListResponse {
|
|||
final BuiltList<GatewayTokenEntity> data;
|
||||
|
||||
factory _$GatewayTokenListResponse(
|
||||
[void Function(GatewayTokenListResponseBuilder) updates]) =>
|
||||
[void Function(GatewayTokenListResponseBuilder)? updates]) =>
|
||||
(new GatewayTokenListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$GatewayTokenListResponse._({this.data}) : super._() {
|
||||
_$GatewayTokenListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'GatewayTokenListResponse', 'data');
|
||||
}
|
||||
|
|
@ -380,10 +381,10 @@ class _$GatewayTokenListResponse extends GatewayTokenListResponse {
|
|||
return other is GatewayTokenListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -401,12 +402,12 @@ class _$GatewayTokenListResponse extends GatewayTokenListResponse {
|
|||
class GatewayTokenListResponseBuilder
|
||||
implements
|
||||
Builder<GatewayTokenListResponse, GatewayTokenListResponseBuilder> {
|
||||
_$GatewayTokenListResponse _$v;
|
||||
_$GatewayTokenListResponse? _$v;
|
||||
|
||||
ListBuilder<GatewayTokenEntity> _data;
|
||||
ListBuilder<GatewayTokenEntity>? _data;
|
||||
ListBuilder<GatewayTokenEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<GatewayTokenEntity>();
|
||||
set data(ListBuilder<GatewayTokenEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<GatewayTokenEntity>? data) => _$this._data = data;
|
||||
|
||||
GatewayTokenListResponseBuilder();
|
||||
|
||||
|
|
@ -426,7 +427,7 @@ class GatewayTokenListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(GatewayTokenListResponseBuilder) updates) {
|
||||
void update(void Function(GatewayTokenListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -438,7 +439,7 @@ class GatewayTokenListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$GatewayTokenListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -458,10 +459,10 @@ class _$GatewayTokenItemResponse extends GatewayTokenItemResponse {
|
|||
final GatewayTokenEntity data;
|
||||
|
||||
factory _$GatewayTokenItemResponse(
|
||||
[void Function(GatewayTokenItemResponseBuilder) updates]) =>
|
||||
[void Function(GatewayTokenItemResponseBuilder)? updates]) =>
|
||||
(new GatewayTokenItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$GatewayTokenItemResponse._({this.data}) : super._() {
|
||||
_$GatewayTokenItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'GatewayTokenItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -481,10 +482,10 @@ class _$GatewayTokenItemResponse extends GatewayTokenItemResponse {
|
|||
return other is GatewayTokenItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -502,12 +503,12 @@ class _$GatewayTokenItemResponse extends GatewayTokenItemResponse {
|
|||
class GatewayTokenItemResponseBuilder
|
||||
implements
|
||||
Builder<GatewayTokenItemResponse, GatewayTokenItemResponseBuilder> {
|
||||
_$GatewayTokenItemResponse _$v;
|
||||
_$GatewayTokenItemResponse? _$v;
|
||||
|
||||
GatewayTokenEntityBuilder _data;
|
||||
GatewayTokenEntityBuilder? _data;
|
||||
GatewayTokenEntityBuilder get data =>
|
||||
_$this._data ??= new GatewayTokenEntityBuilder();
|
||||
set data(GatewayTokenEntityBuilder data) => _$this._data = data;
|
||||
set data(GatewayTokenEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
GatewayTokenItemResponseBuilder();
|
||||
|
||||
|
|
@ -527,7 +528,7 @@ class GatewayTokenItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(GatewayTokenItemResponseBuilder) updates) {
|
||||
void update(void Function(GatewayTokenItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -539,7 +540,7 @@ class GatewayTokenItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$GatewayTokenItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -568,7 +569,7 @@ class _$GatewayTokenEntity extends GatewayTokenEntity {
|
|||
@override
|
||||
final GatewayTokenMetaEntity meta;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -576,33 +577,33 @@ class _$GatewayTokenEntity extends GatewayTokenEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$GatewayTokenEntity(
|
||||
[void Function(GatewayTokenEntityBuilder) updates]) =>
|
||||
[void Function(GatewayTokenEntityBuilder)? updates]) =>
|
||||
(new GatewayTokenEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$GatewayTokenEntity._(
|
||||
{this.token,
|
||||
this.customerReference,
|
||||
this.companyGatewayId,
|
||||
this.gatewayTypeId,
|
||||
this.isDefault,
|
||||
this.meta,
|
||||
{required this.token,
|
||||
required this.customerReference,
|
||||
required this.companyGatewayId,
|
||||
required this.gatewayTypeId,
|
||||
required this.isDefault,
|
||||
required this.meta,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
token, r'GatewayTokenEntity', 'token');
|
||||
|
|
@ -653,10 +654,10 @@ class _$GatewayTokenEntity extends GatewayTokenEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, token.hashCode);
|
||||
_$hash = $jc(_$hash, customerReference.hashCode);
|
||||
|
|
@ -699,69 +700,69 @@ class _$GatewayTokenEntity extends GatewayTokenEntity {
|
|||
|
||||
class GatewayTokenEntityBuilder
|
||||
implements Builder<GatewayTokenEntity, GatewayTokenEntityBuilder> {
|
||||
_$GatewayTokenEntity _$v;
|
||||
_$GatewayTokenEntity? _$v;
|
||||
|
||||
String _token;
|
||||
String get token => _$this._token;
|
||||
set token(String token) => _$this._token = token;
|
||||
String? _token;
|
||||
String? get token => _$this._token;
|
||||
set token(String? token) => _$this._token = token;
|
||||
|
||||
String _customerReference;
|
||||
String get customerReference => _$this._customerReference;
|
||||
set customerReference(String customerReference) =>
|
||||
String? _customerReference;
|
||||
String? get customerReference => _$this._customerReference;
|
||||
set customerReference(String? customerReference) =>
|
||||
_$this._customerReference = customerReference;
|
||||
|
||||
String _companyGatewayId;
|
||||
String get companyGatewayId => _$this._companyGatewayId;
|
||||
set companyGatewayId(String companyGatewayId) =>
|
||||
String? _companyGatewayId;
|
||||
String? get companyGatewayId => _$this._companyGatewayId;
|
||||
set companyGatewayId(String? companyGatewayId) =>
|
||||
_$this._companyGatewayId = companyGatewayId;
|
||||
|
||||
String _gatewayTypeId;
|
||||
String get gatewayTypeId => _$this._gatewayTypeId;
|
||||
set gatewayTypeId(String gatewayTypeId) =>
|
||||
String? _gatewayTypeId;
|
||||
String? get gatewayTypeId => _$this._gatewayTypeId;
|
||||
set gatewayTypeId(String? gatewayTypeId) =>
|
||||
_$this._gatewayTypeId = gatewayTypeId;
|
||||
|
||||
bool _isDefault;
|
||||
bool get isDefault => _$this._isDefault;
|
||||
set isDefault(bool isDefault) => _$this._isDefault = isDefault;
|
||||
bool? _isDefault;
|
||||
bool? get isDefault => _$this._isDefault;
|
||||
set isDefault(bool? isDefault) => _$this._isDefault = isDefault;
|
||||
|
||||
GatewayTokenMetaEntityBuilder _meta;
|
||||
GatewayTokenMetaEntityBuilder? _meta;
|
||||
GatewayTokenMetaEntityBuilder get meta =>
|
||||
_$this._meta ??= new GatewayTokenMetaEntityBuilder();
|
||||
set meta(GatewayTokenMetaEntityBuilder meta) => _$this._meta = meta;
|
||||
set meta(GatewayTokenMetaEntityBuilder? meta) => _$this._meta = meta;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
GatewayTokenEntityBuilder();
|
||||
|
||||
|
|
@ -794,7 +795,7 @@ class GatewayTokenEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(GatewayTokenEntityBuilder) updates) {
|
||||
void update(void Function(GatewayTokenEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -829,7 +830,7 @@ class GatewayTokenEntityBuilder
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'GatewayTokenEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'meta';
|
||||
meta.build();
|
||||
|
|
@ -846,18 +847,18 @@ class GatewayTokenEntityBuilder
|
|||
|
||||
class _$GatewayTokenMetaEntity extends GatewayTokenMetaEntity {
|
||||
@override
|
||||
final String brand;
|
||||
final String? brand;
|
||||
@override
|
||||
final String last4;
|
||||
final String? last4;
|
||||
@override
|
||||
final int type;
|
||||
final int? type;
|
||||
@override
|
||||
final String expMonth;
|
||||
final String? expMonth;
|
||||
@override
|
||||
final String expYear;
|
||||
final String? expYear;
|
||||
|
||||
factory _$GatewayTokenMetaEntity(
|
||||
[void Function(GatewayTokenMetaEntityBuilder) updates]) =>
|
||||
[void Function(GatewayTokenMetaEntityBuilder)? updates]) =>
|
||||
(new GatewayTokenMetaEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$GatewayTokenMetaEntity._(
|
||||
|
|
@ -884,10 +885,10 @@ class _$GatewayTokenMetaEntity extends GatewayTokenMetaEntity {
|
|||
expYear == other.expYear;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, brand.hashCode);
|
||||
_$hash = $jc(_$hash, last4.hashCode);
|
||||
|
|
@ -912,27 +913,27 @@ class _$GatewayTokenMetaEntity extends GatewayTokenMetaEntity {
|
|||
|
||||
class GatewayTokenMetaEntityBuilder
|
||||
implements Builder<GatewayTokenMetaEntity, GatewayTokenMetaEntityBuilder> {
|
||||
_$GatewayTokenMetaEntity _$v;
|
||||
_$GatewayTokenMetaEntity? _$v;
|
||||
|
||||
String _brand;
|
||||
String get brand => _$this._brand;
|
||||
set brand(String brand) => _$this._brand = brand;
|
||||
String? _brand;
|
||||
String? get brand => _$this._brand;
|
||||
set brand(String? brand) => _$this._brand = brand;
|
||||
|
||||
String _last4;
|
||||
String get last4 => _$this._last4;
|
||||
set last4(String last4) => _$this._last4 = last4;
|
||||
String? _last4;
|
||||
String? get last4 => _$this._last4;
|
||||
set last4(String? last4) => _$this._last4 = last4;
|
||||
|
||||
int _type;
|
||||
int get type => _$this._type;
|
||||
set type(int type) => _$this._type = type;
|
||||
int? _type;
|
||||
int? get type => _$this._type;
|
||||
set type(int? type) => _$this._type = type;
|
||||
|
||||
String _expMonth;
|
||||
String get expMonth => _$this._expMonth;
|
||||
set expMonth(String expMonth) => _$this._expMonth = expMonth;
|
||||
String? _expMonth;
|
||||
String? get expMonth => _$this._expMonth;
|
||||
set expMonth(String? expMonth) => _$this._expMonth = expMonth;
|
||||
|
||||
String _expYear;
|
||||
String get expYear => _$this._expYear;
|
||||
set expYear(String expYear) => _$this._expYear = expYear;
|
||||
String? _expYear;
|
||||
String? get expYear => _$this._expYear;
|
||||
set expYear(String? expYear) => _$this._expYear = expYear;
|
||||
|
||||
GatewayTokenMetaEntityBuilder();
|
||||
|
||||
|
|
@ -956,7 +957,7 @@ class GatewayTokenMetaEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(GatewayTokenMetaEntityBuilder) updates) {
|
||||
void update(void Function(GatewayTokenMetaEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class GroupFields {
|
|||
abstract class GroupEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<GroupEntity, GroupEntityBuilder> {
|
||||
factory GroupEntity({String id, AppState state}) {
|
||||
factory GroupEntity({String? id, AppState? state}) {
|
||||
return _$GroupEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -92,24 +92,24 @@ abstract class GroupEntity extends Object
|
|||
}
|
||||
|
||||
bool get hasCurrency =>
|
||||
settings.currencyId != null && settings.currencyId.isNotEmpty;
|
||||
settings.currencyId != null && settings.currencyId!.isNotEmpty;
|
||||
|
||||
String get currencyId => settings.currencyId;
|
||||
String? get currencyId => settings.currencyId;
|
||||
|
||||
bool get hasLanguage =>
|
||||
settings.languageId != null && settings.languageId.isNotEmpty;
|
||||
settings.languageId != null && settings.languageId!.isNotEmpty;
|
||||
|
||||
String get languageId => settings.languageId;
|
||||
String? get languageId => settings.languageId;
|
||||
|
||||
int compareTo(GroupEntity group, String sortField, bool sortAscending) {
|
||||
int compareTo(GroupEntity? group, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final GroupEntity groupA = sortAscending ? this : group;
|
||||
final GroupEntity groupB = sortAscending ? group : this;
|
||||
final GroupEntity? groupA = sortAscending ? this : group;
|
||||
final GroupEntity? groupB = sortAscending ? group : this;
|
||||
|
||||
switch (sortField) {
|
||||
case GroupFields.name:
|
||||
response =
|
||||
groupA.name.toLowerCase().compareTo(groupB.name.toLowerCase());
|
||||
groupA!.name.toLowerCase().compareTo(groupB!.name.toLowerCase());
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by group.$sortField is not implemented');
|
||||
|
|
@ -120,7 +120,7 @@ abstract class GroupEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -130,7 +130,7 @@ abstract class GroupEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [],
|
||||
needle: filter,
|
||||
|
|
@ -138,20 +138,20 @@ abstract class GroupEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
if (userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.settings);
|
||||
}
|
||||
|
||||
|
|
@ -168,10 +168,10 @@ abstract class GroupEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
// ignore: unused_element
|
||||
static void _initializeBuilder(GroupEntityBuilder builder) =>
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ class _$GroupListResponseSerializer
|
|||
final String wireName = 'GroupListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, GroupListResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, GroupListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -34,21 +34,21 @@ class _$GroupListResponseSerializer
|
|||
|
||||
@override
|
||||
GroupListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new GroupListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(GroupEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(GroupEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -65,9 +65,9 @@ class _$GroupItemResponseSerializer
|
|||
final String wireName = 'GroupItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, GroupItemResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, GroupItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(GroupEntity)),
|
||||
|
|
@ -78,19 +78,19 @@ class _$GroupItemResponseSerializer
|
|||
|
||||
@override
|
||||
GroupItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new GroupItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(GroupEntity)) as GroupEntity);
|
||||
specifiedType: const FullType(GroupEntity))! as GroupEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -106,9 +106,9 @@ class _$GroupEntitySerializer implements StructuredSerializer<GroupEntity> {
|
|||
final String wireName = 'GroupEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, GroupEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, GroupEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'settings',
|
||||
|
|
@ -130,7 +130,7 @@ class _$GroupEntitySerializer implements StructuredSerializer<GroupEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -163,61 +163,62 @@ class _$GroupEntitySerializer implements StructuredSerializer<GroupEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
GroupEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
GroupEntity deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new GroupEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'settings':
|
||||
result.settings.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(SettingsEntity)) as SettingsEntity);
|
||||
specifiedType: const FullType(SettingsEntity))!
|
||||
as SettingsEntity);
|
||||
break;
|
||||
case 'documents':
|
||||
result.documents.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DocumentEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DocumentEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -231,10 +232,10 @@ class _$GroupListResponse extends GroupListResponse {
|
|||
final BuiltList<GroupEntity> data;
|
||||
|
||||
factory _$GroupListResponse(
|
||||
[void Function(GroupListResponseBuilder) updates]) =>
|
||||
[void Function(GroupListResponseBuilder)? updates]) =>
|
||||
(new GroupListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$GroupListResponse._({this.data}) : super._() {
|
||||
_$GroupListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'GroupListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -252,10 +253,10 @@ class _$GroupListResponse extends GroupListResponse {
|
|||
return other is GroupListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -272,12 +273,12 @@ class _$GroupListResponse extends GroupListResponse {
|
|||
|
||||
class GroupListResponseBuilder
|
||||
implements Builder<GroupListResponse, GroupListResponseBuilder> {
|
||||
_$GroupListResponse _$v;
|
||||
_$GroupListResponse? _$v;
|
||||
|
||||
ListBuilder<GroupEntity> _data;
|
||||
ListBuilder<GroupEntity>? _data;
|
||||
ListBuilder<GroupEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<GroupEntity>();
|
||||
set data(ListBuilder<GroupEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<GroupEntity>? data) => _$this._data = data;
|
||||
|
||||
GroupListResponseBuilder();
|
||||
|
||||
|
|
@ -297,7 +298,7 @@ class GroupListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(GroupListResponseBuilder) updates) {
|
||||
void update(void Function(GroupListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +310,7 @@ class GroupListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$GroupListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -329,10 +330,10 @@ class _$GroupItemResponse extends GroupItemResponse {
|
|||
final GroupEntity data;
|
||||
|
||||
factory _$GroupItemResponse(
|
||||
[void Function(GroupItemResponseBuilder) updates]) =>
|
||||
[void Function(GroupItemResponseBuilder)? updates]) =>
|
||||
(new GroupItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$GroupItemResponse._({this.data}) : super._() {
|
||||
_$GroupItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'GroupItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -350,10 +351,10 @@ class _$GroupItemResponse extends GroupItemResponse {
|
|||
return other is GroupItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -370,11 +371,11 @@ class _$GroupItemResponse extends GroupItemResponse {
|
|||
|
||||
class GroupItemResponseBuilder
|
||||
implements Builder<GroupItemResponse, GroupItemResponseBuilder> {
|
||||
_$GroupItemResponse _$v;
|
||||
_$GroupItemResponse? _$v;
|
||||
|
||||
GroupEntityBuilder _data;
|
||||
GroupEntityBuilder? _data;
|
||||
GroupEntityBuilder get data => _$this._data ??= new GroupEntityBuilder();
|
||||
set data(GroupEntityBuilder data) => _$this._data = data;
|
||||
set data(GroupEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
GroupItemResponseBuilder();
|
||||
|
||||
|
|
@ -394,7 +395,7 @@ class GroupItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(GroupItemResponseBuilder) updates) {
|
||||
void update(void Function(GroupItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -406,7 +407,7 @@ class GroupItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$GroupItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -429,7 +430,7 @@ class _$GroupEntity extends GroupEntity {
|
|||
@override
|
||||
final BuiltList<DocumentEntity> documents;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -437,29 +438,29 @@ class _$GroupEntity extends GroupEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$GroupEntity([void Function(GroupEntityBuilder) updates]) =>
|
||||
factory _$GroupEntity([void Function(GroupEntityBuilder)? updates]) =>
|
||||
(new GroupEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$GroupEntity._(
|
||||
{this.name,
|
||||
this.settings,
|
||||
this.documents,
|
||||
{required this.name,
|
||||
required this.settings,
|
||||
required this.documents,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'GroupEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(settings, r'GroupEntity', 'settings');
|
||||
|
|
@ -498,10 +499,10 @@ class _$GroupEntity extends GroupEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, settings.hashCode);
|
||||
|
|
@ -537,56 +538,56 @@ class _$GroupEntity extends GroupEntity {
|
|||
}
|
||||
|
||||
class GroupEntityBuilder implements Builder<GroupEntity, GroupEntityBuilder> {
|
||||
_$GroupEntity _$v;
|
||||
_$GroupEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
SettingsEntityBuilder _settings;
|
||||
SettingsEntityBuilder? _settings;
|
||||
SettingsEntityBuilder get settings =>
|
||||
_$this._settings ??= new SettingsEntityBuilder();
|
||||
set settings(SettingsEntityBuilder settings) => _$this._settings = settings;
|
||||
set settings(SettingsEntityBuilder? settings) => _$this._settings = settings;
|
||||
|
||||
ListBuilder<DocumentEntity> _documents;
|
||||
ListBuilder<DocumentEntity>? _documents;
|
||||
ListBuilder<DocumentEntity> get documents =>
|
||||
_$this._documents ??= new ListBuilder<DocumentEntity>();
|
||||
set documents(ListBuilder<DocumentEntity> documents) =>
|
||||
set documents(ListBuilder<DocumentEntity>? documents) =>
|
||||
_$this._documents = documents;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
GroupEntityBuilder() {
|
||||
GroupEntity._initializeBuilder(this);
|
||||
|
|
@ -618,7 +619,7 @@ class GroupEntityBuilder implements Builder<GroupEntity, GroupEntityBuilder> {
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(GroupEntityBuilder) updates) {
|
||||
void update(void Function(GroupEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -647,7 +648,7 @@ class GroupEntityBuilder implements Builder<GroupEntity, GroupEntityBuilder> {
|
|||
id: BuiltValueNullFieldError.checkNotNull(
|
||||
id, r'GroupEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'settings';
|
||||
settings.build();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,23 @@ part 'health_check_model.g.dart';
|
|||
abstract class HealthCheckResponse
|
||||
implements Built<HealthCheckResponse, HealthCheckResponseBuilder> {
|
||||
factory HealthCheckResponse() {
|
||||
return _$HealthCheckResponse._();
|
||||
return _$HealthCheckResponse._(
|
||||
cacheEnabled: false,
|
||||
dbCheck: false,
|
||||
emailDriver: '',
|
||||
envWritable: false,
|
||||
exchangeRateApiNotConfigured: false,
|
||||
execEnabled: false,
|
||||
filePermissions: '',
|
||||
openBasedir: false,
|
||||
pdfEngine: '',
|
||||
pendingJobs: 0,
|
||||
phantomEnabled: false,
|
||||
phpVersion: HealthCheckPHPResponse(),
|
||||
queue: '',
|
||||
systemHealth: false,
|
||||
trailingSlash: false,
|
||||
);
|
||||
}
|
||||
|
||||
HealthCheckResponse._();
|
||||
|
|
@ -72,7 +88,13 @@ abstract class HealthCheckResponse
|
|||
abstract class HealthCheckPHPResponse
|
||||
implements Built<HealthCheckPHPResponse, HealthCheckPHPResponseBuilder> {
|
||||
factory HealthCheckPHPResponse() {
|
||||
return _$HealthCheckPHPResponse._();
|
||||
return _$HealthCheckPHPResponse._(
|
||||
currentPHPCLIVersion: '',
|
||||
currentPHPVersion: '',
|
||||
isOkay: false,
|
||||
memoryLimit: '',
|
||||
minimumPHPVersion: '',
|
||||
);
|
||||
}
|
||||
|
||||
HealthCheckPHPResponse._();
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ class _$HealthCheckResponseSerializer
|
|||
final String wireName = 'HealthCheckResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, HealthCheckResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'system_health',
|
||||
serializers.serialize(object.systemHealth,
|
||||
specifiedType: const FullType(bool)),
|
||||
|
|
@ -78,76 +78,76 @@ class _$HealthCheckResponseSerializer
|
|||
|
||||
@override
|
||||
HealthCheckResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new HealthCheckResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'system_health':
|
||||
result.systemHealth = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'php_version':
|
||||
result.phpVersion.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(HealthCheckPHPResponse))
|
||||
specifiedType: const FullType(HealthCheckPHPResponse))!
|
||||
as HealthCheckPHPResponse);
|
||||
break;
|
||||
case 'env_writable':
|
||||
result.envWritable = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'simple_db_check':
|
||||
result.dbCheck = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'cache_enabled':
|
||||
result.cacheEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'phantom_enabled':
|
||||
result.phantomEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'open_basedir':
|
||||
result.openBasedir = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'file_permissions':
|
||||
result.filePermissions = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'exec':
|
||||
result.execEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'mail_mailer':
|
||||
result.emailDriver = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'jobs_pending':
|
||||
result.pendingJobs = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'pdf_engine':
|
||||
result.pdfEngine = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'trailing_slash':
|
||||
result.trailingSlash = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'exchange_rate_api_not_configured':
|
||||
result.exchangeRateApiNotConfigured = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'queue':
|
||||
result.queue = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -167,10 +167,10 @@ class _$HealthCheckPHPResponseSerializer
|
|||
final String wireName = 'HealthCheckPHPResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, HealthCheckPHPResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'minimum_php_version',
|
||||
serializers.serialize(object.minimumPHPVersion,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -192,35 +192,35 @@ class _$HealthCheckPHPResponseSerializer
|
|||
|
||||
@override
|
||||
HealthCheckPHPResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new HealthCheckPHPResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'minimum_php_version':
|
||||
result.minimumPHPVersion = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'current_php_version':
|
||||
result.currentPHPVersion = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'current_php_cli_version':
|
||||
result.currentPHPCLIVersion = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'is_okay':
|
||||
result.isOkay = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'memory_limit':
|
||||
result.memoryLimit = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -262,25 +262,25 @@ class _$HealthCheckResponse extends HealthCheckResponse {
|
|||
final String queue;
|
||||
|
||||
factory _$HealthCheckResponse(
|
||||
[void Function(HealthCheckResponseBuilder) updates]) =>
|
||||
[void Function(HealthCheckResponseBuilder)? updates]) =>
|
||||
(new HealthCheckResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$HealthCheckResponse._(
|
||||
{this.systemHealth,
|
||||
this.phpVersion,
|
||||
this.envWritable,
|
||||
this.dbCheck,
|
||||
this.cacheEnabled,
|
||||
this.phantomEnabled,
|
||||
this.openBasedir,
|
||||
this.filePermissions,
|
||||
this.execEnabled,
|
||||
this.emailDriver,
|
||||
this.pendingJobs,
|
||||
this.pdfEngine,
|
||||
this.trailingSlash,
|
||||
this.exchangeRateApiNotConfigured,
|
||||
this.queue})
|
||||
{required this.systemHealth,
|
||||
required this.phpVersion,
|
||||
required this.envWritable,
|
||||
required this.dbCheck,
|
||||
required this.cacheEnabled,
|
||||
required this.phantomEnabled,
|
||||
required this.openBasedir,
|
||||
required this.filePermissions,
|
||||
required this.execEnabled,
|
||||
required this.emailDriver,
|
||||
required this.pendingJobs,
|
||||
required this.pdfEngine,
|
||||
required this.trailingSlash,
|
||||
required this.exchangeRateApiNotConfigured,
|
||||
required this.queue})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
systemHealth, r'HealthCheckResponse', 'systemHealth');
|
||||
|
|
@ -344,10 +344,10 @@ class _$HealthCheckResponse extends HealthCheckResponse {
|
|||
queue == other.queue;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, systemHealth.hashCode);
|
||||
_$hash = $jc(_$hash, phpVersion.hashCode);
|
||||
|
|
@ -392,73 +392,74 @@ class _$HealthCheckResponse extends HealthCheckResponse {
|
|||
|
||||
class HealthCheckResponseBuilder
|
||||
implements Builder<HealthCheckResponse, HealthCheckResponseBuilder> {
|
||||
_$HealthCheckResponse _$v;
|
||||
_$HealthCheckResponse? _$v;
|
||||
|
||||
bool _systemHealth;
|
||||
bool get systemHealth => _$this._systemHealth;
|
||||
set systemHealth(bool systemHealth) => _$this._systemHealth = systemHealth;
|
||||
bool? _systemHealth;
|
||||
bool? get systemHealth => _$this._systemHealth;
|
||||
set systemHealth(bool? systemHealth) => _$this._systemHealth = systemHealth;
|
||||
|
||||
HealthCheckPHPResponseBuilder _phpVersion;
|
||||
HealthCheckPHPResponseBuilder? _phpVersion;
|
||||
HealthCheckPHPResponseBuilder get phpVersion =>
|
||||
_$this._phpVersion ??= new HealthCheckPHPResponseBuilder();
|
||||
set phpVersion(HealthCheckPHPResponseBuilder phpVersion) =>
|
||||
set phpVersion(HealthCheckPHPResponseBuilder? phpVersion) =>
|
||||
_$this._phpVersion = phpVersion;
|
||||
|
||||
bool _envWritable;
|
||||
bool get envWritable => _$this._envWritable;
|
||||
set envWritable(bool envWritable) => _$this._envWritable = envWritable;
|
||||
bool? _envWritable;
|
||||
bool? get envWritable => _$this._envWritable;
|
||||
set envWritable(bool? envWritable) => _$this._envWritable = envWritable;
|
||||
|
||||
bool _dbCheck;
|
||||
bool get dbCheck => _$this._dbCheck;
|
||||
set dbCheck(bool dbCheck) => _$this._dbCheck = dbCheck;
|
||||
bool? _dbCheck;
|
||||
bool? get dbCheck => _$this._dbCheck;
|
||||
set dbCheck(bool? dbCheck) => _$this._dbCheck = dbCheck;
|
||||
|
||||
bool _cacheEnabled;
|
||||
bool get cacheEnabled => _$this._cacheEnabled;
|
||||
set cacheEnabled(bool cacheEnabled) => _$this._cacheEnabled = cacheEnabled;
|
||||
bool? _cacheEnabled;
|
||||
bool? get cacheEnabled => _$this._cacheEnabled;
|
||||
set cacheEnabled(bool? cacheEnabled) => _$this._cacheEnabled = cacheEnabled;
|
||||
|
||||
bool _phantomEnabled;
|
||||
bool get phantomEnabled => _$this._phantomEnabled;
|
||||
set phantomEnabled(bool phantomEnabled) =>
|
||||
bool? _phantomEnabled;
|
||||
bool? get phantomEnabled => _$this._phantomEnabled;
|
||||
set phantomEnabled(bool? phantomEnabled) =>
|
||||
_$this._phantomEnabled = phantomEnabled;
|
||||
|
||||
bool _openBasedir;
|
||||
bool get openBasedir => _$this._openBasedir;
|
||||
set openBasedir(bool openBasedir) => _$this._openBasedir = openBasedir;
|
||||
bool? _openBasedir;
|
||||
bool? get openBasedir => _$this._openBasedir;
|
||||
set openBasedir(bool? openBasedir) => _$this._openBasedir = openBasedir;
|
||||
|
||||
String _filePermissions;
|
||||
String get filePermissions => _$this._filePermissions;
|
||||
set filePermissions(String filePermissions) =>
|
||||
String? _filePermissions;
|
||||
String? get filePermissions => _$this._filePermissions;
|
||||
set filePermissions(String? filePermissions) =>
|
||||
_$this._filePermissions = filePermissions;
|
||||
|
||||
bool _execEnabled;
|
||||
bool get execEnabled => _$this._execEnabled;
|
||||
set execEnabled(bool execEnabled) => _$this._execEnabled = execEnabled;
|
||||
bool? _execEnabled;
|
||||
bool? get execEnabled => _$this._execEnabled;
|
||||
set execEnabled(bool? execEnabled) => _$this._execEnabled = execEnabled;
|
||||
|
||||
String _emailDriver;
|
||||
String get emailDriver => _$this._emailDriver;
|
||||
set emailDriver(String emailDriver) => _$this._emailDriver = emailDriver;
|
||||
String? _emailDriver;
|
||||
String? get emailDriver => _$this._emailDriver;
|
||||
set emailDriver(String? emailDriver) => _$this._emailDriver = emailDriver;
|
||||
|
||||
int _pendingJobs;
|
||||
int get pendingJobs => _$this._pendingJobs;
|
||||
set pendingJobs(int pendingJobs) => _$this._pendingJobs = pendingJobs;
|
||||
int? _pendingJobs;
|
||||
int? get pendingJobs => _$this._pendingJobs;
|
||||
set pendingJobs(int? pendingJobs) => _$this._pendingJobs = pendingJobs;
|
||||
|
||||
String _pdfEngine;
|
||||
String get pdfEngine => _$this._pdfEngine;
|
||||
set pdfEngine(String pdfEngine) => _$this._pdfEngine = pdfEngine;
|
||||
String? _pdfEngine;
|
||||
String? get pdfEngine => _$this._pdfEngine;
|
||||
set pdfEngine(String? pdfEngine) => _$this._pdfEngine = pdfEngine;
|
||||
|
||||
bool _trailingSlash;
|
||||
bool get trailingSlash => _$this._trailingSlash;
|
||||
set trailingSlash(bool trailingSlash) =>
|
||||
bool? _trailingSlash;
|
||||
bool? get trailingSlash => _$this._trailingSlash;
|
||||
set trailingSlash(bool? trailingSlash) =>
|
||||
_$this._trailingSlash = trailingSlash;
|
||||
|
||||
bool _exchangeRateApiNotConfigured;
|
||||
bool get exchangeRateApiNotConfigured => _$this._exchangeRateApiNotConfigured;
|
||||
set exchangeRateApiNotConfigured(bool exchangeRateApiNotConfigured) =>
|
||||
bool? _exchangeRateApiNotConfigured;
|
||||
bool? get exchangeRateApiNotConfigured =>
|
||||
_$this._exchangeRateApiNotConfigured;
|
||||
set exchangeRateApiNotConfigured(bool? exchangeRateApiNotConfigured) =>
|
||||
_$this._exchangeRateApiNotConfigured = exchangeRateApiNotConfigured;
|
||||
|
||||
String _queue;
|
||||
String get queue => _$this._queue;
|
||||
set queue(String queue) => _$this._queue = queue;
|
||||
String? _queue;
|
||||
String? get queue => _$this._queue;
|
||||
set queue(String? queue) => _$this._queue = queue;
|
||||
|
||||
HealthCheckResponseBuilder() {
|
||||
HealthCheckResponse._initializeBuilder(this);
|
||||
|
|
@ -494,7 +495,7 @@ class HealthCheckResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(HealthCheckResponseBuilder) updates) {
|
||||
void update(void Function(HealthCheckResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -530,7 +531,7 @@ class HealthCheckResponseBuilder
|
|||
exchangeRateApiNotConfigured: BuiltValueNullFieldError.checkNotNull(exchangeRateApiNotConfigured, r'HealthCheckResponse', 'exchangeRateApiNotConfigured'),
|
||||
queue: BuiltValueNullFieldError.checkNotNull(queue, r'HealthCheckResponse', 'queue'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'phpVersion';
|
||||
phpVersion.build();
|
||||
|
|
@ -558,15 +559,15 @@ class _$HealthCheckPHPResponse extends HealthCheckPHPResponse {
|
|||
final String memoryLimit;
|
||||
|
||||
factory _$HealthCheckPHPResponse(
|
||||
[void Function(HealthCheckPHPResponseBuilder) updates]) =>
|
||||
[void Function(HealthCheckPHPResponseBuilder)? updates]) =>
|
||||
(new HealthCheckPHPResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$HealthCheckPHPResponse._(
|
||||
{this.minimumPHPVersion,
|
||||
this.currentPHPVersion,
|
||||
this.currentPHPCLIVersion,
|
||||
this.isOkay,
|
||||
this.memoryLimit})
|
||||
{required this.minimumPHPVersion,
|
||||
required this.currentPHPVersion,
|
||||
required this.currentPHPCLIVersion,
|
||||
required this.isOkay,
|
||||
required this.memoryLimit})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
minimumPHPVersion, r'HealthCheckPHPResponse', 'minimumPHPVersion');
|
||||
|
|
@ -600,10 +601,10 @@ class _$HealthCheckPHPResponse extends HealthCheckPHPResponse {
|
|||
memoryLimit == other.memoryLimit;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, minimumPHPVersion.hashCode);
|
||||
_$hash = $jc(_$hash, currentPHPVersion.hashCode);
|
||||
|
|
@ -628,30 +629,30 @@ class _$HealthCheckPHPResponse extends HealthCheckPHPResponse {
|
|||
|
||||
class HealthCheckPHPResponseBuilder
|
||||
implements Builder<HealthCheckPHPResponse, HealthCheckPHPResponseBuilder> {
|
||||
_$HealthCheckPHPResponse _$v;
|
||||
_$HealthCheckPHPResponse? _$v;
|
||||
|
||||
String _minimumPHPVersion;
|
||||
String get minimumPHPVersion => _$this._minimumPHPVersion;
|
||||
set minimumPHPVersion(String minimumPHPVersion) =>
|
||||
String? _minimumPHPVersion;
|
||||
String? get minimumPHPVersion => _$this._minimumPHPVersion;
|
||||
set minimumPHPVersion(String? minimumPHPVersion) =>
|
||||
_$this._minimumPHPVersion = minimumPHPVersion;
|
||||
|
||||
String _currentPHPVersion;
|
||||
String get currentPHPVersion => _$this._currentPHPVersion;
|
||||
set currentPHPVersion(String currentPHPVersion) =>
|
||||
String? _currentPHPVersion;
|
||||
String? get currentPHPVersion => _$this._currentPHPVersion;
|
||||
set currentPHPVersion(String? currentPHPVersion) =>
|
||||
_$this._currentPHPVersion = currentPHPVersion;
|
||||
|
||||
String _currentPHPCLIVersion;
|
||||
String get currentPHPCLIVersion => _$this._currentPHPCLIVersion;
|
||||
set currentPHPCLIVersion(String currentPHPCLIVersion) =>
|
||||
String? _currentPHPCLIVersion;
|
||||
String? get currentPHPCLIVersion => _$this._currentPHPCLIVersion;
|
||||
set currentPHPCLIVersion(String? currentPHPCLIVersion) =>
|
||||
_$this._currentPHPCLIVersion = currentPHPCLIVersion;
|
||||
|
||||
bool _isOkay;
|
||||
bool get isOkay => _$this._isOkay;
|
||||
set isOkay(bool isOkay) => _$this._isOkay = isOkay;
|
||||
bool? _isOkay;
|
||||
bool? get isOkay => _$this._isOkay;
|
||||
set isOkay(bool? isOkay) => _$this._isOkay = isOkay;
|
||||
|
||||
String _memoryLimit;
|
||||
String get memoryLimit => _$this._memoryLimit;
|
||||
set memoryLimit(String memoryLimit) => _$this._memoryLimit = memoryLimit;
|
||||
String? _memoryLimit;
|
||||
String? get memoryLimit => _$this._memoryLimit;
|
||||
set memoryLimit(String? memoryLimit) => _$this._memoryLimit = memoryLimit;
|
||||
|
||||
HealthCheckPHPResponseBuilder() {
|
||||
HealthCheckPHPResponse._initializeBuilder(this);
|
||||
|
|
@ -677,7 +678,7 @@ class HealthCheckPHPResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(HealthCheckPHPResponseBuilder) updates) {
|
||||
void update(void Function(HealthCheckPHPResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
// Flutter imports:
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
// Package imports:
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
|
|
@ -14,7 +11,10 @@ part 'import_model.g.dart';
|
|||
abstract class PreImportResponse
|
||||
implements Built<PreImportResponse, PreImportResponseBuilder> {
|
||||
factory PreImportResponse() {
|
||||
return _$PreImportResponse._();
|
||||
return _$PreImportResponse._(
|
||||
hash: '',
|
||||
mappings: BuiltMap<String, PreImportResponseEntityDetails>(),
|
||||
);
|
||||
}
|
||||
|
||||
PreImportResponse._();
|
||||
|
|
@ -36,7 +36,10 @@ abstract class PreImportResponseEntityDetails
|
|||
Built<PreImportResponseEntityDetails,
|
||||
PreImportResponseEntityDetailsBuilder> {
|
||||
factory PreImportResponseEntityDetails() {
|
||||
return _$PreImportResponseEntityDetails._();
|
||||
return _$PreImportResponseEntityDetails._(
|
||||
available: BuiltList<String>(),
|
||||
headers: BuiltList<BuiltList<String>>(),
|
||||
);
|
||||
}
|
||||
|
||||
PreImportResponseEntityDetails._();
|
||||
|
|
@ -61,11 +64,11 @@ abstract class PreImportResponseEntityDetails
|
|||
abstract class ImportRequest
|
||||
implements Built<ImportRequest, ImportRequestBuilder> {
|
||||
factory ImportRequest({
|
||||
@required String hash,
|
||||
@required String importType,
|
||||
@required bool skipHeader,
|
||||
@required String bankAccountId,
|
||||
@required BuiltMap<String, ImportRequestMapping> columnMap,
|
||||
required String hash,
|
||||
required String importType,
|
||||
required bool skipHeader,
|
||||
required String bankAccountId,
|
||||
required BuiltMap<String, ImportRequestMapping> columnMap,
|
||||
}) {
|
||||
return _$ImportRequest._(
|
||||
hash: hash,
|
||||
|
|
|
|||
|
|
@ -139,9 +139,9 @@ class _$PreImportResponseSerializer
|
|||
final String wireName = 'PreImportResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, PreImportResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, PreImportResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'hash',
|
||||
serializers.serialize(object.hash, specifiedType: const FullType(String)),
|
||||
'mappings',
|
||||
|
|
@ -157,26 +157,26 @@ class _$PreImportResponseSerializer
|
|||
|
||||
@override
|
||||
PreImportResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PreImportResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'hash':
|
||||
result.hash = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'mappings':
|
||||
result.mappings.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(PreImportResponseEntityDetails)
|
||||
])));
|
||||
]))!);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -196,10 +196,10 @@ class _$PreImportResponseEntityDetailsSerializer
|
|||
final String wireName = 'PreImportResponseEntityDetails';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, PreImportResponseEntityDetails object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'available',
|
||||
serializers.serialize(object.available,
|
||||
specifiedType:
|
||||
|
|
@ -216,27 +216,27 @@ class _$PreImportResponseEntityDetailsSerializer
|
|||
|
||||
@override
|
||||
PreImportResponseEntityDetails deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PreImportResponseEntityDetailsBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'available':
|
||||
result.available.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(String)]))
|
||||
as BuiltList<Object>);
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(String)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'headers':
|
||||
result.headers.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltList, const [
|
||||
const FullType(BuiltList, const [const FullType(String)])
|
||||
])) as BuiltList<Object>);
|
||||
]))! as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -252,9 +252,9 @@ class _$ImportRequestSerializer implements StructuredSerializer<ImportRequest> {
|
|||
final String wireName = 'ImportRequest';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, ImportRequest object,
|
||||
Iterable<Object?> serialize(Serializers serializers, ImportRequest object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'hash',
|
||||
serializers.serialize(object.hash, specifiedType: const FullType(String)),
|
||||
'import_type',
|
||||
|
|
@ -279,38 +279,38 @@ class _$ImportRequestSerializer implements StructuredSerializer<ImportRequest> {
|
|||
|
||||
@override
|
||||
ImportRequest deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ImportRequestBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'hash':
|
||||
result.hash = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'import_type':
|
||||
result.importType = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'bank_integration_id':
|
||||
result.bankAccountId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'skip_header':
|
||||
result.skipHeader = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'column_map':
|
||||
result.columnMap.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(ImportRequestMapping)
|
||||
])));
|
||||
]))!);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -330,10 +330,10 @@ class _$ImportRequestMappingSerializer
|
|||
final String wireName = 'ImportRequestMapping';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ImportRequestMapping object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'mapping',
|
||||
serializers.serialize(object.mapping,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -345,20 +345,20 @@ class _$ImportRequestMappingSerializer
|
|||
|
||||
@override
|
||||
ImportRequestMapping deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ImportRequestMappingBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'mapping':
|
||||
result.mapping.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap,
|
||||
const [const FullType(int), const FullType(String)])));
|
||||
const [const FullType(int), const FullType(String)]))!);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -408,10 +408,11 @@ class _$PreImportResponse extends PreImportResponse {
|
|||
final BuiltMap<String, PreImportResponseEntityDetails> mappings;
|
||||
|
||||
factory _$PreImportResponse(
|
||||
[void Function(PreImportResponseBuilder) updates]) =>
|
||||
[void Function(PreImportResponseBuilder)? updates]) =>
|
||||
(new PreImportResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$PreImportResponse._({this.hash, this.mappings}) : super._() {
|
||||
_$PreImportResponse._({required this.hash, required this.mappings})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(hash, r'PreImportResponse', 'hash');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
mappings, r'PreImportResponse', 'mappings');
|
||||
|
|
@ -433,10 +434,10 @@ class _$PreImportResponse extends PreImportResponse {
|
|||
mappings == other.mappings;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, hash.hashCode);
|
||||
_$hash = $jc(_$hash, mappings.hashCode);
|
||||
|
|
@ -455,17 +456,17 @@ class _$PreImportResponse extends PreImportResponse {
|
|||
|
||||
class PreImportResponseBuilder
|
||||
implements Builder<PreImportResponse, PreImportResponseBuilder> {
|
||||
_$PreImportResponse _$v;
|
||||
_$PreImportResponse? _$v;
|
||||
|
||||
String _hash;
|
||||
String get hash => _$this._hash;
|
||||
set hash(String hash) => _$this._hash = hash;
|
||||
String? _hash;
|
||||
String? get hash => _$this._hash;
|
||||
set hash(String? hash) => _$this._hash = hash;
|
||||
|
||||
MapBuilder<String, PreImportResponseEntityDetails> _mappings;
|
||||
MapBuilder<String, PreImportResponseEntityDetails>? _mappings;
|
||||
MapBuilder<String, PreImportResponseEntityDetails> get mappings =>
|
||||
_$this._mappings ??=
|
||||
new MapBuilder<String, PreImportResponseEntityDetails>();
|
||||
set mappings(MapBuilder<String, PreImportResponseEntityDetails> mappings) =>
|
||||
set mappings(MapBuilder<String, PreImportResponseEntityDetails>? mappings) =>
|
||||
_$this._mappings = mappings;
|
||||
|
||||
PreImportResponseBuilder();
|
||||
|
|
@ -487,7 +488,7 @@ class PreImportResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PreImportResponseBuilder) updates) {
|
||||
void update(void Function(PreImportResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -503,7 +504,7 @@ class PreImportResponseBuilder
|
|||
hash, r'PreImportResponse', 'hash'),
|
||||
mappings: mappings.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'mappings';
|
||||
mappings.build();
|
||||
|
|
@ -525,10 +526,11 @@ class _$PreImportResponseEntityDetails extends PreImportResponseEntityDetails {
|
|||
final BuiltList<BuiltList<String>> headers;
|
||||
|
||||
factory _$PreImportResponseEntityDetails(
|
||||
[void Function(PreImportResponseEntityDetailsBuilder) updates]) =>
|
||||
[void Function(PreImportResponseEntityDetailsBuilder)? updates]) =>
|
||||
(new PreImportResponseEntityDetailsBuilder()..update(updates))._build();
|
||||
|
||||
_$PreImportResponseEntityDetails._({this.available, this.headers})
|
||||
_$PreImportResponseEntityDetails._(
|
||||
{required this.available, required this.headers})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
available, r'PreImportResponseEntityDetails', 'available');
|
||||
|
|
@ -553,10 +555,10 @@ class _$PreImportResponseEntityDetails extends PreImportResponseEntityDetails {
|
|||
headers == other.headers;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, available.hashCode);
|
||||
_$hash = $jc(_$hash, headers.hashCode);
|
||||
|
|
@ -577,17 +579,18 @@ class PreImportResponseEntityDetailsBuilder
|
|||
implements
|
||||
Builder<PreImportResponseEntityDetails,
|
||||
PreImportResponseEntityDetailsBuilder> {
|
||||
_$PreImportResponseEntityDetails _$v;
|
||||
_$PreImportResponseEntityDetails? _$v;
|
||||
|
||||
ListBuilder<String> _available;
|
||||
ListBuilder<String>? _available;
|
||||
ListBuilder<String> get available =>
|
||||
_$this._available ??= new ListBuilder<String>();
|
||||
set available(ListBuilder<String> available) => _$this._available = available;
|
||||
set available(ListBuilder<String>? available) =>
|
||||
_$this._available = available;
|
||||
|
||||
ListBuilder<BuiltList<String>> _headers;
|
||||
ListBuilder<BuiltList<String>>? _headers;
|
||||
ListBuilder<BuiltList<String>> get headers =>
|
||||
_$this._headers ??= new ListBuilder<BuiltList<String>>();
|
||||
set headers(ListBuilder<BuiltList<String>> headers) =>
|
||||
set headers(ListBuilder<BuiltList<String>>? headers) =>
|
||||
_$this._headers = headers;
|
||||
|
||||
PreImportResponseEntityDetailsBuilder();
|
||||
|
|
@ -609,7 +612,7 @@ class PreImportResponseEntityDetailsBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PreImportResponseEntityDetailsBuilder) updates) {
|
||||
void update(void Function(PreImportResponseEntityDetailsBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -623,7 +626,7 @@ class PreImportResponseEntityDetailsBuilder
|
|||
new _$PreImportResponseEntityDetails._(
|
||||
available: available.build(), headers: headers.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'available';
|
||||
available.build();
|
||||
|
|
@ -652,15 +655,15 @@ class _$ImportRequest extends ImportRequest {
|
|||
@override
|
||||
final BuiltMap<String, ImportRequestMapping> columnMap;
|
||||
|
||||
factory _$ImportRequest([void Function(ImportRequestBuilder) updates]) =>
|
||||
factory _$ImportRequest([void Function(ImportRequestBuilder)? updates]) =>
|
||||
(new ImportRequestBuilder()..update(updates))._build();
|
||||
|
||||
_$ImportRequest._(
|
||||
{this.hash,
|
||||
this.importType,
|
||||
this.bankAccountId,
|
||||
this.skipHeader,
|
||||
this.columnMap})
|
||||
{required this.hash,
|
||||
required this.importType,
|
||||
required this.bankAccountId,
|
||||
required this.skipHeader,
|
||||
required this.columnMap})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(hash, r'ImportRequest', 'hash');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -691,10 +694,10 @@ class _$ImportRequest extends ImportRequest {
|
|||
columnMap == other.columnMap;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, hash.hashCode);
|
||||
_$hash = $jc(_$hash, importType.hashCode);
|
||||
|
|
@ -719,29 +722,29 @@ class _$ImportRequest extends ImportRequest {
|
|||
|
||||
class ImportRequestBuilder
|
||||
implements Builder<ImportRequest, ImportRequestBuilder> {
|
||||
_$ImportRequest _$v;
|
||||
_$ImportRequest? _$v;
|
||||
|
||||
String _hash;
|
||||
String get hash => _$this._hash;
|
||||
set hash(String hash) => _$this._hash = hash;
|
||||
String? _hash;
|
||||
String? get hash => _$this._hash;
|
||||
set hash(String? hash) => _$this._hash = hash;
|
||||
|
||||
String _importType;
|
||||
String get importType => _$this._importType;
|
||||
set importType(String importType) => _$this._importType = importType;
|
||||
String? _importType;
|
||||
String? get importType => _$this._importType;
|
||||
set importType(String? importType) => _$this._importType = importType;
|
||||
|
||||
String _bankAccountId;
|
||||
String get bankAccountId => _$this._bankAccountId;
|
||||
set bankAccountId(String bankAccountId) =>
|
||||
String? _bankAccountId;
|
||||
String? get bankAccountId => _$this._bankAccountId;
|
||||
set bankAccountId(String? bankAccountId) =>
|
||||
_$this._bankAccountId = bankAccountId;
|
||||
|
||||
bool _skipHeader;
|
||||
bool get skipHeader => _$this._skipHeader;
|
||||
set skipHeader(bool skipHeader) => _$this._skipHeader = skipHeader;
|
||||
bool? _skipHeader;
|
||||
bool? get skipHeader => _$this._skipHeader;
|
||||
set skipHeader(bool? skipHeader) => _$this._skipHeader = skipHeader;
|
||||
|
||||
MapBuilder<String, ImportRequestMapping> _columnMap;
|
||||
MapBuilder<String, ImportRequestMapping>? _columnMap;
|
||||
MapBuilder<String, ImportRequestMapping> get columnMap =>
|
||||
_$this._columnMap ??= new MapBuilder<String, ImportRequestMapping>();
|
||||
set columnMap(MapBuilder<String, ImportRequestMapping> columnMap) =>
|
||||
set columnMap(MapBuilder<String, ImportRequestMapping>? columnMap) =>
|
||||
_$this._columnMap = columnMap;
|
||||
|
||||
ImportRequestBuilder();
|
||||
|
|
@ -766,7 +769,7 @@ class ImportRequestBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ImportRequestBuilder) updates) {
|
||||
void update(void Function(ImportRequestBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -788,7 +791,7 @@ class ImportRequestBuilder
|
|||
skipHeader, r'ImportRequest', 'skipHeader'),
|
||||
columnMap: columnMap.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'columnMap';
|
||||
columnMap.build();
|
||||
|
|
@ -808,10 +811,10 @@ class _$ImportRequestMapping extends ImportRequestMapping {
|
|||
final BuiltMap<int, String> mapping;
|
||||
|
||||
factory _$ImportRequestMapping(
|
||||
[void Function(ImportRequestMappingBuilder) updates]) =>
|
||||
[void Function(ImportRequestMappingBuilder)? updates]) =>
|
||||
(new ImportRequestMappingBuilder()..update(updates))._build();
|
||||
|
||||
_$ImportRequestMapping._({this.mapping}) : super._() {
|
||||
_$ImportRequestMapping._({required this.mapping}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
mapping, r'ImportRequestMapping', 'mapping');
|
||||
}
|
||||
|
|
@ -831,10 +834,10 @@ class _$ImportRequestMapping extends ImportRequestMapping {
|
|||
return other is ImportRequestMapping && mapping == other.mapping;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, mapping.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -851,12 +854,12 @@ class _$ImportRequestMapping extends ImportRequestMapping {
|
|||
|
||||
class ImportRequestMappingBuilder
|
||||
implements Builder<ImportRequestMapping, ImportRequestMappingBuilder> {
|
||||
_$ImportRequestMapping _$v;
|
||||
_$ImportRequestMapping? _$v;
|
||||
|
||||
MapBuilder<int, String> _mapping;
|
||||
MapBuilder<int, String>? _mapping;
|
||||
MapBuilder<int, String> get mapping =>
|
||||
_$this._mapping ??= new MapBuilder<int, String>();
|
||||
set mapping(MapBuilder<int, String> mapping) => _$this._mapping = mapping;
|
||||
set mapping(MapBuilder<int, String>? mapping) => _$this._mapping = mapping;
|
||||
|
||||
ImportRequestMappingBuilder();
|
||||
|
||||
|
|
@ -876,7 +879,7 @@ class ImportRequestMappingBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ImportRequestMappingBuilder) updates) {
|
||||
void update(void Function(ImportRequestMappingBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -888,7 +891,7 @@ class ImportRequestMappingBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ImportRequestMapping._(mapping: mapping.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'mapping';
|
||||
mapping.build();
|
||||
|
|
|
|||
|
|
@ -135,12 +135,12 @@ abstract class InvoiceEntity extends Object
|
|||
BelongsToVendor
|
||||
implements Built<InvoiceEntity, InvoiceEntityBuilder> {
|
||||
factory InvoiceEntity({
|
||||
String id,
|
||||
AppState state,
|
||||
ClientEntity client,
|
||||
VendorEntity vendor,
|
||||
UserEntity user,
|
||||
EntityType entityType,
|
||||
String? id,
|
||||
AppState? state,
|
||||
ClientEntity? client,
|
||||
VendorEntity? vendor,
|
||||
UserEntity? user,
|
||||
EntityType? entityType,
|
||||
}) {
|
||||
final company = state?.company;
|
||||
final settings = getClientSettings(state, client);
|
||||
|
|
@ -148,9 +148,9 @@ abstract class InvoiceEntity extends Object
|
|||
double exchangeRate = 1;
|
||||
if ((client?.currencyId ?? '').isNotEmpty) {
|
||||
exchangeRate = getExchangeRate(
|
||||
state.staticState.currencyMap,
|
||||
fromCurrencyId: state.company.currencyId,
|
||||
toCurrencyId: client.currencyId,
|
||||
state!.staticState.currencyMap,
|
||||
fromCurrencyId: state.company!.currencyId,
|
||||
toCurrencyId: client!.currencyId,
|
||||
);
|
||||
}
|
||||
return _$InvoiceEntity._(
|
||||
|
|
@ -223,12 +223,12 @@ abstract class InvoiceEntity extends Object
|
|||
activities: BuiltList<ActivityEntity>(),
|
||||
invitations: client != null
|
||||
? BuiltList(client.emailContacts
|
||||
.map((contact) => InvitationEntity(clientContactId: contact.id))
|
||||
.map((contact) => InvitationEntity(clientContactId: contact!.id))
|
||||
.toList())
|
||||
: vendor != null
|
||||
? BuiltList(vendor.emailContacts
|
||||
.map((contact) =>
|
||||
InvitationEntity(vendorContactId: contact.id))
|
||||
InvitationEntity(vendorContactId: contact!.id))
|
||||
.toList())
|
||||
: BuiltList(<InvitationEntity>[InvitationEntity()]),
|
||||
updatedAt: 0,
|
||||
|
|
@ -261,19 +261,18 @@ abstract class InvoiceEntity extends Object
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'idempotency_key')
|
||||
String get idempotencyKey;
|
||||
String? get idempotencyKey;
|
||||
|
||||
InvoiceEntity moveLineItem(int oldIndex, int newIndex) {
|
||||
InvoiceEntity moveLineItem(int oldIndex, int? newIndex) {
|
||||
final lineItem = lineItems[oldIndex];
|
||||
InvoiceEntity invoice = rebuild((b) => b..lineItems.removeAt(oldIndex));
|
||||
invoice = invoice.rebuild((b) => b
|
||||
..lineItems.replace(<InvoiceItemEntity>[
|
||||
..lineItems.replace(<InvoiceItemEntity?>[
|
||||
...invoice.lineItems.sublist(0, newIndex),
|
||||
lineItem,
|
||||
...invoice.lineItems.sublist(
|
||||
newIndex,
|
||||
newIndex!,
|
||||
invoice.lineItems.length,
|
||||
)
|
||||
])
|
||||
|
|
@ -283,15 +282,15 @@ abstract class InvoiceEntity extends Object
|
|||
|
||||
InvoiceEntity recreateInvitations(AppState state) {
|
||||
if (entityType == EntityType.purchaseOrder) {
|
||||
final vendor = state.vendorState.get(vendorId);
|
||||
final invitations = vendor.contacts
|
||||
.map((contact) => InvitationEntity(vendorContactId: contact.id))
|
||||
final vendor = state.vendorState.get(vendorId)!;
|
||||
final BuiltList<InvitationEntity> invitations = vendor.contacts
|
||||
.map((contact) => InvitationEntity(vendorContactId: contact!.id))
|
||||
.toBuiltList();
|
||||
return rebuild((b) => b..invitations.replace(invitations));
|
||||
} else {
|
||||
final client = state.clientState.get(clientId);
|
||||
final invitations = client.contacts
|
||||
.map((contact) => InvitationEntity(clientContactId: contact.id))
|
||||
final client = state.clientState.get(clientId)!;
|
||||
final BuiltList<InvitationEntity> invitations = client.contacts
|
||||
.map((contact) => InvitationEntity(clientContactId: contact!.id))
|
||||
.toBuiltList();
|
||||
return rebuild((b) => b..invitations.replace(invitations));
|
||||
}
|
||||
|
|
@ -319,8 +318,8 @@ abstract class InvoiceEntity extends Object
|
|||
..documents.clear()
|
||||
..lineItems.replace(lineItems
|
||||
.where((lineItem) =>
|
||||
lineItem.typeId != InvoiceItemEntity.TYPE_UNPAID_FEE)
|
||||
.map((lineItem) => lineItem
|
||||
lineItem!.typeId != InvoiceItemEntity.TYPE_UNPAID_FEE)
|
||||
.map((lineItem) => lineItem!
|
||||
.rebuild((b) => b..typeId = InvoiceItemEntity.TYPE_STANDARD))
|
||||
.toList())
|
||||
..invitations.replace(
|
||||
|
|
@ -338,33 +337,33 @@ abstract class InvoiceEntity extends Object
|
|||
client ??= ClientEntity();
|
||||
|
||||
final exchangeRate = getExchangeRate(state.staticState.currencyMap,
|
||||
fromCurrencyId: state.company.currencyId,
|
||||
fromCurrencyId: state.company!.currencyId,
|
||||
toCurrencyId: client.currencyId);
|
||||
final settings = getClientSettings(state, client);
|
||||
|
||||
return rebuild((b) => b
|
||||
..exchangeRate = exchangeRate
|
||||
..taxName1 = state.company.numberOfInvoiceTaxRates >= 1 &&
|
||||
..taxName1 = state.company!.numberOfInvoiceTaxRates >= 1 &&
|
||||
(settings.defaultTaxName1 ?? '').isNotEmpty
|
||||
? settings.defaultTaxName1
|
||||
: taxName1
|
||||
..taxRate1 = state.company.numberOfInvoiceTaxRates >= 1 &&
|
||||
..taxRate1 = state.company!.numberOfInvoiceTaxRates >= 1 &&
|
||||
(settings.defaultTaxName1 ?? '').isNotEmpty
|
||||
? settings.defaultTaxRate1
|
||||
: taxRate1
|
||||
..taxName2 = state.company.numberOfInvoiceTaxRates >= 2 &&
|
||||
..taxName2 = state.company!.numberOfInvoiceTaxRates >= 2 &&
|
||||
(settings.defaultTaxName2 ?? '').isNotEmpty
|
||||
? settings.defaultTaxName2
|
||||
: taxName2
|
||||
..taxRate2 = state.company.numberOfInvoiceTaxRates >= 2 &&
|
||||
..taxRate2 = state.company!.numberOfInvoiceTaxRates >= 2 &&
|
||||
(settings.defaultTaxName2 ?? '').isNotEmpty
|
||||
? settings.defaultTaxRate2
|
||||
: taxRate2
|
||||
..taxName3 = state.company.numberOfInvoiceTaxRates >= 3 &&
|
||||
..taxName3 = state.company!.numberOfInvoiceTaxRates >= 3 &&
|
||||
(settings.defaultTaxName3 ?? '').isNotEmpty
|
||||
? settings.defaultTaxName3
|
||||
: taxName3
|
||||
..taxRate3 = state.company.numberOfInvoiceTaxRates >= 3 &&
|
||||
..taxRate3 = state.company!.numberOfInvoiceTaxRates >= 3 &&
|
||||
(settings.defaultTaxName3 ?? '').isNotEmpty
|
||||
? settings.defaultTaxRate3
|
||||
: taxRate3);
|
||||
|
|
@ -374,34 +373,34 @@ abstract class InvoiceEntity extends Object
|
|||
vendor ??= VendorEntity();
|
||||
|
||||
final exchangeRate = getExchangeRate(state.staticState.currencyMap,
|
||||
fromCurrencyId: state.company.currencyId,
|
||||
fromCurrencyId: state.company!.currencyId,
|
||||
toCurrencyId: vendor.currencyId);
|
||||
|
||||
final settings = state.company.settings;
|
||||
final settings = state.company!.settings;
|
||||
|
||||
return rebuild((b) => b
|
||||
..exchangeRate = exchangeRate
|
||||
..taxName1 = state.company.numberOfInvoiceTaxRates >= 1 &&
|
||||
..taxName1 = state.company!.numberOfInvoiceTaxRates >= 1 &&
|
||||
(settings.defaultTaxName1 ?? '').isNotEmpty
|
||||
? settings.defaultTaxName1
|
||||
: taxName1
|
||||
..taxRate1 = state.company.numberOfInvoiceTaxRates >= 1 &&
|
||||
..taxRate1 = state.company!.numberOfInvoiceTaxRates >= 1 &&
|
||||
(settings.defaultTaxName1 ?? '').isNotEmpty
|
||||
? settings.defaultTaxRate1
|
||||
: taxRate1
|
||||
..taxName2 = state.company.numberOfInvoiceTaxRates >= 2 &&
|
||||
..taxName2 = state.company!.numberOfInvoiceTaxRates >= 2 &&
|
||||
(settings.defaultTaxName2 ?? '').isNotEmpty
|
||||
? settings.defaultTaxName2
|
||||
: taxName2
|
||||
..taxRate2 = state.company.numberOfInvoiceTaxRates >= 2 &&
|
||||
..taxRate2 = state.company!.numberOfInvoiceTaxRates >= 2 &&
|
||||
(settings.defaultTaxName2 ?? '').isNotEmpty
|
||||
? settings.defaultTaxRate2
|
||||
: taxRate2
|
||||
..taxName3 = state.company.numberOfInvoiceTaxRates >= 3 &&
|
||||
..taxName3 = state.company!.numberOfInvoiceTaxRates >= 3 &&
|
||||
(settings.defaultTaxName3 ?? '').isNotEmpty
|
||||
? settings.defaultTaxName3
|
||||
: taxName3
|
||||
..taxRate3 = state.company.numberOfInvoiceTaxRates >= 3 &&
|
||||
..taxRate3 = state.company!.numberOfInvoiceTaxRates >= 3 &&
|
||||
(settings.defaultTaxName3 ?? '').isNotEmpty
|
||||
? settings.defaultTaxRate3
|
||||
: taxRate3);
|
||||
|
|
@ -505,9 +504,8 @@ abstract class InvoiceEntity extends Object
|
|||
@BuiltValueField(wireName: 'partial_due_date')
|
||||
String get partialDueDate;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'auto_bill')
|
||||
String get autoBill;
|
||||
String? get autoBill;
|
||||
|
||||
@BuiltValueField(wireName: 'custom_value1')
|
||||
String get customValue1;
|
||||
|
|
@ -556,25 +554,20 @@ abstract class InvoiceEntity extends Object
|
|||
@BuiltValueField(wireName: 'exchange_rate')
|
||||
double get exchangeRate;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'reminder1_sent')
|
||||
String get reminder1Sent;
|
||||
String? get reminder1Sent;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'reminder2_sent')
|
||||
String get reminder2Sent;
|
||||
String? get reminder2Sent;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'reminder3_sent')
|
||||
String get reminder3Sent;
|
||||
String? get reminder3Sent;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'reminder_last_sent')
|
||||
String get reminderLastSent;
|
||||
String? get reminderLastSent;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'frequency_id')
|
||||
String get frequencyId;
|
||||
String? get frequencyId;
|
||||
|
||||
@BuiltValueField(wireName: 'last_sent_date')
|
||||
String get lastSentDate;
|
||||
|
|
@ -585,35 +578,29 @@ abstract class InvoiceEntity extends Object
|
|||
@BuiltValueField(wireName: 'next_send_datetime')
|
||||
String get nextSendDatetime;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'remaining_cycles')
|
||||
int get remainingCycles;
|
||||
int? get remainingCycles;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'due_date_days')
|
||||
String get dueDateDays;
|
||||
String? get dueDateDays;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'invoice_id')
|
||||
String get invoiceId;
|
||||
String? get invoiceId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'recurring_id')
|
||||
String get recurringId;
|
||||
String? get recurringId;
|
||||
|
||||
@BuiltValueField(wireName: 'auto_bill_enabled')
|
||||
bool get autoBillEnabled;
|
||||
|
||||
@nullable
|
||||
String get filename;
|
||||
String? get filename;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'recurring_dates')
|
||||
BuiltList<InvoiceScheduleEntity> get recurringDates;
|
||||
BuiltList<InvoiceScheduleEntity>? get recurringDates;
|
||||
|
||||
@override
|
||||
@BuiltValueField(wireName: 'line_items')
|
||||
BuiltList<InvoiceItemEntity> get lineItems;
|
||||
BuiltList<InvoiceItemEntity?> get lineItems;
|
||||
|
||||
BuiltList<InvitationEntity> get invitations;
|
||||
|
||||
|
|
@ -675,38 +662,37 @@ abstract class InvoiceEntity extends Object
|
|||
return balanceOrAmount - (taxAmount * balanceOrAmount / amount);
|
||||
}
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(compare: false)
|
||||
int get loadedAt;
|
||||
int? get loadedAt;
|
||||
|
||||
List<InvoiceHistoryEntity> get history => activities
|
||||
List<InvoiceHistoryEntity?> get history => activities
|
||||
.where((activity) =>
|
||||
activity.history != null &&
|
||||
(activity.history.id ?? '').isNotEmpty &&
|
||||
activity.history.createdAt > 0)
|
||||
(activity.history!.id ?? '').isNotEmpty &&
|
||||
activity.history!.createdAt > 0)
|
||||
.map((activity) => activity.history)
|
||||
.toList();
|
||||
|
||||
bool get isLoaded => loadedAt != null && loadedAt > 0;
|
||||
bool get isLoaded => loadedAt != null && loadedAt! > 0;
|
||||
|
||||
bool get isStale {
|
||||
if (!isLoaded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt >
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt! >
|
||||
kMillisecondsToRefreshActivities;
|
||||
}
|
||||
|
||||
bool get hasTasks => lineItems.any((item) => item.isTask);
|
||||
bool get hasTasks => lineItems.any((item) => item!.isTask);
|
||||
|
||||
bool get hasProducts => lineItems.any((item) => !item.isTask);
|
||||
bool get hasProducts => lineItems.any((item) => !item!.isTask);
|
||||
|
||||
bool get hasExpenses => lineItems.any((item) => item.isExpense);
|
||||
bool get hasExpenses => lineItems.any((item) => item!.isExpense);
|
||||
|
||||
@override
|
||||
bool get isEditable {
|
||||
if (isDeleted) {
|
||||
if (isDeleted!) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -740,17 +726,17 @@ abstract class InvoiceEntity extends Object
|
|||
//String get custom_messages;
|
||||
|
||||
int compareTo({
|
||||
InvoiceEntity invoice,
|
||||
String sortField,
|
||||
bool sortAscending,
|
||||
BuiltMap<String, ClientEntity> clientMap,
|
||||
BuiltMap<String, VendorEntity> vendorMap,
|
||||
BuiltMap<String, UserEntity> userMap,
|
||||
String recurringPrefix = '',
|
||||
InvoiceEntity? invoice,
|
||||
String? sortField,
|
||||
required bool sortAscending,
|
||||
required BuiltMap<String?, ClientEntity?> clientMap,
|
||||
required BuiltMap<String?, VendorEntity?> vendorMap,
|
||||
BuiltMap<String?, UserEntity?>? userMap,
|
||||
String? recurringPrefix = '',
|
||||
}) {
|
||||
int response = 0;
|
||||
final InvoiceEntity invoiceA = sortAscending ? this : invoice;
|
||||
final InvoiceEntity invoiceB = sortAscending ? invoice : this;
|
||||
final InvoiceEntity invoiceA = sortAscending ? this : invoice!;
|
||||
final InvoiceEntity invoiceB = sortAscending ? invoice! : this;
|
||||
final clientA = clientMap[invoiceA.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[invoiceB.clientId] ?? ClientEntity();
|
||||
final vendorA = vendorMap[invoiceA.vendorId] ?? VendorEntity();
|
||||
|
|
@ -762,11 +748,11 @@ abstract class InvoiceEntity extends Object
|
|||
var invoiceBNumber =
|
||||
(invoiceB.number ?? '').isEmpty ? 'ZZZZZZZZZZ' : invoiceB.number;
|
||||
invoiceANumber = (recurringPrefix ?? '').isNotEmpty &&
|
||||
invoiceANumber.startsWith(recurringPrefix)
|
||||
invoiceANumber.startsWith(recurringPrefix!)
|
||||
? invoiceANumber.replaceFirst(recurringPrefix, '')
|
||||
: invoiceANumber;
|
||||
invoiceBNumber = (recurringPrefix ?? '').isNotEmpty &&
|
||||
invoiceBNumber.startsWith(recurringPrefix)
|
||||
invoiceBNumber.startsWith(recurringPrefix!)
|
||||
? invoiceBNumber.replaceFirst(recurringPrefix, '')
|
||||
: invoiceBNumber;
|
||||
response = compareNatural(
|
||||
|
|
@ -791,17 +777,17 @@ abstract class InvoiceEntity extends Object
|
|||
response = invoiceA.lastSentDate.compareTo(invoiceB.lastSentDate);
|
||||
break;
|
||||
case InvoiceFields.reminder1Sent:
|
||||
response = invoiceA.reminder1Sent.compareTo(invoiceB.reminder1Sent);
|
||||
response = invoiceA.reminder1Sent!.compareTo(invoiceB.reminder1Sent!);
|
||||
break;
|
||||
case InvoiceFields.reminder2Sent:
|
||||
response = invoiceA.reminder2Sent.compareTo(invoiceB.reminder2Sent);
|
||||
response = invoiceA.reminder2Sent!.compareTo(invoiceB.reminder2Sent!);
|
||||
break;
|
||||
case InvoiceFields.reminder3Sent:
|
||||
response = invoiceA.reminder3Sent.compareTo(invoiceB.reminder3Sent);
|
||||
response = invoiceA.reminder3Sent!.compareTo(invoiceB.reminder3Sent!);
|
||||
break;
|
||||
case InvoiceFields.reminderLastSent:
|
||||
response =
|
||||
invoiceA.reminderLastSent.compareTo(invoiceB.reminderLastSent);
|
||||
invoiceA.reminderLastSent!.compareTo(invoiceB.reminderLastSent!);
|
||||
break;
|
||||
case InvoiceFields.balance:
|
||||
response = invoiceA.balanceOrAmount.compareTo(invoiceB.balanceOrAmount);
|
||||
|
|
@ -842,14 +828,14 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
break;
|
||||
case EntityFields.assignedTo:
|
||||
final userA = userMap[invoiceA.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap![invoiceA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[invoiceB.assignedUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdBy:
|
||||
final userA = userMap[invoiceA.createdUserId] ?? UserEntity();
|
||||
final userA = userMap![invoiceA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[invoiceB.createdUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
|
|
@ -894,13 +880,13 @@ abstract class InvoiceEntity extends Object
|
|||
response = invoiceB.isViewed ? 1 : -1;
|
||||
break;
|
||||
case RecurringInvoiceFields.remainingCycles:
|
||||
response = invoiceA.remainingCycles.compareTo(invoiceB.remainingCycles);
|
||||
response = invoiceA.remainingCycles!.compareTo(invoiceB.remainingCycles!);
|
||||
break;
|
||||
case RecurringInvoiceFields.frequency:
|
||||
response = invoiceA.frequencyId.compareTo(invoiceB.frequencyId);
|
||||
response = invoiceA.frequencyId!.compareTo(invoiceB.frequencyId!);
|
||||
break;
|
||||
case RecurringInvoiceFields.autoBill:
|
||||
response = invoiceA.autoBill.compareTo(invoiceB.autoBill);
|
||||
response = invoiceA.autoBill!.compareTo(invoiceB.autoBill!);
|
||||
break;
|
||||
case InvoiceFields.clientCity:
|
||||
response = clientA.city.compareTo(clientB.city);
|
||||
|
|
@ -925,7 +911,7 @@ abstract class InvoiceEntity extends Object
|
|||
vendorA.name.toLowerCase().compareTo(vendorB.name.toLowerCase());
|
||||
break;
|
||||
case InvoiceFields.dueDateDays:
|
||||
response = invoiceA.dueDateDays.compareTo(invoiceB.dueDateDays);
|
||||
response = invoiceA.dueDateDays!.compareTo(invoiceB.dueDateDays!);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by invoice.$sortField is not implemented');
|
||||
|
|
@ -933,7 +919,7 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = invoice.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
response = invoice!.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
@ -969,9 +955,9 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
for (var i = 0; i < lineItems.length; i++) {
|
||||
final lineItem = lineItems[i];
|
||||
final lineItem = lineItems[i]!;
|
||||
final isMatch = matchesStrings(
|
||||
haystacks: [
|
||||
lineItem.productKey,
|
||||
|
|
@ -1007,7 +993,7 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
poNumber,
|
||||
|
|
@ -1025,18 +1011,18 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext);
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext!);
|
||||
final state = store.state;
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted!) {
|
||||
if (userCompany!.canEditEntity(this)) {
|
||||
if (includeEdit && !multiselect) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
|
@ -1088,7 +1074,7 @@ abstract class InvoiceEntity extends Object
|
|||
if (!isRecurring) {
|
||||
actions.add(EntityAction.printPdf);
|
||||
actions.add(EntityAction.download);
|
||||
if (isInvoice && state.company.settings.enableEInvoice == true) {
|
||||
if (isInvoice && state.company!.settings.enableEInvoice == true) {
|
||||
actions.add(EntityAction.eInvoice);
|
||||
}
|
||||
}
|
||||
|
|
@ -1158,7 +1144,7 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (!isDeleted && multiselect) {
|
||||
if (!isDeleted! && multiselect) {
|
||||
actions.add(EntityAction.documents);
|
||||
}
|
||||
|
||||
|
|
@ -1168,7 +1154,7 @@ abstract class InvoiceEntity extends Object
|
|||
|
||||
if (!multiselect && isOld) {
|
||||
int countOtherTypes = 0;
|
||||
if (userCompany.canCreate(EntityType.invoice)) {
|
||||
if (userCompany!.canCreate(EntityType.invoice)) {
|
||||
countOtherTypes++;
|
||||
if (isInvoice) {
|
||||
actions.add(EntityAction.cloneToInvoice);
|
||||
|
|
@ -1221,8 +1207,8 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (userCompany.canEditEntity(this) &&
|
||||
!isDeleted &&
|
||||
if (userCompany!.canEditEntity(this) &&
|
||||
!isDeleted! &&
|
||||
!isCancelledOrReversed) {
|
||||
if (isInvoice && isSent) {
|
||||
if (!isPaid) {
|
||||
|
|
@ -1280,8 +1266,8 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
bool isBetween(String startDate, String endDate) {
|
||||
return startDate.compareTo(date) <= 0 && endDate.compareTo(date) >= 0;
|
||||
bool isBetween(String startDate, String? endDate) {
|
||||
return startDate.compareTo(date) <= 0 && endDate!.compareTo(date) >= 0;
|
||||
}
|
||||
|
||||
bool get isInvoice => entityType == EntityType.invoice;
|
||||
|
|
@ -1357,8 +1343,8 @@ abstract class InvoiceEntity extends Object
|
|||
statusId == kRecurringInvoiceStatusActive &&
|
||||
(lastSentDate ?? '').isEmpty;
|
||||
|
||||
String get calculateRemainingCycles =>
|
||||
remainingCycles == -1 ? 'endless' : remainingCycles;
|
||||
String? get calculateRemainingCycles =>
|
||||
remainingCycles == -1 ? 'endless' : remainingCycles as String?;
|
||||
|
||||
String get calculatedStatusId {
|
||||
if (isRecurring) {
|
||||
|
|
@ -1404,24 +1390,22 @@ abstract class InvoiceEntity extends Object
|
|||
return false;
|
||||
}
|
||||
|
||||
return !isDeleted &&
|
||||
return !isDeleted! &&
|
||||
!isRecurring &&
|
||||
isSent &&
|
||||
isUnpaid &&
|
||||
DateTime.tryParse(date)
|
||||
DateTime.tryParse(date)!
|
||||
.isBefore(DateTime.now().subtract(Duration(days: 1)));
|
||||
}
|
||||
|
||||
InvitationEntity getInvitationForClientContact(ClientContactEntity contact) {
|
||||
return invitations.firstWhere(
|
||||
(invitation) => invitation.clientContactId == contact.id,
|
||||
orElse: () => null);
|
||||
InvitationEntity? getInvitationForClientContact(ClientContactEntity? contact) {
|
||||
return invitations.firstWhereOrNull(
|
||||
(invitation) => invitation.clientContactId == contact!.id);
|
||||
}
|
||||
|
||||
InvitationEntity getInvitationForVendorContact(VendorContactEntity contact) {
|
||||
return invitations.firstWhere(
|
||||
(invitation) => invitation.vendorContactId == contact.id,
|
||||
orElse: () => null);
|
||||
InvitationEntity? getInvitationForVendorContact(VendorContactEntity? contact) {
|
||||
return invitations.firstWhereOrNull(
|
||||
(invitation) => invitation.vendorContactId == contact!.id);
|
||||
}
|
||||
|
||||
/// Gets taxes in the form { taxName1: { amount: 0, paid: 0} , ... }
|
||||
|
|
@ -1465,7 +1449,7 @@ abstract class InvoiceEntity extends Object
|
|||
}
|
||||
|
||||
for (final item in lineItems) {
|
||||
final itemTaxable = getItemTaxable(item, amount, precision);
|
||||
final itemTaxable = getItemTaxable(item!, amount, precision);
|
||||
|
||||
if (item.taxName1.isNotEmpty) {
|
||||
final itemTaxAmount = calculateAmount(itemTaxable, item.taxRate1);
|
||||
|
|
@ -1526,8 +1510,8 @@ abstract class InvoiceEntity extends Object
|
|||
'paid': 0.0
|
||||
});
|
||||
|
||||
map[key]['amount'] += amount;
|
||||
map[key]['paid'] += paid;
|
||||
map[key]!['amount'] += amount;
|
||||
map[key]!['paid'] += paid;
|
||||
}
|
||||
|
||||
String get invitationLink =>
|
||||
|
|
@ -1610,7 +1594,7 @@ class TaskItemFields {
|
|||
|
||||
abstract class InvoiceItemEntity
|
||||
implements Built<InvoiceItemEntity, InvoiceItemEntityBuilder> {
|
||||
factory InvoiceItemEntity({String productKey, double quantity}) {
|
||||
factory InvoiceItemEntity({String? productKey, double? quantity}) {
|
||||
return _$InvoiceItemEntity._(
|
||||
productKey: productKey ?? '',
|
||||
notes: '',
|
||||
|
|
@ -1677,9 +1661,8 @@ abstract class InvoiceItemEntity
|
|||
@BuiltValueField(wireName: 'tax_rate3')
|
||||
double get taxRate3;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'type_id')
|
||||
String get typeId;
|
||||
String? get typeId;
|
||||
|
||||
@BuiltValueField(wireName: 'custom_value1')
|
||||
String get customValue1;
|
||||
|
|
@ -1695,16 +1678,13 @@ abstract class InvoiceItemEntity
|
|||
|
||||
double get discount;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'task_id')
|
||||
String get taskId;
|
||||
String? get taskId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'expense_id')
|
||||
String get expenseId;
|
||||
String? get expenseId;
|
||||
|
||||
@nullable
|
||||
int get createdAt;
|
||||
int? get createdAt;
|
||||
|
||||
@BuiltValueField(wireName: 'tax_id')
|
||||
String get taxCategoryId;
|
||||
|
|
@ -1793,21 +1773,21 @@ abstract class InvoiceItemEntity
|
|||
return parts.join(', ');
|
||||
}
|
||||
|
||||
InvoiceItemEntity applyTax(TaxRateEntity taxRate,
|
||||
InvoiceItemEntity applyTax(TaxRateEntity? taxRate,
|
||||
{bool isSecond = false, bool isThird = false}) {
|
||||
InvoiceItemEntity item;
|
||||
|
||||
if (isThird) {
|
||||
item = rebuild((b) => b
|
||||
..taxRate3 = taxRate.rate
|
||||
..taxRate3 = taxRate!.rate
|
||||
..taxName3 = taxRate.name);
|
||||
} else if (isSecond) {
|
||||
item = rebuild((b) => b
|
||||
..taxRate2 = taxRate.rate
|
||||
..taxRate2 = taxRate!.rate
|
||||
..taxName2 = taxRate.name);
|
||||
} else {
|
||||
item = rebuild((b) => b
|
||||
..taxRate1 = taxRate.rate
|
||||
..taxRate1 = taxRate!.rate
|
||||
..taxName1 = taxRate.name);
|
||||
}
|
||||
|
||||
|
|
@ -1827,8 +1807,8 @@ abstract class InvitationEntity extends Object
|
|||
with BaseEntity, SelectableEntity
|
||||
implements Built<InvitationEntity, InvitationEntityBuilder> {
|
||||
factory InvitationEntity({
|
||||
String clientContactId,
|
||||
String vendorContactId,
|
||||
String? clientContactId,
|
||||
String? vendorContactId,
|
||||
}) {
|
||||
return _$InvitationEntity._(
|
||||
id: BaseEntity.nextId,
|
||||
|
|
@ -1876,9 +1856,8 @@ abstract class InvitationEntity extends Object
|
|||
@BuiltValueField(wireName: 'opened_date', compare: false)
|
||||
String get openedDate;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'email_status', compare: false)
|
||||
String get emailStatus;
|
||||
String? get emailStatus;
|
||||
|
||||
String get downloadLink =>
|
||||
'$link/download?t=${DateTime.now().millisecondsSinceEpoch}';
|
||||
|
|
@ -1891,7 +1870,7 @@ abstract class InvitationEntity extends Object
|
|||
String get borderlessLink => '$silentLink&borderless=true';
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1900,7 +1879,7 @@ abstract class InvitationEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -1914,7 +1893,7 @@ abstract class InvitationEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
@ -1955,7 +1934,7 @@ abstract class InvoiceScheduleEntity
|
|||
|
||||
abstract class InvoiceHistoryEntity
|
||||
implements Built<InvoiceHistoryEntity, InvoiceHistoryEntityBuilder> {
|
||||
factory InvoiceHistoryEntity({String contactId}) {
|
||||
factory InvoiceHistoryEntity({String? contactId}) {
|
||||
return _$InvoiceHistoryEntity._(
|
||||
id: '',
|
||||
createdAt: 0,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -43,7 +43,7 @@ abstract class CalculateInvoiceTotal {
|
|||
|
||||
bool get usesInclusiveTaxes;
|
||||
|
||||
BuiltList<InvoiceItemEntity> get lineItems;
|
||||
BuiltList<InvoiceItemEntity?> get lineItems;
|
||||
|
||||
double _calculateTaxAmount(
|
||||
double amount, double rate, bool useInclusiveTaxes, int precision) {
|
||||
|
|
@ -57,13 +57,13 @@ abstract class CalculateInvoiceTotal {
|
|||
}
|
||||
|
||||
Map<String, double> calculateTaxes(
|
||||
{@required bool useInclusiveTaxes, @required int precision}) {
|
||||
{required bool useInclusiveTaxes, required int precision}) {
|
||||
double total = calculateSubtotal(precision: precision);
|
||||
double taxAmount;
|
||||
final map = <String, double>{};
|
||||
|
||||
lineItems.forEach((item) {
|
||||
final double taxRate1 = round(item.taxRate1, 3);
|
||||
final double taxRate1 = round(item!.taxRate1, 3);
|
||||
final double taxRate2 = round(item.taxRate2, 3);
|
||||
final double taxRate3 = round(item.taxRate3, 3);
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ abstract class CalculateInvoiceTotal {
|
|||
double total = 0;
|
||||
|
||||
lineItems.forEach((invoiceItem) {
|
||||
double lineTotal = invoiceItem.quantity * invoiceItem.cost;
|
||||
double lineTotal = invoiceItem!.quantity * invoiceItem.cost;
|
||||
|
||||
if (invoiceItem.discount != 0) {
|
||||
if (isAmountDiscount) {
|
||||
|
|
@ -209,12 +209,12 @@ abstract class CalculateInvoiceTotal {
|
|||
return round(lineTotal, precision);
|
||||
}
|
||||
|
||||
double calculateTotal({@required int precision}) {
|
||||
double calculateTotal({required int precision}) {
|
||||
double total = calculateSubtotal(precision: precision);
|
||||
double itemTax = 0.0;
|
||||
|
||||
lineItems.forEach((item) {
|
||||
final double qty = round(item.quantity, 5);
|
||||
final double qty = round(item!.quantity, 5);
|
||||
final double cost = round(item.cost, 5);
|
||||
final double itemDiscount = round(item.discount, 5);
|
||||
final double taxRate1 = round(item.taxRate1, 3);
|
||||
|
|
@ -302,11 +302,11 @@ abstract class CalculateInvoiceTotal {
|
|||
return total;
|
||||
}
|
||||
|
||||
double calculateSubtotal({@required int precision}) {
|
||||
double calculateSubtotal({required int precision}) {
|
||||
var total = 0.0;
|
||||
|
||||
lineItems.forEach((item) {
|
||||
final double qty = round(item.quantity, 5);
|
||||
final double qty = round(item!.quantity, 5);
|
||||
final double cost = round(item.cost, 5);
|
||||
final double discount = round(item.discount, 5);
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class EntityAction extends EnumClass {
|
|||
return value;
|
||||
}
|
||||
|
||||
static EntityAction newEntityType(EntityType entityType) {
|
||||
static EntityAction? newEntityType(EntityType? entityType) {
|
||||
switch (entityType) {
|
||||
case EntityType.client:
|
||||
return EntityAction.newClient;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import 'package:built_value/built_value.dart';
|
|||
import 'package:built_value/serializer.dart';
|
||||
|
||||
// Project imports:
|
||||
import 'package:collection/collection.dart' show IterableExtension;
|
||||
import 'package:invoiceninja_flutter/constants.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
|
|
@ -76,7 +77,7 @@ class PaymentFields {
|
|||
abstract class PaymentEntity extends Object
|
||||
with BaseEntity, SelectableEntity, BelongsToClient
|
||||
implements Built<PaymentEntity, PaymentEntityBuilder> {
|
||||
factory PaymentEntity({String id, AppState state, ClientEntity client}) {
|
||||
factory PaymentEntity({String? id, AppState? state, ClientEntity? client}) {
|
||||
final settings = getClientSettings(state, client);
|
||||
|
||||
return _$PaymentEntity._(
|
||||
|
|
@ -141,9 +142,8 @@ abstract class PaymentEntity extends Object
|
|||
|
||||
String get number;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'idempotency_key')
|
||||
String get idempotencyKey;
|
||||
String? get idempotencyKey;
|
||||
|
||||
@override
|
||||
@BuiltValueField(wireName: 'client_id')
|
||||
|
|
@ -208,14 +208,11 @@ abstract class PaymentEntity extends Object
|
|||
@BuiltValueField(wireName: 'gateway_type_id')
|
||||
String get gatewayTypeId;
|
||||
|
||||
@nullable
|
||||
bool get isApplying;
|
||||
bool? get isApplying;
|
||||
|
||||
@nullable
|
||||
bool get sendEmail;
|
||||
bool? get sendEmail;
|
||||
|
||||
@nullable
|
||||
bool get gatewayRefund;
|
||||
bool? get gatewayRefund;
|
||||
|
||||
bool get hasExchangeRate => exchangeRate != 1 && exchangeRate != 0;
|
||||
|
||||
|
|
@ -244,115 +241,115 @@ abstract class PaymentEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo({
|
||||
PaymentEntity payment,
|
||||
String sortField,
|
||||
bool sortAscending,
|
||||
BuiltMap<String, InvoiceEntity> invoiceMap,
|
||||
BuiltMap<String, ClientEntity> clientMap,
|
||||
BuiltMap<String, UserEntity> userMap,
|
||||
BuiltMap<String, PaymentTypeEntity> paymentTypeMap,
|
||||
PaymentEntity? payment,
|
||||
String? sortField,
|
||||
required bool sortAscending,
|
||||
BuiltMap<String?, InvoiceEntity?>? invoiceMap,
|
||||
BuiltMap<String?, ClientEntity?>? clientMap,
|
||||
BuiltMap<String?, UserEntity?>? userMap,
|
||||
BuiltMap<String?, PaymentTypeEntity?>? paymentTypeMap,
|
||||
}) {
|
||||
int response = 0;
|
||||
final PaymentEntity paymentA = sortAscending ? this : payment;
|
||||
final PaymentEntity paymentB = sortAscending ? payment : this;
|
||||
final PaymentEntity? paymentA = sortAscending ? this : payment;
|
||||
final PaymentEntity? paymentB = sortAscending ? payment : this;
|
||||
|
||||
switch (sortField) {
|
||||
case PaymentFields.amount:
|
||||
response = paymentA.amount.compareTo(paymentB.amount);
|
||||
response = paymentA!.amount.compareTo(paymentB!.amount);
|
||||
break;
|
||||
case PaymentFields.exchangeRate:
|
||||
response = paymentA.exchangeRate.compareTo(paymentB.exchangeRate);
|
||||
response = paymentA!.exchangeRate.compareTo(paymentB!.exchangeRate);
|
||||
break;
|
||||
case PaymentFields.refunded:
|
||||
response = paymentA.refunded.compareTo(paymentB.refunded);
|
||||
response = paymentA!.refunded.compareTo(paymentB!.refunded);
|
||||
break;
|
||||
case PaymentFields.number:
|
||||
response = paymentA.number
|
||||
response = paymentA!.number
|
||||
.toLowerCase()
|
||||
.compareTo(paymentB.number.toLowerCase());
|
||||
.compareTo(paymentB!.number.toLowerCase());
|
||||
break;
|
||||
case PaymentFields.transactionReference:
|
||||
response = paymentA.transactionReference
|
||||
.compareTo(paymentB.transactionReference);
|
||||
response = paymentA!.transactionReference
|
||||
.compareTo(paymentB!.transactionReference);
|
||||
break;
|
||||
case PaymentFields.date:
|
||||
response = paymentA.date.compareTo(paymentB.date);
|
||||
response = paymentA!.date.compareTo(paymentB!.date);
|
||||
break;
|
||||
case PaymentFields.privateNotes:
|
||||
response = paymentA.privateNotes
|
||||
response = paymentA!.privateNotes
|
||||
.toLowerCase()
|
||||
.compareTo(paymentB.date.toLowerCase());
|
||||
.compareTo(paymentB!.date.toLowerCase());
|
||||
break;
|
||||
case EntityFields.updatedAt:
|
||||
response = paymentA.updatedAt.compareTo(paymentB.updatedAt);
|
||||
response = paymentA!.updatedAt.compareTo(paymentB!.updatedAt);
|
||||
break;
|
||||
case EntityFields.createdAt:
|
||||
response = paymentA.createdAt.compareTo(paymentB.createdAt);
|
||||
response = paymentA!.createdAt.compareTo(paymentB!.createdAt);
|
||||
break;
|
||||
case EntityFields.archivedAt:
|
||||
response = paymentA.archivedAt.compareTo(paymentB.archivedAt);
|
||||
response = paymentA!.archivedAt.compareTo(paymentB!.archivedAt);
|
||||
break;
|
||||
case PaymentFields.status:
|
||||
response = paymentA.statusId.compareTo(paymentB.statusId);
|
||||
response = paymentA!.statusId.compareTo(paymentB!.statusId);
|
||||
break;
|
||||
case PaymentFields.customValue1:
|
||||
response = paymentA.customValue1
|
||||
response = paymentA!.customValue1
|
||||
.toLowerCase()
|
||||
.compareTo(paymentB.customValue1.toLowerCase());
|
||||
.compareTo(paymentB!.customValue1.toLowerCase());
|
||||
break;
|
||||
case PaymentFields.customValue2:
|
||||
response = paymentA.customValue2
|
||||
response = paymentA!.customValue2
|
||||
.toLowerCase()
|
||||
.compareTo(paymentB.customValue2.toLowerCase());
|
||||
.compareTo(paymentB!.customValue2.toLowerCase());
|
||||
break;
|
||||
case PaymentFields.customValue3:
|
||||
response = paymentA.customValue3
|
||||
response = paymentA!.customValue3
|
||||
.toLowerCase()
|
||||
.compareTo(paymentB.customValue3.toLowerCase());
|
||||
.compareTo(paymentB!.customValue3.toLowerCase());
|
||||
break;
|
||||
case PaymentFields.customValue4:
|
||||
response = paymentA.customValue4
|
||||
response = paymentA!.customValue4
|
||||
.toLowerCase()
|
||||
.compareTo(paymentB.customValue4.toLowerCase());
|
||||
.compareTo(paymentB!.customValue4.toLowerCase());
|
||||
break;
|
||||
case PaymentFields.invoiceNumber:
|
||||
final invoiceA = invoiceMap[paymentA.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceB = invoiceMap[paymentB.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceA = invoiceMap![paymentA!.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceB = invoiceMap[paymentB!.invoiceId] ?? InvoiceEntity();
|
||||
response = invoiceA.number
|
||||
.toLowerCase()
|
||||
.compareTo(invoiceB.number.toLowerCase());
|
||||
break;
|
||||
case PaymentFields.client:
|
||||
final clientA = clientMap[paymentA.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[paymentB.clientId] ?? ClientEntity();
|
||||
final clientA = clientMap![paymentA!.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[paymentB!.clientId] ?? ClientEntity();
|
||||
response = clientA.displayName
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.displayName.toLowerCase());
|
||||
break;
|
||||
case PaymentFields.type:
|
||||
final typeA = paymentTypeMap[paymentA.typeId] ?? PaymentTypeEntity();
|
||||
final typeB = paymentTypeMap[paymentB.typeId] ?? PaymentTypeEntity();
|
||||
final typeA = paymentTypeMap![paymentA!.typeId] ?? PaymentTypeEntity();
|
||||
final typeB = paymentTypeMap[paymentB!.typeId] ?? PaymentTypeEntity();
|
||||
return typeA.name.toLowerCase().compareTo(typeB.name.toLowerCase());
|
||||
break;
|
||||
case EntityFields.assignedTo:
|
||||
final userA = userMap[paymentA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[paymentB.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap![paymentA!.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[paymentB!.assignedUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdBy:
|
||||
final userA = userMap[paymentA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[paymentB.createdUserId] ?? UserEntity();
|
||||
final userA = userMap![paymentA!.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[paymentB!.createdUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.state:
|
||||
final stateA =
|
||||
EntityState.valueOf(paymentA.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(paymentA!.entityState) ?? EntityState.active;
|
||||
final stateB =
|
||||
EntityState.valueOf(paymentB.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(paymentB!.entityState) ?? EntityState.active;
|
||||
response =
|
||||
stateA.name.toLowerCase().compareTo(stateB.name.toLowerCase());
|
||||
break;
|
||||
|
|
@ -362,7 +359,7 @@ abstract class PaymentEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = payment.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
response = payment!.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
@ -384,7 +381,7 @@ abstract class PaymentEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
number,
|
||||
|
|
@ -400,7 +397,7 @@ abstract class PaymentEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
number,
|
||||
|
|
@ -416,16 +413,16 @@ abstract class PaymentEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted!) {
|
||||
if (userCompany!.canEditEntity(this)) {
|
||||
if (!multiselect) {
|
||||
if (includeEdit) {
|
||||
actions.add(EntityAction.edit);
|
||||
|
|
@ -452,7 +449,7 @@ abstract class PaymentEntity extends Object
|
|||
|
||||
// We're overriding the default behavior to
|
||||
// prevent users from restoring deleted payments
|
||||
if (userCompany.canEditEntity(this) && isArchived) {
|
||||
if (userCompany!.canEditEntity(this) && isArchived) {
|
||||
actions.add(EntityAction.restore);
|
||||
}
|
||||
|
||||
|
|
@ -479,10 +476,9 @@ abstract class PaymentEntity extends Object
|
|||
List<PaymentableEntity> get creditPaymentables =>
|
||||
paymentables.where((p) => p.entityType == EntityType.credit).toList();
|
||||
|
||||
String get invoiceId {
|
||||
final invoicePaymentables = paymentables.firstWhere(
|
||||
(p) => p.entityType == EntityType.invoice,
|
||||
orElse: () => null);
|
||||
String? get invoiceId {
|
||||
final invoicePaymentables = paymentables.firstWhereOrNull(
|
||||
(p) => p.entityType == EntityType.invoice);
|
||||
|
||||
if (invoicePaymentables == null) {
|
||||
return null;
|
||||
|
|
@ -491,8 +487,8 @@ abstract class PaymentEntity extends Object
|
|||
return invoicePaymentables.isEmpty ? null : invoicePaymentables.invoiceId;
|
||||
}
|
||||
|
||||
bool isBetween(String startDate, String endDate) {
|
||||
return startDate.compareTo(date) <= 0 && endDate.compareTo(date) >= 0;
|
||||
bool isBetween(String startDate, String? endDate) {
|
||||
return startDate.compareTo(date) <= 0 && endDate!.compareTo(date) >= 0;
|
||||
}
|
||||
|
||||
bool get isOnline => (companyGatewayId ?? '').isNotEmpty;
|
||||
|
|
@ -509,7 +505,7 @@ abstract class PaymentEntity extends Object
|
|||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
||||
double get completedAmount {
|
||||
if (isDeleted) {
|
||||
if (isDeleted!) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -532,7 +528,7 @@ abstract class PaymentableEntity extends Object
|
|||
with SelectableEntity
|
||||
implements Built<PaymentableEntity, PaymentableEntityBuilder> {
|
||||
factory PaymentableEntity(
|
||||
{String id, String invoiceId, String creditId, double amount}) {
|
||||
{String? id, String? invoiceId, String? creditId, double? amount}) {
|
||||
return _$PaymentableEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
invoiceId: invoiceId ?? '',
|
||||
|
|
@ -561,21 +557,17 @@ abstract class PaymentableEntity extends Object
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'created_at')
|
||||
int get createdAt;
|
||||
int? get createdAt;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'updated_at')
|
||||
int get updatedAt;
|
||||
int? get updatedAt;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'invoice_id')
|
||||
String get invoiceId;
|
||||
String? get invoiceId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'credit_id')
|
||||
String get creditId;
|
||||
String? get creditId;
|
||||
|
||||
double get amount;
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -54,7 +54,7 @@ class PaymentTermFields {
|
|||
abstract class PaymentTermEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<PaymentTermEntity, PaymentTermEntityBuilder> {
|
||||
factory PaymentTermEntity({String id, AppState state}) {
|
||||
factory PaymentTermEntity({String? id, AppState? state}) {
|
||||
return _$PaymentTermEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -101,7 +101,7 @@ abstract class PaymentTermEntity extends Object
|
|||
numDays.compareTo(paymentTerm.numDays);
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
'$numDays',
|
||||
|
|
@ -111,7 +111,7 @@ abstract class PaymentTermEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
//
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$PaymentTermListResponseSerializer
|
|||
final String wireName = 'PaymentTermListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, PaymentTermListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$PaymentTermListResponseSerializer
|
|||
|
||||
@override
|
||||
PaymentTermListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PaymentTermListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(PaymentTermEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(PaymentTermEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$PaymentTermItemResponseSerializer
|
|||
final String wireName = 'PaymentTermItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, PaymentTermItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(PaymentTermEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$PaymentTermItemResponseSerializer
|
|||
|
||||
@override
|
||||
PaymentTermItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PaymentTermItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(PaymentTermEntity))
|
||||
specifiedType: const FullType(PaymentTermEntity))!
|
||||
as PaymentTermEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -117,9 +117,9 @@ class _$PaymentTermEntitySerializer
|
|||
final String wireName = 'PaymentTermEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, PaymentTermEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, PaymentTermEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'num_days',
|
||||
|
|
@ -136,7 +136,7 @@ class _$PaymentTermEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -170,55 +170,55 @@ class _$PaymentTermEntitySerializer
|
|||
|
||||
@override
|
||||
PaymentTermEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PaymentTermEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'num_days':
|
||||
result.numDays = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -232,10 +232,10 @@ class _$PaymentTermListResponse extends PaymentTermListResponse {
|
|||
final BuiltList<PaymentTermEntity> data;
|
||||
|
||||
factory _$PaymentTermListResponse(
|
||||
[void Function(PaymentTermListResponseBuilder) updates]) =>
|
||||
[void Function(PaymentTermListResponseBuilder)? updates]) =>
|
||||
(new PaymentTermListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$PaymentTermListResponse._({this.data}) : super._() {
|
||||
_$PaymentTermListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'PaymentTermListResponse', 'data');
|
||||
}
|
||||
|
|
@ -255,10 +255,10 @@ class _$PaymentTermListResponse extends PaymentTermListResponse {
|
|||
return other is PaymentTermListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -276,12 +276,12 @@ class _$PaymentTermListResponse extends PaymentTermListResponse {
|
|||
class PaymentTermListResponseBuilder
|
||||
implements
|
||||
Builder<PaymentTermListResponse, PaymentTermListResponseBuilder> {
|
||||
_$PaymentTermListResponse _$v;
|
||||
_$PaymentTermListResponse? _$v;
|
||||
|
||||
ListBuilder<PaymentTermEntity> _data;
|
||||
ListBuilder<PaymentTermEntity>? _data;
|
||||
ListBuilder<PaymentTermEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<PaymentTermEntity>();
|
||||
set data(ListBuilder<PaymentTermEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<PaymentTermEntity>? data) => _$this._data = data;
|
||||
|
||||
PaymentTermListResponseBuilder();
|
||||
|
||||
|
|
@ -301,7 +301,7 @@ class PaymentTermListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PaymentTermListResponseBuilder) updates) {
|
||||
void update(void Function(PaymentTermListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ class PaymentTermListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$PaymentTermListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -333,10 +333,10 @@ class _$PaymentTermItemResponse extends PaymentTermItemResponse {
|
|||
final PaymentTermEntity data;
|
||||
|
||||
factory _$PaymentTermItemResponse(
|
||||
[void Function(PaymentTermItemResponseBuilder) updates]) =>
|
||||
[void Function(PaymentTermItemResponseBuilder)? updates]) =>
|
||||
(new PaymentTermItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$PaymentTermItemResponse._({this.data}) : super._() {
|
||||
_$PaymentTermItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'PaymentTermItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -356,10 +356,10 @@ class _$PaymentTermItemResponse extends PaymentTermItemResponse {
|
|||
return other is PaymentTermItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -377,12 +377,12 @@ class _$PaymentTermItemResponse extends PaymentTermItemResponse {
|
|||
class PaymentTermItemResponseBuilder
|
||||
implements
|
||||
Builder<PaymentTermItemResponse, PaymentTermItemResponseBuilder> {
|
||||
_$PaymentTermItemResponse _$v;
|
||||
_$PaymentTermItemResponse? _$v;
|
||||
|
||||
PaymentTermEntityBuilder _data;
|
||||
PaymentTermEntityBuilder? _data;
|
||||
PaymentTermEntityBuilder get data =>
|
||||
_$this._data ??= new PaymentTermEntityBuilder();
|
||||
set data(PaymentTermEntityBuilder data) => _$this._data = data;
|
||||
set data(PaymentTermEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
PaymentTermItemResponseBuilder();
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ class PaymentTermItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PaymentTermItemResponseBuilder) updates) {
|
||||
void update(void Function(PaymentTermItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -414,7 +414,7 @@ class PaymentTermItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$PaymentTermItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -435,7 +435,7 @@ class _$PaymentTermEntity extends PaymentTermEntity {
|
|||
@override
|
||||
final int numDays;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -443,29 +443,29 @@ class _$PaymentTermEntity extends PaymentTermEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$PaymentTermEntity(
|
||||
[void Function(PaymentTermEntityBuilder) updates]) =>
|
||||
[void Function(PaymentTermEntityBuilder)? updates]) =>
|
||||
(new PaymentTermEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$PaymentTermEntity._(
|
||||
{this.name,
|
||||
this.numDays,
|
||||
{required this.name,
|
||||
required this.numDays,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'PaymentTermEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -503,10 +503,10 @@ class _$PaymentTermEntity extends PaymentTermEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, numDays.hashCode);
|
||||
|
|
@ -541,49 +541,49 @@ class _$PaymentTermEntity extends PaymentTermEntity {
|
|||
|
||||
class PaymentTermEntityBuilder
|
||||
implements Builder<PaymentTermEntity, PaymentTermEntityBuilder> {
|
||||
_$PaymentTermEntity _$v;
|
||||
_$PaymentTermEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
int _numDays;
|
||||
int get numDays => _$this._numDays;
|
||||
set numDays(int numDays) => _$this._numDays = numDays;
|
||||
int? _numDays;
|
||||
int? get numDays => _$this._numDays;
|
||||
set numDays(int? numDays) => _$this._numDays = numDays;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
PaymentTermEntityBuilder();
|
||||
|
||||
|
|
@ -612,7 +612,7 @@ class PaymentTermEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PaymentTermEntityBuilder) updates) {
|
||||
void update(void Function(PaymentTermEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class ProductFields {
|
|||
abstract class ProductEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<ProductEntity, ProductEntityBuilder> {
|
||||
factory ProductEntity({String id, AppState state}) {
|
||||
factory ProductEntity({String? id, AppState? state}) {
|
||||
return _$ProductEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -202,89 +202,89 @@ abstract class ProductEntity extends Object
|
|||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
||||
int compareTo(
|
||||
ProductEntity product, [
|
||||
String sortField,
|
||||
ProductEntity? product, [
|
||||
String? sortField,
|
||||
bool sortAscending = true,
|
||||
BuiltMap<String, UserEntity> userMap,
|
||||
BuiltMap<String?, UserEntity?>? userMap,
|
||||
]) {
|
||||
int response = 0;
|
||||
final ProductEntity productA = sortAscending ? this : product;
|
||||
final ProductEntity productB = sortAscending ? product : this;
|
||||
final ProductEntity? productA = sortAscending ? this : product;
|
||||
final ProductEntity? productB = sortAscending ? product : this;
|
||||
|
||||
switch (sortField) {
|
||||
case ProductFields.productKey:
|
||||
response = productA.productKey
|
||||
response = productA!.productKey
|
||||
.toLowerCase()
|
||||
.compareTo(productB.productKey.toLowerCase());
|
||||
.compareTo(productB!.productKey.toLowerCase());
|
||||
break;
|
||||
case ProductFields.price:
|
||||
response = productA.price.compareTo(productB.price);
|
||||
response = productA!.price.compareTo(productB!.price);
|
||||
break;
|
||||
case ProductFields.cost:
|
||||
response = productA.cost.compareTo(productB.cost);
|
||||
response = productA!.cost.compareTo(productB!.cost);
|
||||
break;
|
||||
case ProductFields.quantity:
|
||||
response = productA.quantity.compareTo(productB.quantity);
|
||||
response = productA!.quantity.compareTo(productB!.quantity);
|
||||
break;
|
||||
case ProductFields.updatedAt:
|
||||
response = productA.updatedAt.compareTo(productB.updatedAt);
|
||||
response = productA!.updatedAt.compareTo(productB!.updatedAt);
|
||||
break;
|
||||
case EntityFields.createdAt:
|
||||
response = productA.createdAt.compareTo(productB.createdAt);
|
||||
response = productA!.createdAt.compareTo(productB!.createdAt);
|
||||
break;
|
||||
case ProductFields.archivedAt:
|
||||
response = productA.archivedAt.compareTo(productB.archivedAt);
|
||||
response = productA!.archivedAt.compareTo(productB!.archivedAt);
|
||||
break;
|
||||
case ProductFields.description:
|
||||
response = productA.notes
|
||||
response = productA!.notes
|
||||
.toLowerCase()
|
||||
.compareTo(productB.notes.toLowerCase());
|
||||
.compareTo(productB!.notes.toLowerCase());
|
||||
break;
|
||||
case EntityFields.assignedTo:
|
||||
final userA = userMap[productA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[productB.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap![productA!.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[productB!.assignedUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdBy:
|
||||
final userA = userMap[productA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[productB.createdUserId] ?? UserEntity();
|
||||
final userA = userMap![productA!.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[productB!.createdUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.state:
|
||||
final stateA =
|
||||
EntityState.valueOf(productA.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(productA!.entityState) ?? EntityState.active;
|
||||
final stateB =
|
||||
EntityState.valueOf(productB.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(productB!.entityState) ?? EntityState.active;
|
||||
response =
|
||||
stateA.name.toLowerCase().compareTo(stateB.name.toLowerCase());
|
||||
break;
|
||||
case ProductFields.customValue1:
|
||||
response = productA.customValue1
|
||||
response = productA!.customValue1
|
||||
.toLowerCase()
|
||||
.compareTo(productB.customValue1.toLowerCase());
|
||||
.compareTo(productB!.customValue1.toLowerCase());
|
||||
break;
|
||||
case ProductFields.customValue2:
|
||||
response = productA.customValue2
|
||||
response = productA!.customValue2
|
||||
.toLowerCase()
|
||||
.compareTo(productB.customValue2.toLowerCase());
|
||||
.compareTo(productB!.customValue2.toLowerCase());
|
||||
break;
|
||||
case ProductFields.customValue3:
|
||||
response = productA.customValue3
|
||||
response = productA!.customValue3
|
||||
.toLowerCase()
|
||||
.compareTo(productB.customValue3.toLowerCase());
|
||||
.compareTo(productB!.customValue3.toLowerCase());
|
||||
break;
|
||||
case ProductFields.customValue4:
|
||||
response = productA.customValue4
|
||||
response = productA!.customValue4
|
||||
.toLowerCase()
|
||||
.compareTo(productB.customValue4.toLowerCase());
|
||||
.compareTo(productB!.customValue4.toLowerCase());
|
||||
break;
|
||||
case ProductFields.documents:
|
||||
response =
|
||||
productA.documents.length.compareTo(productB.documents.length);
|
||||
productA!.documents.length.compareTo(productB!.documents.length);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by product.$sortField is not implemented');
|
||||
|
|
@ -292,14 +292,14 @@ abstract class ProductEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = productA.price.compareTo(productB.price);
|
||||
response = productA!.price.compareTo(productB!.price);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
productKey,
|
||||
|
|
@ -314,7 +314,7 @@ abstract class ProductEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
notes,
|
||||
|
|
@ -328,40 +328,40 @@ abstract class ProductEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (!multiselect && includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted!) {
|
||||
if (!multiselect && includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.invoice) && !isDeleted) {
|
||||
if (userCompany!.canCreate(EntityType.invoice) && !isDeleted!) {
|
||||
actions.add(EntityAction.newInvoice);
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.purchaseOrder) && !isDeleted) {
|
||||
if (userCompany.canCreate(EntityType.purchaseOrder) && !isDeleted!) {
|
||||
actions.add(EntityAction.newPurchaseOrder);
|
||||
}
|
||||
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext);
|
||||
final company = store.state.company;
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext!);
|
||||
final company = store.state.company!;
|
||||
|
||||
if (company.calculateTaxes) {
|
||||
actions.add(EntityAction.setTaxCategory);
|
||||
}
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.product) && !multiselect) {
|
||||
if (userCompany!.canCreate(EntityType.product) && !multiselect) {
|
||||
actions.add(EntityAction.clone);
|
||||
}
|
||||
|
||||
if (!isDeleted && multiselect) {
|
||||
if (!isDeleted! && multiselect) {
|
||||
actions.add(EntityAction.documents);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$ProductListResponseSerializer
|
|||
final String wireName = 'ProductListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ProductListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -39,21 +39,21 @@ class _$ProductListResponseSerializer
|
|||
|
||||
@override
|
||||
ProductListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ProductListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(ProductEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(ProductEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$ProductItemResponseSerializer
|
|||
final String wireName = 'ProductItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ProductItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(ProductEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$ProductItemResponseSerializer
|
|||
|
||||
@override
|
||||
ProductItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ProductItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(ProductEntity)) as ProductEntity);
|
||||
specifiedType: const FullType(ProductEntity))! as ProductEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,9 +115,9 @@ class _$ProductEntitySerializer implements StructuredSerializer<ProductEntity> {
|
|||
final String wireName = 'ProductEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, ProductEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, ProductEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'product_key',
|
||||
serializers.serialize(object.productKey,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -196,7 +196,7 @@ class _$ProductEntitySerializer implements StructuredSerializer<ProductEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -230,137 +230,137 @@ class _$ProductEntitySerializer implements StructuredSerializer<ProductEntity> {
|
|||
|
||||
@override
|
||||
ProductEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ProductEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'product_key':
|
||||
result.productKey = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'notes':
|
||||
result.notes = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'cost':
|
||||
result.cost = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'price':
|
||||
result.price = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'quantity':
|
||||
result.quantity = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'tax_name1':
|
||||
result.taxName1 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'tax_rate1':
|
||||
result.taxRate1 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'tax_name2':
|
||||
result.taxName2 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'tax_rate2':
|
||||
result.taxRate2 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'tax_name3':
|
||||
result.taxName3 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'tax_rate3':
|
||||
result.taxRate3 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'custom_value1':
|
||||
result.customValue1 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value2':
|
||||
result.customValue2 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value3':
|
||||
result.customValue3 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value4':
|
||||
result.customValue4 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'in_stock_quantity':
|
||||
result.stockQuantity = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'stock_notification_threshold':
|
||||
result.stockNotificationThreshold = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'stock_notification':
|
||||
result.stockNotification = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'product_image':
|
||||
result.imageUrl = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'max_quantity':
|
||||
result.maxQuantity = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'tax_id':
|
||||
result.taxCategoryId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'documents':
|
||||
result.documents.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DocumentEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DocumentEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -374,10 +374,10 @@ class _$ProductListResponse extends ProductListResponse {
|
|||
final BuiltList<ProductEntity> data;
|
||||
|
||||
factory _$ProductListResponse(
|
||||
[void Function(ProductListResponseBuilder) updates]) =>
|
||||
[void Function(ProductListResponseBuilder)? updates]) =>
|
||||
(new ProductListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ProductListResponse._({this.data}) : super._() {
|
||||
_$ProductListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'ProductListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -396,10 +396,10 @@ class _$ProductListResponse extends ProductListResponse {
|
|||
return other is ProductListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -416,12 +416,12 @@ class _$ProductListResponse extends ProductListResponse {
|
|||
|
||||
class ProductListResponseBuilder
|
||||
implements Builder<ProductListResponse, ProductListResponseBuilder> {
|
||||
_$ProductListResponse _$v;
|
||||
_$ProductListResponse? _$v;
|
||||
|
||||
ListBuilder<ProductEntity> _data;
|
||||
ListBuilder<ProductEntity>? _data;
|
||||
ListBuilder<ProductEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<ProductEntity>();
|
||||
set data(ListBuilder<ProductEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<ProductEntity>? data) => _$this._data = data;
|
||||
|
||||
ProductListResponseBuilder();
|
||||
|
||||
|
|
@ -441,7 +441,7 @@ class ProductListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ProductListResponseBuilder) updates) {
|
||||
void update(void Function(ProductListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -453,7 +453,7 @@ class ProductListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ProductListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -473,10 +473,10 @@ class _$ProductItemResponse extends ProductItemResponse {
|
|||
final ProductEntity data;
|
||||
|
||||
factory _$ProductItemResponse(
|
||||
[void Function(ProductItemResponseBuilder) updates]) =>
|
||||
[void Function(ProductItemResponseBuilder)? updates]) =>
|
||||
(new ProductItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ProductItemResponse._({this.data}) : super._() {
|
||||
_$ProductItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'ProductItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -495,10 +495,10 @@ class _$ProductItemResponse extends ProductItemResponse {
|
|||
return other is ProductItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -515,11 +515,11 @@ class _$ProductItemResponse extends ProductItemResponse {
|
|||
|
||||
class ProductItemResponseBuilder
|
||||
implements Builder<ProductItemResponse, ProductItemResponseBuilder> {
|
||||
_$ProductItemResponse _$v;
|
||||
_$ProductItemResponse? _$v;
|
||||
|
||||
ProductEntityBuilder _data;
|
||||
ProductEntityBuilder? _data;
|
||||
ProductEntityBuilder get data => _$this._data ??= new ProductEntityBuilder();
|
||||
set data(ProductEntityBuilder data) => _$this._data = data;
|
||||
set data(ProductEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
ProductItemResponseBuilder();
|
||||
|
||||
|
|
@ -539,7 +539,7 @@ class ProductItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ProductItemResponseBuilder) updates) {
|
||||
void update(void Function(ProductItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -551,7 +551,7 @@ class ProductItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ProductItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -612,7 +612,7 @@ class _$ProductEntity extends ProductEntity {
|
|||
@override
|
||||
final BuiltList<DocumentEntity> documents;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -620,48 +620,48 @@ class _$ProductEntity extends ProductEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$ProductEntity([void Function(ProductEntityBuilder) updates]) =>
|
||||
factory _$ProductEntity([void Function(ProductEntityBuilder)? updates]) =>
|
||||
(new ProductEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$ProductEntity._(
|
||||
{this.productKey,
|
||||
this.notes,
|
||||
this.cost,
|
||||
this.price,
|
||||
this.quantity,
|
||||
this.taxName1,
|
||||
this.taxRate1,
|
||||
this.taxName2,
|
||||
this.taxRate2,
|
||||
this.taxName3,
|
||||
this.taxRate3,
|
||||
this.customValue1,
|
||||
this.customValue2,
|
||||
this.customValue3,
|
||||
this.customValue4,
|
||||
this.stockQuantity,
|
||||
this.stockNotificationThreshold,
|
||||
this.stockNotification,
|
||||
this.imageUrl,
|
||||
this.maxQuantity,
|
||||
this.taxCategoryId,
|
||||
this.documents,
|
||||
{required this.productKey,
|
||||
required this.notes,
|
||||
required this.cost,
|
||||
required this.price,
|
||||
required this.quantity,
|
||||
required this.taxName1,
|
||||
required this.taxRate1,
|
||||
required this.taxName2,
|
||||
required this.taxRate2,
|
||||
required this.taxName3,
|
||||
required this.taxRate3,
|
||||
required this.customValue1,
|
||||
required this.customValue2,
|
||||
required this.customValue3,
|
||||
required this.customValue4,
|
||||
required this.stockQuantity,
|
||||
required this.stockNotificationThreshold,
|
||||
required this.stockNotification,
|
||||
required this.imageUrl,
|
||||
required this.maxQuantity,
|
||||
required this.taxCategoryId,
|
||||
required this.documents,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
productKey, r'ProductEntity', 'productKey');
|
||||
|
|
@ -756,10 +756,10 @@ class _$ProductEntity extends ProductEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, productKey.hashCode);
|
||||
_$hash = $jc(_$hash, notes.hashCode);
|
||||
|
|
@ -834,134 +834,135 @@ class _$ProductEntity extends ProductEntity {
|
|||
|
||||
class ProductEntityBuilder
|
||||
implements Builder<ProductEntity, ProductEntityBuilder> {
|
||||
_$ProductEntity _$v;
|
||||
_$ProductEntity? _$v;
|
||||
|
||||
String _productKey;
|
||||
String get productKey => _$this._productKey;
|
||||
set productKey(String productKey) => _$this._productKey = productKey;
|
||||
String? _productKey;
|
||||
String? get productKey => _$this._productKey;
|
||||
set productKey(String? productKey) => _$this._productKey = productKey;
|
||||
|
||||
String _notes;
|
||||
String get notes => _$this._notes;
|
||||
set notes(String notes) => _$this._notes = notes;
|
||||
String? _notes;
|
||||
String? get notes => _$this._notes;
|
||||
set notes(String? notes) => _$this._notes = notes;
|
||||
|
||||
double _cost;
|
||||
double get cost => _$this._cost;
|
||||
set cost(double cost) => _$this._cost = cost;
|
||||
double? _cost;
|
||||
double? get cost => _$this._cost;
|
||||
set cost(double? cost) => _$this._cost = cost;
|
||||
|
||||
double _price;
|
||||
double get price => _$this._price;
|
||||
set price(double price) => _$this._price = price;
|
||||
double? _price;
|
||||
double? get price => _$this._price;
|
||||
set price(double? price) => _$this._price = price;
|
||||
|
||||
double _quantity;
|
||||
double get quantity => _$this._quantity;
|
||||
set quantity(double quantity) => _$this._quantity = quantity;
|
||||
double? _quantity;
|
||||
double? get quantity => _$this._quantity;
|
||||
set quantity(double? quantity) => _$this._quantity = quantity;
|
||||
|
||||
String _taxName1;
|
||||
String get taxName1 => _$this._taxName1;
|
||||
set taxName1(String taxName1) => _$this._taxName1 = taxName1;
|
||||
String? _taxName1;
|
||||
String? get taxName1 => _$this._taxName1;
|
||||
set taxName1(String? taxName1) => _$this._taxName1 = taxName1;
|
||||
|
||||
double _taxRate1;
|
||||
double get taxRate1 => _$this._taxRate1;
|
||||
set taxRate1(double taxRate1) => _$this._taxRate1 = taxRate1;
|
||||
double? _taxRate1;
|
||||
double? get taxRate1 => _$this._taxRate1;
|
||||
set taxRate1(double? taxRate1) => _$this._taxRate1 = taxRate1;
|
||||
|
||||
String _taxName2;
|
||||
String get taxName2 => _$this._taxName2;
|
||||
set taxName2(String taxName2) => _$this._taxName2 = taxName2;
|
||||
String? _taxName2;
|
||||
String? get taxName2 => _$this._taxName2;
|
||||
set taxName2(String? taxName2) => _$this._taxName2 = taxName2;
|
||||
|
||||
double _taxRate2;
|
||||
double get taxRate2 => _$this._taxRate2;
|
||||
set taxRate2(double taxRate2) => _$this._taxRate2 = taxRate2;
|
||||
double? _taxRate2;
|
||||
double? get taxRate2 => _$this._taxRate2;
|
||||
set taxRate2(double? taxRate2) => _$this._taxRate2 = taxRate2;
|
||||
|
||||
String _taxName3;
|
||||
String get taxName3 => _$this._taxName3;
|
||||
set taxName3(String taxName3) => _$this._taxName3 = taxName3;
|
||||
String? _taxName3;
|
||||
String? get taxName3 => _$this._taxName3;
|
||||
set taxName3(String? taxName3) => _$this._taxName3 = taxName3;
|
||||
|
||||
double _taxRate3;
|
||||
double get taxRate3 => _$this._taxRate3;
|
||||
set taxRate3(double taxRate3) => _$this._taxRate3 = taxRate3;
|
||||
double? _taxRate3;
|
||||
double? get taxRate3 => _$this._taxRate3;
|
||||
set taxRate3(double? taxRate3) => _$this._taxRate3 = taxRate3;
|
||||
|
||||
String _customValue1;
|
||||
String get customValue1 => _$this._customValue1;
|
||||
set customValue1(String customValue1) => _$this._customValue1 = customValue1;
|
||||
String? _customValue1;
|
||||
String? get customValue1 => _$this._customValue1;
|
||||
set customValue1(String? customValue1) => _$this._customValue1 = customValue1;
|
||||
|
||||
String _customValue2;
|
||||
String get customValue2 => _$this._customValue2;
|
||||
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
|
||||
String? _customValue2;
|
||||
String? get customValue2 => _$this._customValue2;
|
||||
set customValue2(String? customValue2) => _$this._customValue2 = customValue2;
|
||||
|
||||
String _customValue3;
|
||||
String get customValue3 => _$this._customValue3;
|
||||
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
|
||||
String? _customValue3;
|
||||
String? get customValue3 => _$this._customValue3;
|
||||
set customValue3(String? customValue3) => _$this._customValue3 = customValue3;
|
||||
|
||||
String _customValue4;
|
||||
String get customValue4 => _$this._customValue4;
|
||||
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
|
||||
String? _customValue4;
|
||||
String? get customValue4 => _$this._customValue4;
|
||||
set customValue4(String? customValue4) => _$this._customValue4 = customValue4;
|
||||
|
||||
int _stockQuantity;
|
||||
int get stockQuantity => _$this._stockQuantity;
|
||||
set stockQuantity(int stockQuantity) => _$this._stockQuantity = stockQuantity;
|
||||
int? _stockQuantity;
|
||||
int? get stockQuantity => _$this._stockQuantity;
|
||||
set stockQuantity(int? stockQuantity) =>
|
||||
_$this._stockQuantity = stockQuantity;
|
||||
|
||||
int _stockNotificationThreshold;
|
||||
int get stockNotificationThreshold => _$this._stockNotificationThreshold;
|
||||
set stockNotificationThreshold(int stockNotificationThreshold) =>
|
||||
int? _stockNotificationThreshold;
|
||||
int? get stockNotificationThreshold => _$this._stockNotificationThreshold;
|
||||
set stockNotificationThreshold(int? stockNotificationThreshold) =>
|
||||
_$this._stockNotificationThreshold = stockNotificationThreshold;
|
||||
|
||||
bool _stockNotification;
|
||||
bool get stockNotification => _$this._stockNotification;
|
||||
set stockNotification(bool stockNotification) =>
|
||||
bool? _stockNotification;
|
||||
bool? get stockNotification => _$this._stockNotification;
|
||||
set stockNotification(bool? stockNotification) =>
|
||||
_$this._stockNotification = stockNotification;
|
||||
|
||||
String _imageUrl;
|
||||
String get imageUrl => _$this._imageUrl;
|
||||
set imageUrl(String imageUrl) => _$this._imageUrl = imageUrl;
|
||||
String? _imageUrl;
|
||||
String? get imageUrl => _$this._imageUrl;
|
||||
set imageUrl(String? imageUrl) => _$this._imageUrl = imageUrl;
|
||||
|
||||
int _maxQuantity;
|
||||
int get maxQuantity => _$this._maxQuantity;
|
||||
set maxQuantity(int maxQuantity) => _$this._maxQuantity = maxQuantity;
|
||||
int? _maxQuantity;
|
||||
int? get maxQuantity => _$this._maxQuantity;
|
||||
set maxQuantity(int? maxQuantity) => _$this._maxQuantity = maxQuantity;
|
||||
|
||||
String _taxCategoryId;
|
||||
String get taxCategoryId => _$this._taxCategoryId;
|
||||
set taxCategoryId(String taxCategoryId) =>
|
||||
String? _taxCategoryId;
|
||||
String? get taxCategoryId => _$this._taxCategoryId;
|
||||
set taxCategoryId(String? taxCategoryId) =>
|
||||
_$this._taxCategoryId = taxCategoryId;
|
||||
|
||||
ListBuilder<DocumentEntity> _documents;
|
||||
ListBuilder<DocumentEntity>? _documents;
|
||||
ListBuilder<DocumentEntity> get documents =>
|
||||
_$this._documents ??= new ListBuilder<DocumentEntity>();
|
||||
set documents(ListBuilder<DocumentEntity> documents) =>
|
||||
set documents(ListBuilder<DocumentEntity>? documents) =>
|
||||
_$this._documents = documents;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
ProductEntityBuilder() {
|
||||
ProductEntity._initializeBuilder(this);
|
||||
|
|
@ -1012,7 +1013,7 @@ class ProductEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ProductEntityBuilder) updates) {
|
||||
void update(void Function(ProductEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1064,7 +1065,7 @@ class ProductEntityBuilder
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'ProductEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'documents';
|
||||
documents.build();
|
||||
|
|
|
|||
|
|
@ -73,10 +73,10 @@ abstract class ProjectEntity extends Object
|
|||
with BaseEntity, SelectableEntity, BelongsToClient
|
||||
implements Built<ProjectEntity, ProjectEntityBuilder> {
|
||||
factory ProjectEntity({
|
||||
String id,
|
||||
AppState state,
|
||||
ClientEntity client,
|
||||
UserEntity user,
|
||||
String? id,
|
||||
AppState? state,
|
||||
ClientEntity? client,
|
||||
UserEntity? user,
|
||||
}) {
|
||||
return _$ProjectEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
|
|
@ -166,21 +166,21 @@ abstract class ProjectEntity extends Object
|
|||
BuiltList<DocumentEntity> get documents;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!multiselect && !isDeleted) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!multiselect && !isDeleted!) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
if (isActive) {
|
||||
if (userCompany.canCreate(EntityType.task)) {
|
||||
if (userCompany!.canCreate(EntityType.task)) {
|
||||
actions.add(EntityAction.newTask);
|
||||
}
|
||||
if (userCompany.canCreate(EntityType.expense)) {
|
||||
|
|
@ -189,7 +189,7 @@ abstract class ProjectEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.invoice) && !isDeleted) {
|
||||
if (userCompany!.canCreate(EntityType.invoice) && !isDeleted!) {
|
||||
actions.add(EntityAction.invoiceProject);
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ abstract class ProjectEntity extends Object
|
|||
actions.add(EntityAction.clone);
|
||||
}
|
||||
|
||||
if (!isDeleted && multiselect) {
|
||||
if (!isDeleted! && multiselect) {
|
||||
actions.add(EntityAction.documents);
|
||||
}
|
||||
|
||||
|
|
@ -209,108 +209,108 @@ abstract class ProjectEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo(
|
||||
ProjectEntity project,
|
||||
ProjectEntity? project,
|
||||
String sortField,
|
||||
bool sortAscending,
|
||||
BuiltMap<String, UserEntity> userMap,
|
||||
BuiltMap<String, ClientEntity> clientMap) {
|
||||
BuiltMap<String?, UserEntity?> userMap,
|
||||
BuiltMap<String?, ClientEntity?> clientMap) {
|
||||
int response = 0;
|
||||
final ProjectEntity projectA = sortAscending ? this : project;
|
||||
final ProjectEntity projectB = sortAscending ? project : this;
|
||||
final ProjectEntity? projectA = sortAscending ? this : project;
|
||||
final ProjectEntity? projectB = sortAscending ? project : this;
|
||||
|
||||
switch (sortField) {
|
||||
case ProjectFields.name:
|
||||
response =
|
||||
projectA.name.toLowerCase().compareTo(projectB.name.toLowerCase());
|
||||
projectA!.name.toLowerCase().compareTo(projectB!.name.toLowerCase());
|
||||
break;
|
||||
case ProjectFields.taskRate:
|
||||
response = projectA.taskRate.compareTo(projectB.taskRate);
|
||||
response = projectA!.taskRate.compareTo(projectB!.taskRate);
|
||||
break;
|
||||
case ProjectFields.client:
|
||||
final clientA = clientMap[projectA.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[projectB.clientId] ?? ClientEntity();
|
||||
final clientA = clientMap[projectA!.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[projectB!.clientId] ?? ClientEntity();
|
||||
response = removeDiacritics(clientA.listDisplayName)
|
||||
.toLowerCase()
|
||||
.compareTo(removeDiacritics(clientB.listDisplayName).toLowerCase());
|
||||
break;
|
||||
case ProjectFields.clientNumber:
|
||||
final clientA = clientMap[projectA.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[projectB.clientId] ?? ClientEntity();
|
||||
final clientA = clientMap[projectA!.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[projectB!.clientId] ?? ClientEntity();
|
||||
response = clientA.number
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.number.toLowerCase());
|
||||
break;
|
||||
case ProjectFields.clientIdNumber:
|
||||
final clientA = clientMap[projectA.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[projectB.clientId] ?? ClientEntity();
|
||||
final clientA = clientMap[projectA!.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[projectB!.clientId] ?? ClientEntity();
|
||||
response = clientA.idNumber
|
||||
.toLowerCase()
|
||||
.compareTo(clientB.idNumber.toLowerCase());
|
||||
break;
|
||||
case ProjectFields.dueDate:
|
||||
response = projectA.dueDate.compareTo(projectB.dueDate);
|
||||
response = projectA!.dueDate.compareTo(projectB!.dueDate);
|
||||
break;
|
||||
case ProjectFields.privateNotes:
|
||||
response = projectA.privateNotes.compareTo(projectB.privateNotes);
|
||||
response = projectA!.privateNotes.compareTo(projectB!.privateNotes);
|
||||
break;
|
||||
case ProjectFields.publicNotes:
|
||||
response = projectA.publicNotes.compareTo(projectB.publicNotes);
|
||||
response = projectA!.publicNotes.compareTo(projectB!.publicNotes);
|
||||
break;
|
||||
case ProjectFields.budgetedHours:
|
||||
response = projectA.budgetedHours.compareTo(projectB.budgetedHours);
|
||||
response = projectA!.budgetedHours.compareTo(projectB!.budgetedHours);
|
||||
break;
|
||||
case ProjectFields.totalHours:
|
||||
response = projectA.totalHours.compareTo(projectB.totalHours);
|
||||
response = projectA!.totalHours.compareTo(projectB!.totalHours);
|
||||
break;
|
||||
case EntityFields.state:
|
||||
final stateA =
|
||||
EntityState.valueOf(projectA.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(projectA!.entityState) ?? EntityState.active;
|
||||
final stateB =
|
||||
EntityState.valueOf(projectB.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(projectB!.entityState) ?? EntityState.active;
|
||||
response =
|
||||
stateA.name.toLowerCase().compareTo(stateB.name.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdAt:
|
||||
response = projectA.createdAt.compareTo(projectB.createdAt);
|
||||
response = projectA!.createdAt.compareTo(projectB!.createdAt);
|
||||
break;
|
||||
case ProjectFields.archivedAt:
|
||||
response = projectA.archivedAt.compareTo(projectB.archivedAt);
|
||||
response = projectA!.archivedAt.compareTo(projectB!.archivedAt);
|
||||
break;
|
||||
case ProjectFields.updatedAt:
|
||||
response = projectA.updatedAt.compareTo(projectB.updatedAt);
|
||||
response = projectA!.updatedAt.compareTo(projectB!.updatedAt);
|
||||
break;
|
||||
case EntityFields.assignedTo:
|
||||
final userA = userMap[projectA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[projectB.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap[projectA!.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[projectB!.assignedUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdBy:
|
||||
final userA = userMap[projectA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[projectB.createdUserId] ?? UserEntity();
|
||||
final userA = userMap[projectA!.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[projectB!.createdUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case ProjectFields.documents:
|
||||
response =
|
||||
projectA.documents.length.compareTo(projectB.documents.length);
|
||||
projectA!.documents.length.compareTo(projectB!.documents.length);
|
||||
break;
|
||||
case ProjectFields.number:
|
||||
response = (projectA.number ?? '').compareTo(projectB.number ?? '');
|
||||
response = (projectA!.number ?? '').compareTo(projectB!.number ?? '');
|
||||
break;
|
||||
case ProjectFields.customValue1:
|
||||
response = projectA.customValue1.compareTo(projectB.customValue1);
|
||||
response = projectA!.customValue1.compareTo(projectB!.customValue1);
|
||||
break;
|
||||
case ProjectFields.customValue2:
|
||||
response = projectA.customValue2.compareTo(projectB.customValue2);
|
||||
response = projectA!.customValue2.compareTo(projectB!.customValue2);
|
||||
break;
|
||||
case ProjectFields.customValue3:
|
||||
response = projectA.customValue3.compareTo(projectB.customValue3);
|
||||
response = projectA!.customValue3.compareTo(projectB!.customValue3);
|
||||
break;
|
||||
case ProjectFields.customValue4:
|
||||
response = projectA.customValue4.compareTo(projectB.customValue4);
|
||||
response = projectA!.customValue4.compareTo(projectB!.customValue4);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by project.$sortField is not implemented');
|
||||
|
|
@ -318,7 +318,7 @@ abstract class ProjectEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = project.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
response = project!.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
@ -328,7 +328,7 @@ abstract class ProjectEntity extends Object
|
|||
name.toLowerCase().contains(filter.toLowerCase());
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -345,7 +345,7 @@ abstract class ProjectEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -367,7 +367,7 @@ abstract class ProjectEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
bool get hasClient => clientId != null && clientId.isNotEmpty;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$ProjectListResponseSerializer
|
|||
final String wireName = 'ProjectListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ProjectListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -39,21 +39,21 @@ class _$ProjectListResponseSerializer
|
|||
|
||||
@override
|
||||
ProjectListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ProjectListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(ProjectEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(ProjectEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$ProjectItemResponseSerializer
|
|||
final String wireName = 'ProjectItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ProjectItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(ProjectEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$ProjectItemResponseSerializer
|
|||
|
||||
@override
|
||||
ProjectItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ProjectItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(ProjectEntity)) as ProjectEntity);
|
||||
specifiedType: const FullType(ProjectEntity))! as ProjectEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,9 +115,9 @@ class _$ProjectEntitySerializer implements StructuredSerializer<ProjectEntity> {
|
|||
final String wireName = 'ProjectEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, ProjectEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, ProjectEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'color',
|
||||
|
|
@ -175,7 +175,7 @@ class _$ProjectEntitySerializer implements StructuredSerializer<ProjectEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -209,109 +209,109 @@ class _$ProjectEntitySerializer implements StructuredSerializer<ProjectEntity> {
|
|||
|
||||
@override
|
||||
ProjectEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ProjectEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'color':
|
||||
result.color = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'client_id':
|
||||
result.clientId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'task_rate':
|
||||
result.taskRate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'due_date':
|
||||
result.dueDate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'private_notes':
|
||||
result.privateNotes = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'public_notes':
|
||||
result.publicNotes = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'budgeted_hours':
|
||||
result.budgetedHours = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'custom_value1':
|
||||
result.customValue1 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value2':
|
||||
result.customValue2 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value3':
|
||||
result.customValue3 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value4':
|
||||
result.customValue4 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'number':
|
||||
result.number = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'current_hours':
|
||||
result.totalHours = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'documents':
|
||||
result.documents.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DocumentEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DocumentEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -325,10 +325,10 @@ class _$ProjectListResponse extends ProjectListResponse {
|
|||
final BuiltList<ProjectEntity> data;
|
||||
|
||||
factory _$ProjectListResponse(
|
||||
[void Function(ProjectListResponseBuilder) updates]) =>
|
||||
[void Function(ProjectListResponseBuilder)? updates]) =>
|
||||
(new ProjectListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ProjectListResponse._({this.data}) : super._() {
|
||||
_$ProjectListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'ProjectListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -347,10 +347,10 @@ class _$ProjectListResponse extends ProjectListResponse {
|
|||
return other is ProjectListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -367,12 +367,12 @@ class _$ProjectListResponse extends ProjectListResponse {
|
|||
|
||||
class ProjectListResponseBuilder
|
||||
implements Builder<ProjectListResponse, ProjectListResponseBuilder> {
|
||||
_$ProjectListResponse _$v;
|
||||
_$ProjectListResponse? _$v;
|
||||
|
||||
ListBuilder<ProjectEntity> _data;
|
||||
ListBuilder<ProjectEntity>? _data;
|
||||
ListBuilder<ProjectEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<ProjectEntity>();
|
||||
set data(ListBuilder<ProjectEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<ProjectEntity>? data) => _$this._data = data;
|
||||
|
||||
ProjectListResponseBuilder();
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ class ProjectListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ProjectListResponseBuilder) updates) {
|
||||
void update(void Function(ProjectListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -404,7 +404,7 @@ class ProjectListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ProjectListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -424,10 +424,10 @@ class _$ProjectItemResponse extends ProjectItemResponse {
|
|||
final ProjectEntity data;
|
||||
|
||||
factory _$ProjectItemResponse(
|
||||
[void Function(ProjectItemResponseBuilder) updates]) =>
|
||||
[void Function(ProjectItemResponseBuilder)? updates]) =>
|
||||
(new ProjectItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ProjectItemResponse._({this.data}) : super._() {
|
||||
_$ProjectItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'ProjectItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -446,10 +446,10 @@ class _$ProjectItemResponse extends ProjectItemResponse {
|
|||
return other is ProjectItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -466,11 +466,11 @@ class _$ProjectItemResponse extends ProjectItemResponse {
|
|||
|
||||
class ProjectItemResponseBuilder
|
||||
implements Builder<ProjectItemResponse, ProjectItemResponseBuilder> {
|
||||
_$ProjectItemResponse _$v;
|
||||
_$ProjectItemResponse? _$v;
|
||||
|
||||
ProjectEntityBuilder _data;
|
||||
ProjectEntityBuilder? _data;
|
||||
ProjectEntityBuilder get data => _$this._data ??= new ProjectEntityBuilder();
|
||||
set data(ProjectEntityBuilder data) => _$this._data = data;
|
||||
set data(ProjectEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
ProjectItemResponseBuilder();
|
||||
|
||||
|
|
@ -490,7 +490,7 @@ class ProjectItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ProjectItemResponseBuilder) updates) {
|
||||
void update(void Function(ProjectItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ class ProjectItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ProjectItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -549,7 +549,7 @@ class _$ProjectEntity extends ProjectEntity {
|
|||
@override
|
||||
final BuiltList<DocumentEntity> documents;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -557,41 +557,41 @@ class _$ProjectEntity extends ProjectEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$ProjectEntity([void Function(ProjectEntityBuilder) updates]) =>
|
||||
factory _$ProjectEntity([void Function(ProjectEntityBuilder)? updates]) =>
|
||||
(new ProjectEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$ProjectEntity._(
|
||||
{this.name,
|
||||
this.color,
|
||||
this.clientId,
|
||||
this.taskRate,
|
||||
this.dueDate,
|
||||
this.privateNotes,
|
||||
this.publicNotes,
|
||||
this.budgetedHours,
|
||||
this.customValue1,
|
||||
this.customValue2,
|
||||
this.customValue3,
|
||||
this.customValue4,
|
||||
this.number,
|
||||
this.totalHours,
|
||||
this.documents,
|
||||
{required this.name,
|
||||
required this.color,
|
||||
required this.clientId,
|
||||
required this.taskRate,
|
||||
required this.dueDate,
|
||||
required this.privateNotes,
|
||||
required this.publicNotes,
|
||||
required this.budgetedHours,
|
||||
required this.customValue1,
|
||||
required this.customValue2,
|
||||
required this.customValue3,
|
||||
required this.customValue4,
|
||||
required this.number,
|
||||
required this.totalHours,
|
||||
required this.documents,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'ProjectEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(color, r'ProjectEntity', 'color');
|
||||
|
|
@ -664,10 +664,10 @@ class _$ProjectEntity extends ProjectEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, color.hashCode);
|
||||
|
|
@ -728,104 +728,104 @@ class _$ProjectEntity extends ProjectEntity {
|
|||
|
||||
class ProjectEntityBuilder
|
||||
implements Builder<ProjectEntity, ProjectEntityBuilder> {
|
||||
_$ProjectEntity _$v;
|
||||
_$ProjectEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _color;
|
||||
String get color => _$this._color;
|
||||
set color(String color) => _$this._color = color;
|
||||
String? _color;
|
||||
String? get color => _$this._color;
|
||||
set color(String? color) => _$this._color = color;
|
||||
|
||||
String _clientId;
|
||||
String get clientId => _$this._clientId;
|
||||
set clientId(String clientId) => _$this._clientId = clientId;
|
||||
String? _clientId;
|
||||
String? get clientId => _$this._clientId;
|
||||
set clientId(String? clientId) => _$this._clientId = clientId;
|
||||
|
||||
double _taskRate;
|
||||
double get taskRate => _$this._taskRate;
|
||||
set taskRate(double taskRate) => _$this._taskRate = taskRate;
|
||||
double? _taskRate;
|
||||
double? get taskRate => _$this._taskRate;
|
||||
set taskRate(double? taskRate) => _$this._taskRate = taskRate;
|
||||
|
||||
String _dueDate;
|
||||
String get dueDate => _$this._dueDate;
|
||||
set dueDate(String dueDate) => _$this._dueDate = dueDate;
|
||||
String? _dueDate;
|
||||
String? get dueDate => _$this._dueDate;
|
||||
set dueDate(String? dueDate) => _$this._dueDate = dueDate;
|
||||
|
||||
String _privateNotes;
|
||||
String get privateNotes => _$this._privateNotes;
|
||||
set privateNotes(String privateNotes) => _$this._privateNotes = privateNotes;
|
||||
String? _privateNotes;
|
||||
String? get privateNotes => _$this._privateNotes;
|
||||
set privateNotes(String? privateNotes) => _$this._privateNotes = privateNotes;
|
||||
|
||||
String _publicNotes;
|
||||
String get publicNotes => _$this._publicNotes;
|
||||
set publicNotes(String publicNotes) => _$this._publicNotes = publicNotes;
|
||||
String? _publicNotes;
|
||||
String? get publicNotes => _$this._publicNotes;
|
||||
set publicNotes(String? publicNotes) => _$this._publicNotes = publicNotes;
|
||||
|
||||
double _budgetedHours;
|
||||
double get budgetedHours => _$this._budgetedHours;
|
||||
set budgetedHours(double budgetedHours) =>
|
||||
double? _budgetedHours;
|
||||
double? get budgetedHours => _$this._budgetedHours;
|
||||
set budgetedHours(double? budgetedHours) =>
|
||||
_$this._budgetedHours = budgetedHours;
|
||||
|
||||
String _customValue1;
|
||||
String get customValue1 => _$this._customValue1;
|
||||
set customValue1(String customValue1) => _$this._customValue1 = customValue1;
|
||||
String? _customValue1;
|
||||
String? get customValue1 => _$this._customValue1;
|
||||
set customValue1(String? customValue1) => _$this._customValue1 = customValue1;
|
||||
|
||||
String _customValue2;
|
||||
String get customValue2 => _$this._customValue2;
|
||||
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
|
||||
String? _customValue2;
|
||||
String? get customValue2 => _$this._customValue2;
|
||||
set customValue2(String? customValue2) => _$this._customValue2 = customValue2;
|
||||
|
||||
String _customValue3;
|
||||
String get customValue3 => _$this._customValue3;
|
||||
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
|
||||
String? _customValue3;
|
||||
String? get customValue3 => _$this._customValue3;
|
||||
set customValue3(String? customValue3) => _$this._customValue3 = customValue3;
|
||||
|
||||
String _customValue4;
|
||||
String get customValue4 => _$this._customValue4;
|
||||
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
|
||||
String? _customValue4;
|
||||
String? get customValue4 => _$this._customValue4;
|
||||
set customValue4(String? customValue4) => _$this._customValue4 = customValue4;
|
||||
|
||||
String _number;
|
||||
String get number => _$this._number;
|
||||
set number(String number) => _$this._number = number;
|
||||
String? _number;
|
||||
String? get number => _$this._number;
|
||||
set number(String? number) => _$this._number = number;
|
||||
|
||||
double _totalHours;
|
||||
double get totalHours => _$this._totalHours;
|
||||
set totalHours(double totalHours) => _$this._totalHours = totalHours;
|
||||
double? _totalHours;
|
||||
double? get totalHours => _$this._totalHours;
|
||||
set totalHours(double? totalHours) => _$this._totalHours = totalHours;
|
||||
|
||||
ListBuilder<DocumentEntity> _documents;
|
||||
ListBuilder<DocumentEntity>? _documents;
|
||||
ListBuilder<DocumentEntity> get documents =>
|
||||
_$this._documents ??= new ListBuilder<DocumentEntity>();
|
||||
set documents(ListBuilder<DocumentEntity> documents) =>
|
||||
set documents(ListBuilder<DocumentEntity>? documents) =>
|
||||
_$this._documents = documents;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
ProjectEntityBuilder() {
|
||||
ProjectEntity._initializeBuilder(this);
|
||||
|
|
@ -869,7 +869,7 @@ class ProjectEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ProjectEntityBuilder) updates) {
|
||||
void update(void Function(ProjectEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -914,7 +914,7 @@ class ProjectEntityBuilder
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'ProjectEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'documents';
|
||||
documents.build();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class ScheduleFields {
|
|||
abstract class ScheduleEntity extends Object
|
||||
with BaseEntity
|
||||
implements Built<ScheduleEntity, ScheduleEntityBuilder> {
|
||||
factory ScheduleEntity(String template, {String id, AppState state}) {
|
||||
factory ScheduleEntity(String template, {String? id, AppState? state}) {
|
||||
return _$ScheduleEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -109,17 +109,17 @@ abstract class ScheduleEntity extends Object
|
|||
EntityType get entityType => EntityType.schedule;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted &&
|
||||
if (!isDeleted! &&
|
||||
!multiselect &&
|
||||
includeEdit &&
|
||||
userCompany.canEditEntity(this)) {
|
||||
userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
|
|
@ -130,18 +130,18 @@ abstract class ScheduleEntity extends Object
|
|||
return actions..addAll(super.getActions(userCompany: userCompany));
|
||||
}
|
||||
|
||||
int compareTo(ScheduleEntity schedule, String sortField, bool sortAscending) {
|
||||
int compareTo(ScheduleEntity? schedule, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final scheduleA = sortAscending ? this : schedule;
|
||||
final scheduleB = sortAscending ? schedule : this;
|
||||
|
||||
switch (sortField) {
|
||||
case ScheduleFields.nextRun:
|
||||
response = scheduleA.nextRun.compareTo(scheduleB.nextRun);
|
||||
response = scheduleA!.nextRun.compareTo(scheduleB!.nextRun);
|
||||
break;
|
||||
|
||||
default:
|
||||
response = scheduleA.template.compareTo(scheduleB.template);
|
||||
response = scheduleA!.template.compareTo(scheduleB!.template);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ abstract class ScheduleEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
template,
|
||||
|
|
@ -164,7 +164,7 @@ abstract class ScheduleEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
template,
|
||||
|
|
@ -174,16 +174,16 @@ abstract class ScheduleEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String get listDisplayName {
|
||||
final localization = AppLocalization.of(navigatorKey.currentContext);
|
||||
String? get listDisplayName {
|
||||
final localization = AppLocalization.of(navigatorKey.currentContext!)!;
|
||||
return localization.lookup(template);
|
||||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
static Serializer<ScheduleEntity> get serializer =>
|
||||
_$scheduleEntitySerializer;
|
||||
|
|
@ -223,39 +223,30 @@ abstract class ScheduleParameters
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'date_range')
|
||||
String get dateRange;
|
||||
String? get dateRange;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'show_payments_table')
|
||||
bool get showPaymentsTable;
|
||||
bool? get showPaymentsTable;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'show_credits_table')
|
||||
bool get showCreditsTable;
|
||||
bool? get showCreditsTable;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'show_aging_table')
|
||||
bool get showAgingTable;
|
||||
bool? get showAgingTable;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'only_clients_with_invoices')
|
||||
bool get onlyClientsWithInvoices;
|
||||
bool? get onlyClientsWithInvoices;
|
||||
|
||||
@nullable
|
||||
String get status;
|
||||
String? get status;
|
||||
|
||||
@nullable
|
||||
BuiltList<String> get clients;
|
||||
BuiltList<String>? get clients;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'entity')
|
||||
String get entityType;
|
||||
String? get entityType;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'entity_id')
|
||||
String get entityId;
|
||||
String? get entityId;
|
||||
|
||||
static Serializer<ScheduleParameters> get serializer =>
|
||||
_$scheduleParametersSerializer;
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ class _$ScheduleListResponseSerializer
|
|||
final String wireName = 'ScheduleListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ScheduleListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -41,21 +41,21 @@ class _$ScheduleListResponseSerializer
|
|||
|
||||
@override
|
||||
ScheduleListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ScheduleListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(ScheduleEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(ScheduleEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,10 +75,10 @@ class _$ScheduleItemResponseSerializer
|
|||
final String wireName = 'ScheduleItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ScheduleItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(ScheduleEntity)),
|
||||
|
|
@ -89,19 +89,20 @@ class _$ScheduleItemResponseSerializer
|
|||
|
||||
@override
|
||||
ScheduleItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ScheduleItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(ScheduleEntity)) as ScheduleEntity);
|
||||
specifiedType: const FullType(ScheduleEntity))!
|
||||
as ScheduleEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -118,9 +119,9 @@ class _$ScheduleEntitySerializer
|
|||
final String wireName = 'ScheduleEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, ScheduleEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, ScheduleEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'frequency_id',
|
||||
serializers.serialize(object.frequencyId,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -151,7 +152,7 @@ class _$ScheduleEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -185,72 +186,72 @@ class _$ScheduleEntitySerializer
|
|||
|
||||
@override
|
||||
ScheduleEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ScheduleEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'frequency_id':
|
||||
result.frequencyId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'next_run':
|
||||
result.nextRun = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'template':
|
||||
result.template = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'is_paused':
|
||||
result.isPaused = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'remaining_cycles':
|
||||
result.remainingCycles = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'parameters':
|
||||
result.parameters.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(ScheduleParameters))
|
||||
specifiedType: const FullType(ScheduleParameters))!
|
||||
as ScheduleParameters);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -267,10 +268,11 @@ class _$ScheduleParametersSerializer
|
|||
final String wireName = 'ScheduleParameters';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, ScheduleParameters object,
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, ScheduleParameters object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[];
|
||||
Object value;
|
||||
final result = <Object?>[];
|
||||
Object? value;
|
||||
value = object.dateRange;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -340,53 +342,53 @@ class _$ScheduleParametersSerializer
|
|||
|
||||
@override
|
||||
ScheduleParameters deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new ScheduleParametersBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'date_range':
|
||||
result.dateRange = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'show_payments_table':
|
||||
result.showPaymentsTable = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'show_credits_table':
|
||||
result.showCreditsTable = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'show_aging_table':
|
||||
result.showAgingTable = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'only_clients_with_invoices':
|
||||
result.onlyClientsWithInvoices = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'status':
|
||||
result.status = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'clients':
|
||||
result.clients.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(String)]))
|
||||
as BuiltList<Object>);
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(String)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'entity':
|
||||
result.entityType = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'entity_id':
|
||||
result.entityId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -400,10 +402,10 @@ class _$ScheduleListResponse extends ScheduleListResponse {
|
|||
final BuiltList<ScheduleEntity> data;
|
||||
|
||||
factory _$ScheduleListResponse(
|
||||
[void Function(ScheduleListResponseBuilder) updates]) =>
|
||||
[void Function(ScheduleListResponseBuilder)? updates]) =>
|
||||
(new ScheduleListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ScheduleListResponse._({this.data}) : super._() {
|
||||
_$ScheduleListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'ScheduleListResponse', 'data');
|
||||
}
|
||||
|
|
@ -423,10 +425,10 @@ class _$ScheduleListResponse extends ScheduleListResponse {
|
|||
return other is ScheduleListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -443,12 +445,12 @@ class _$ScheduleListResponse extends ScheduleListResponse {
|
|||
|
||||
class ScheduleListResponseBuilder
|
||||
implements Builder<ScheduleListResponse, ScheduleListResponseBuilder> {
|
||||
_$ScheduleListResponse _$v;
|
||||
_$ScheduleListResponse? _$v;
|
||||
|
||||
ListBuilder<ScheduleEntity> _data;
|
||||
ListBuilder<ScheduleEntity>? _data;
|
||||
ListBuilder<ScheduleEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<ScheduleEntity>();
|
||||
set data(ListBuilder<ScheduleEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<ScheduleEntity>? data) => _$this._data = data;
|
||||
|
||||
ScheduleListResponseBuilder();
|
||||
|
||||
|
|
@ -468,7 +470,7 @@ class ScheduleListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ScheduleListResponseBuilder) updates) {
|
||||
void update(void Function(ScheduleListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -480,7 +482,7 @@ class ScheduleListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ScheduleListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -500,10 +502,10 @@ class _$ScheduleItemResponse extends ScheduleItemResponse {
|
|||
final ScheduleEntity data;
|
||||
|
||||
factory _$ScheduleItemResponse(
|
||||
[void Function(ScheduleItemResponseBuilder) updates]) =>
|
||||
[void Function(ScheduleItemResponseBuilder)? updates]) =>
|
||||
(new ScheduleItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$ScheduleItemResponse._({this.data}) : super._() {
|
||||
_$ScheduleItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'ScheduleItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -523,10 +525,10 @@ class _$ScheduleItemResponse extends ScheduleItemResponse {
|
|||
return other is ScheduleItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -543,12 +545,12 @@ class _$ScheduleItemResponse extends ScheduleItemResponse {
|
|||
|
||||
class ScheduleItemResponseBuilder
|
||||
implements Builder<ScheduleItemResponse, ScheduleItemResponseBuilder> {
|
||||
_$ScheduleItemResponse _$v;
|
||||
_$ScheduleItemResponse? _$v;
|
||||
|
||||
ScheduleEntityBuilder _data;
|
||||
ScheduleEntityBuilder? _data;
|
||||
ScheduleEntityBuilder get data =>
|
||||
_$this._data ??= new ScheduleEntityBuilder();
|
||||
set data(ScheduleEntityBuilder data) => _$this._data = data;
|
||||
set data(ScheduleEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
ScheduleItemResponseBuilder();
|
||||
|
||||
|
|
@ -568,7 +570,7 @@ class ScheduleItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ScheduleItemResponseBuilder) updates) {
|
||||
void update(void Function(ScheduleItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -580,7 +582,7 @@ class ScheduleItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$ScheduleItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -609,7 +611,7 @@ class _$ScheduleEntity extends ScheduleEntity {
|
|||
@override
|
||||
final ScheduleParameters parameters;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -617,32 +619,32 @@ class _$ScheduleEntity extends ScheduleEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$ScheduleEntity([void Function(ScheduleEntityBuilder) updates]) =>
|
||||
factory _$ScheduleEntity([void Function(ScheduleEntityBuilder)? updates]) =>
|
||||
(new ScheduleEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$ScheduleEntity._(
|
||||
{this.frequencyId,
|
||||
this.nextRun,
|
||||
this.template,
|
||||
this.isPaused,
|
||||
this.remainingCycles,
|
||||
this.parameters,
|
||||
{required this.frequencyId,
|
||||
required this.nextRun,
|
||||
required this.template,
|
||||
required this.isPaused,
|
||||
required this.remainingCycles,
|
||||
required this.parameters,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
frequencyId, r'ScheduleEntity', 'frequencyId');
|
||||
|
|
@ -693,10 +695,10 @@ class _$ScheduleEntity extends ScheduleEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, frequencyId.hashCode);
|
||||
_$hash = $jc(_$hash, nextRun.hashCode);
|
||||
|
|
@ -739,68 +741,68 @@ class _$ScheduleEntity extends ScheduleEntity {
|
|||
|
||||
class ScheduleEntityBuilder
|
||||
implements Builder<ScheduleEntity, ScheduleEntityBuilder> {
|
||||
_$ScheduleEntity _$v;
|
||||
_$ScheduleEntity? _$v;
|
||||
|
||||
String _frequencyId;
|
||||
String get frequencyId => _$this._frequencyId;
|
||||
set frequencyId(String frequencyId) => _$this._frequencyId = frequencyId;
|
||||
String? _frequencyId;
|
||||
String? get frequencyId => _$this._frequencyId;
|
||||
set frequencyId(String? frequencyId) => _$this._frequencyId = frequencyId;
|
||||
|
||||
String _nextRun;
|
||||
String get nextRun => _$this._nextRun;
|
||||
set nextRun(String nextRun) => _$this._nextRun = nextRun;
|
||||
String? _nextRun;
|
||||
String? get nextRun => _$this._nextRun;
|
||||
set nextRun(String? nextRun) => _$this._nextRun = nextRun;
|
||||
|
||||
String _template;
|
||||
String get template => _$this._template;
|
||||
set template(String template) => _$this._template = template;
|
||||
String? _template;
|
||||
String? get template => _$this._template;
|
||||
set template(String? template) => _$this._template = template;
|
||||
|
||||
bool _isPaused;
|
||||
bool get isPaused => _$this._isPaused;
|
||||
set isPaused(bool isPaused) => _$this._isPaused = isPaused;
|
||||
bool? _isPaused;
|
||||
bool? get isPaused => _$this._isPaused;
|
||||
set isPaused(bool? isPaused) => _$this._isPaused = isPaused;
|
||||
|
||||
int _remainingCycles;
|
||||
int get remainingCycles => _$this._remainingCycles;
|
||||
set remainingCycles(int remainingCycles) =>
|
||||
int? _remainingCycles;
|
||||
int? get remainingCycles => _$this._remainingCycles;
|
||||
set remainingCycles(int? remainingCycles) =>
|
||||
_$this._remainingCycles = remainingCycles;
|
||||
|
||||
ScheduleParametersBuilder _parameters;
|
||||
ScheduleParametersBuilder? _parameters;
|
||||
ScheduleParametersBuilder get parameters =>
|
||||
_$this._parameters ??= new ScheduleParametersBuilder();
|
||||
set parameters(ScheduleParametersBuilder parameters) =>
|
||||
set parameters(ScheduleParametersBuilder? parameters) =>
|
||||
_$this._parameters = parameters;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
ScheduleEntityBuilder();
|
||||
|
||||
|
|
@ -833,7 +835,7 @@ class ScheduleEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ScheduleEntityBuilder) updates) {
|
||||
void update(void Function(ScheduleEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -868,7 +870,7 @@ class ScheduleEntityBuilder
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'ScheduleEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'parameters';
|
||||
parameters.build();
|
||||
|
|
@ -885,26 +887,26 @@ class ScheduleEntityBuilder
|
|||
|
||||
class _$ScheduleParameters extends ScheduleParameters {
|
||||
@override
|
||||
final String dateRange;
|
||||
final String? dateRange;
|
||||
@override
|
||||
final bool showPaymentsTable;
|
||||
final bool? showPaymentsTable;
|
||||
@override
|
||||
final bool showCreditsTable;
|
||||
final bool? showCreditsTable;
|
||||
@override
|
||||
final bool showAgingTable;
|
||||
final bool? showAgingTable;
|
||||
@override
|
||||
final bool onlyClientsWithInvoices;
|
||||
final bool? onlyClientsWithInvoices;
|
||||
@override
|
||||
final String status;
|
||||
final String? status;
|
||||
@override
|
||||
final BuiltList<String> clients;
|
||||
final BuiltList<String>? clients;
|
||||
@override
|
||||
final String entityType;
|
||||
final String? entityType;
|
||||
@override
|
||||
final String entityId;
|
||||
final String? entityId;
|
||||
|
||||
factory _$ScheduleParameters(
|
||||
[void Function(ScheduleParametersBuilder) updates]) =>
|
||||
[void Function(ScheduleParametersBuilder)? updates]) =>
|
||||
(new ScheduleParametersBuilder()..update(updates))._build();
|
||||
|
||||
_$ScheduleParameters._(
|
||||
|
|
@ -943,10 +945,10 @@ class _$ScheduleParameters extends ScheduleParameters {
|
|||
entityId == other.entityId;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, dateRange.hashCode);
|
||||
_$hash = $jc(_$hash, showPaymentsTable.hashCode);
|
||||
|
|
@ -979,48 +981,48 @@ class _$ScheduleParameters extends ScheduleParameters {
|
|||
|
||||
class ScheduleParametersBuilder
|
||||
implements Builder<ScheduleParameters, ScheduleParametersBuilder> {
|
||||
_$ScheduleParameters _$v;
|
||||
_$ScheduleParameters? _$v;
|
||||
|
||||
String _dateRange;
|
||||
String get dateRange => _$this._dateRange;
|
||||
set dateRange(String dateRange) => _$this._dateRange = dateRange;
|
||||
String? _dateRange;
|
||||
String? get dateRange => _$this._dateRange;
|
||||
set dateRange(String? dateRange) => _$this._dateRange = dateRange;
|
||||
|
||||
bool _showPaymentsTable;
|
||||
bool get showPaymentsTable => _$this._showPaymentsTable;
|
||||
set showPaymentsTable(bool showPaymentsTable) =>
|
||||
bool? _showPaymentsTable;
|
||||
bool? get showPaymentsTable => _$this._showPaymentsTable;
|
||||
set showPaymentsTable(bool? showPaymentsTable) =>
|
||||
_$this._showPaymentsTable = showPaymentsTable;
|
||||
|
||||
bool _showCreditsTable;
|
||||
bool get showCreditsTable => _$this._showCreditsTable;
|
||||
set showCreditsTable(bool showCreditsTable) =>
|
||||
bool? _showCreditsTable;
|
||||
bool? get showCreditsTable => _$this._showCreditsTable;
|
||||
set showCreditsTable(bool? showCreditsTable) =>
|
||||
_$this._showCreditsTable = showCreditsTable;
|
||||
|
||||
bool _showAgingTable;
|
||||
bool get showAgingTable => _$this._showAgingTable;
|
||||
set showAgingTable(bool showAgingTable) =>
|
||||
bool? _showAgingTable;
|
||||
bool? get showAgingTable => _$this._showAgingTable;
|
||||
set showAgingTable(bool? showAgingTable) =>
|
||||
_$this._showAgingTable = showAgingTable;
|
||||
|
||||
bool _onlyClientsWithInvoices;
|
||||
bool get onlyClientsWithInvoices => _$this._onlyClientsWithInvoices;
|
||||
set onlyClientsWithInvoices(bool onlyClientsWithInvoices) =>
|
||||
bool? _onlyClientsWithInvoices;
|
||||
bool? get onlyClientsWithInvoices => _$this._onlyClientsWithInvoices;
|
||||
set onlyClientsWithInvoices(bool? onlyClientsWithInvoices) =>
|
||||
_$this._onlyClientsWithInvoices = onlyClientsWithInvoices;
|
||||
|
||||
String _status;
|
||||
String get status => _$this._status;
|
||||
set status(String status) => _$this._status = status;
|
||||
String? _status;
|
||||
String? get status => _$this._status;
|
||||
set status(String? status) => _$this._status = status;
|
||||
|
||||
ListBuilder<String> _clients;
|
||||
ListBuilder<String>? _clients;
|
||||
ListBuilder<String> get clients =>
|
||||
_$this._clients ??= new ListBuilder<String>();
|
||||
set clients(ListBuilder<String> clients) => _$this._clients = clients;
|
||||
set clients(ListBuilder<String>? clients) => _$this._clients = clients;
|
||||
|
||||
String _entityType;
|
||||
String get entityType => _$this._entityType;
|
||||
set entityType(String entityType) => _$this._entityType = entityType;
|
||||
String? _entityType;
|
||||
String? get entityType => _$this._entityType;
|
||||
set entityType(String? entityType) => _$this._entityType = entityType;
|
||||
|
||||
String _entityId;
|
||||
String get entityId => _$this._entityId;
|
||||
set entityId(String entityId) => _$this._entityId = entityId;
|
||||
String? _entityId;
|
||||
String? get entityId => _$this._entityId;
|
||||
set entityId(String? entityId) => _$this._entityId = entityId;
|
||||
|
||||
ScheduleParametersBuilder();
|
||||
|
||||
|
|
@ -1048,7 +1050,7 @@ class ScheduleParametersBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(ScheduleParametersBuilder) updates) {
|
||||
void update(void Function(ScheduleParametersBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1070,7 +1072,7 @@ class ScheduleParametersBuilder
|
|||
entityType: entityType,
|
||||
entityId: entityId);
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'clients';
|
||||
_clients?.build();
|
||||
|
|
|
|||
|
|
@ -243,25 +243,6 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(BankAccountEntity)]),
|
||||
() => new ListBuilder<BankAccountEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltList, const [const FullType(ClientContactEntity)]),
|
||||
() => new ListBuilder<ClientContactEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(ActivityEntity)]),
|
||||
() => new ListBuilder<ActivityEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(LedgerEntity)]),
|
||||
() => new ListBuilder<LedgerEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(GatewayTokenEntity)]),
|
||||
() => new ListBuilder<GatewayTokenEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(DocumentEntity)]),
|
||||
() => new ListBuilder<DocumentEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(SystemLogEntity)]),
|
||||
() => new ListBuilder<SystemLogEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(ClientEntity)]),
|
||||
() => new ListBuilder<ClientEntity>())
|
||||
|
|
@ -511,8 +492,9 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
BuiltList, const [const FullType(InvoiceScheduleEntity)]),
|
||||
() => new ListBuilder<InvoiceScheduleEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(InvoiceItemEntity)]),
|
||||
() => new ListBuilder<InvoiceItemEntity>())
|
||||
const FullType(
|
||||
BuiltList, const [const FullType.nullable(InvoiceItemEntity)]),
|
||||
() => new ListBuilder<InvoiceItemEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(InvitationEntity)]),
|
||||
() => new ListBuilder<InvitationEntity>())
|
||||
|
|
@ -593,10 +575,6 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(TransactionEntity)]),
|
||||
() => new ListBuilder<TransactionEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltList, const [const FullType(TransactionRuleCriteriaEntity)]),
|
||||
() => new ListBuilder<TransactionRuleCriteriaEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltList, const [const FullType(TransactionRuleEntity)]),
|
||||
|
|
@ -610,16 +588,6 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(UserEntity)]),
|
||||
() => new ListBuilder<UserEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltList, const [const FullType(VendorContactEntity)]),
|
||||
() => new ListBuilder<VendorContactEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(ActivityEntity)]),
|
||||
() => new ListBuilder<ActivityEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(DocumentEntity)]),
|
||||
() => new ListBuilder<DocumentEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(VendorEntity)]),
|
||||
() => new ListBuilder<VendorEntity>())
|
||||
|
|
@ -627,11 +595,38 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
const FullType(BuiltList, const [const FullType(WebhookEntity)]),
|
||||
() => new ListBuilder<WebhookEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(EntityType),
|
||||
const FullType(BuiltList, const [const FullType(String)])
|
||||
]),
|
||||
() => new MapBuilder<EntityType, BuiltList<String>>())
|
||||
const FullType(
|
||||
BuiltList, const [const FullType.nullable(ClientContactEntity)]),
|
||||
() => new ListBuilder<ClientContactEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(ActivityEntity)]),
|
||||
() => new ListBuilder<ActivityEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(LedgerEntity)]),
|
||||
() => new ListBuilder<LedgerEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(GatewayTokenEntity)]),
|
||||
() => new ListBuilder<GatewayTokenEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(DocumentEntity)]),
|
||||
() => new ListBuilder<DocumentEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(SystemLogEntity)]),
|
||||
() => new ListBuilder<SystemLogEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList,
|
||||
const [const FullType.nullable(TransactionRuleCriteriaEntity)]),
|
||||
() => new ListBuilder<TransactionRuleCriteriaEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltList, const [const FullType.nullable(VendorContactEntity)]),
|
||||
() => new ListBuilder<VendorContactEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(ActivityEntity)]),
|
||||
() => new ListBuilder<ActivityEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(DocumentEntity)]),
|
||||
() => new ListBuilder<DocumentEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(EntityType), const FullType(bool)]),
|
||||
|
|
@ -661,15 +656,6 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(CompanyPrefState)]),
|
||||
() => new MapBuilder<String, CompanyPrefState>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(BankAccountEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, BankAccountEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
|
|
@ -691,207 +677,24 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(DashboardField)]),
|
||||
() => new ListBuilder<DashboardField>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(ClientEntity)]),
|
||||
() => new MapBuilder<String, ClientEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(CompanyGatewayEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, CompanyGatewayEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(CurrencyEntity)]),
|
||||
() => new MapBuilder<String, CurrencyEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(SizeEntity)]),
|
||||
() => new MapBuilder<String, SizeEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(GatewayEntity)]),
|
||||
() => new MapBuilder<String, GatewayEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(IndustryEntity)]),
|
||||
() => new MapBuilder<String, IndustryEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(TimezoneEntity)]),
|
||||
() => new MapBuilder<String, TimezoneEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(DateFormatEntity)]),
|
||||
() => new MapBuilder<String, DateFormatEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(LanguageEntity)]),
|
||||
() => new MapBuilder<String, LanguageEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(PaymentTypeEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, PaymentTypeEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(CountryEntity)]),
|
||||
() => new MapBuilder<String, CountryEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(TemplateEntity)]),
|
||||
() => new MapBuilder<String, TemplateEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(DesignEntity)]),
|
||||
() => new MapBuilder<String, DesignEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(DocumentEntity)]),
|
||||
() => new MapBuilder<String, DocumentEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(ExpenseCategoryEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, ExpenseCategoryEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(ExpenseEntity)]),
|
||||
() => new MapBuilder<String, ExpenseEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(ExpenseEntity)]),
|
||||
() => new MapBuilder<String, ExpenseEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(FeesAndLimitsSettings)
|
||||
]),
|
||||
() => new MapBuilder<String, FeesAndLimitsSettings>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(SystemLogEntity)]),
|
||||
() => new ListBuilder<SystemLogEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(GatewayOptionsEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, GatewayOptionsEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(GroupEntity)]),
|
||||
() => new MapBuilder<String, GroupEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(ImportRequestMapping)
|
||||
]),
|
||||
() => new MapBuilder<String, ImportRequestMapping>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(InvoiceEntity)]),
|
||||
() => new MapBuilder<String, InvoiceEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(InvoiceEntity)]),
|
||||
() => new MapBuilder<String, InvoiceEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(InvoiceEntity)]),
|
||||
() => new MapBuilder<String, InvoiceEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(InvoiceEntity)]),
|
||||
() => new MapBuilder<String, InvoiceEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(InvoiceEntity)]),
|
||||
() => new MapBuilder<String, InvoiceEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(PaymentEntity)]),
|
||||
() => new MapBuilder<String, PaymentEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(PaymentTermEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, PaymentTermEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(PreImportResponseEntityDetails)
|
||||
]),
|
||||
() => new MapBuilder<String, PreImportResponseEntityDetails>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(ProductEntity)]),
|
||||
() => new MapBuilder<String, ProductEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(ProjectEntity)]),
|
||||
() => new MapBuilder<String, ProjectEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(ScheduleEntity)]),
|
||||
() => new MapBuilder<String, ScheduleEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltMap, const [const FullType(String), const FullType(String)]),
|
||||
|
|
@ -904,43 +707,6 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
const FullType(
|
||||
BuiltMap, const [const FullType(String), const FullType(String)]),
|
||||
() => new MapBuilder<String, String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltMap, const [const FullType(String), const FullType(String)]),
|
||||
() => new MapBuilder<String, String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltMap, const [const FullType(String), const FullType(String)]),
|
||||
() => new MapBuilder<String, String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(BuiltList, const [const FullType(String)])
|
||||
]),
|
||||
() => new MapBuilder<String, BuiltList<String>>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(SubscriptionEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, SubscriptionEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(TaskEntity)]),
|
||||
() => new MapBuilder<String, TaskEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(TaskStatusEntity)]),
|
||||
() => new MapBuilder<String, TaskStatusEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
|
|
@ -953,63 +719,360 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
const FullType(TaxConfigSubregionEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, TaxConfigSubregionEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(TaxRateEntity)]),
|
||||
() => new MapBuilder<String, TaxRateEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(TokenEntity)]),
|
||||
() => new MapBuilder<String, TokenEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(TransactionEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, TransactionEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(TransactionRuleEntity)
|
||||
]),
|
||||
() => new MapBuilder<String, TransactionRuleEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(UserEntity)]),
|
||||
() => new MapBuilder<String, UserEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(VendorEntity)]),
|
||||
() => new MapBuilder<String, VendorEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(WebhookEntity)]),
|
||||
() => new MapBuilder<String, WebhookEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(
|
||||
BuiltMap, const [const FullType(int), const FullType(String)]),
|
||||
() => new MapBuilder<int, String>()))
|
||||
() => new MapBuilder<int, String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(EntityType),
|
||||
const FullType(BuiltList, const [const FullType(String)])
|
||||
]),
|
||||
() => new MapBuilder<EntityType?, BuiltList<String>>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType(FeesAndLimitsSettings)
|
||||
]),
|
||||
() => new MapBuilder<String?, FeesAndLimitsSettings>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(SystemLogEntity)]),
|
||||
() => new ListBuilder<SystemLogEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType.nullable(String), const FullType(String)]),
|
||||
() => new MapBuilder<String?, String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(BuiltList, const [const FullType(String)])
|
||||
]),
|
||||
() => new MapBuilder<String, BuiltList<String>>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(BankAccountEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, BankAccountEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(ClientEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, ClientEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(CompanyGatewayEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, CompanyGatewayEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(CurrencyEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, CurrencyEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(SizeEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, SizeEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(GatewayEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, GatewayEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(IndustryEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, IndustryEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(TimezoneEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, TimezoneEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(DateFormatEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, DateFormatEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(LanguageEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, LanguageEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(PaymentTypeEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, PaymentTypeEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(CountryEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, CountryEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(TemplateEntity)]),
|
||||
() => new MapBuilder<String, TemplateEntity>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(DesignEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, DesignEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(DocumentEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, DocumentEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(ExpenseCategoryEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, ExpenseCategoryEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(ExpenseEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, ExpenseEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(ExpenseEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, ExpenseEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(GroupEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, GroupEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(InvoiceEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, InvoiceEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(InvoiceEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, InvoiceEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(InvoiceEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, InvoiceEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(InvoiceEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, InvoiceEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(InvoiceEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, InvoiceEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(PaymentEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, PaymentEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(PaymentTermEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, PaymentTermEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(ProductEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, ProductEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(ProjectEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, ProjectEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(ScheduleEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, ScheduleEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(String)
|
||||
]),
|
||||
() => new MapBuilder<String?, String?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(SubscriptionEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, SubscriptionEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(TaskEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, TaskEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(TaskStatusEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, TaskStatusEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(TaxRateEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, TaxRateEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(TokenEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, TokenEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(TransactionEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, TransactionEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(TransactionRuleEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, TransactionRuleEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(UserEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, UserEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(VendorEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, VendorEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltMap, const [
|
||||
const FullType.nullable(String),
|
||||
const FullType.nullable(WebhookEntity)
|
||||
]),
|
||||
() => new MapBuilder<String?, WebhookEntity?>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(String)]),
|
||||
() => new ListBuilder<String>()))
|
||||
.build();
|
||||
|
||||
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -15,11 +15,11 @@ class ColorTheme {
|
|||
this.colorDarkGray = const Color(0xff444444),
|
||||
});
|
||||
|
||||
Color colorPrimary;
|
||||
Color colorInfo;
|
||||
Color colorSuccess;
|
||||
Color colorWarning;
|
||||
Color colorDanger;
|
||||
Color? colorPrimary;
|
||||
Color? colorInfo;
|
||||
Color? colorSuccess;
|
||||
Color? colorWarning;
|
||||
Color? colorDanger;
|
||||
Color colorLightGray;
|
||||
Color colorDarkGray;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ abstract class CountryEntity extends Object
|
|||
*/
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ abstract class CountryEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ abstract class CountryEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<CountryEntity> get serializer => _$countryEntitySerializer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$CountryListResponseSerializer
|
|||
final String wireName = 'CountryListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, CountryListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -39,21 +39,21 @@ class _$CountryListResponseSerializer
|
|||
|
||||
@override
|
||||
CountryListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CountryListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(CountryEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(CountryEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$CountryItemResponseSerializer
|
|||
final String wireName = 'CountryItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, CountryItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(CountryEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$CountryItemResponseSerializer
|
|||
|
||||
@override
|
||||
CountryItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CountryItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(CountryEntity)) as CountryEntity);
|
||||
specifiedType: const FullType(CountryEntity))! as CountryEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,9 +115,9 @@ class _$CountryEntitySerializer implements StructuredSerializer<CountryEntity> {
|
|||
final String wireName = 'CountryEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, CountryEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, CountryEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'swap_postal_code',
|
||||
|
|
@ -145,47 +145,47 @@ class _$CountryEntitySerializer implements StructuredSerializer<CountryEntity> {
|
|||
|
||||
@override
|
||||
CountryEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CountryEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'swap_postal_code':
|
||||
result.swapPostalCode = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'swap_currency_symbol':
|
||||
result.swapCurrencySymbol = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'thousand_separator':
|
||||
result.thousandSeparator = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'decimal_separator':
|
||||
result.decimalSeparator = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'iso_3166_2':
|
||||
result.iso2 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'iso_3166_3':
|
||||
result.iso3 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -199,10 +199,10 @@ class _$CountryListResponse extends CountryListResponse {
|
|||
final BuiltList<CountryEntity> data;
|
||||
|
||||
factory _$CountryListResponse(
|
||||
[void Function(CountryListResponseBuilder) updates]) =>
|
||||
[void Function(CountryListResponseBuilder)? updates]) =>
|
||||
(new CountryListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$CountryListResponse._({this.data}) : super._() {
|
||||
_$CountryListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'CountryListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -221,10 +221,10 @@ class _$CountryListResponse extends CountryListResponse {
|
|||
return other is CountryListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -241,12 +241,12 @@ class _$CountryListResponse extends CountryListResponse {
|
|||
|
||||
class CountryListResponseBuilder
|
||||
implements Builder<CountryListResponse, CountryListResponseBuilder> {
|
||||
_$CountryListResponse _$v;
|
||||
_$CountryListResponse? _$v;
|
||||
|
||||
ListBuilder<CountryEntity> _data;
|
||||
ListBuilder<CountryEntity>? _data;
|
||||
ListBuilder<CountryEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<CountryEntity>();
|
||||
set data(ListBuilder<CountryEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<CountryEntity>? data) => _$this._data = data;
|
||||
|
||||
CountryListResponseBuilder();
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ class CountryListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CountryListResponseBuilder) updates) {
|
||||
void update(void Function(CountryListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ class CountryListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$CountryListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -298,10 +298,10 @@ class _$CountryItemResponse extends CountryItemResponse {
|
|||
final CountryEntity data;
|
||||
|
||||
factory _$CountryItemResponse(
|
||||
[void Function(CountryItemResponseBuilder) updates]) =>
|
||||
[void Function(CountryItemResponseBuilder)? updates]) =>
|
||||
(new CountryItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$CountryItemResponse._({this.data}) : super._() {
|
||||
_$CountryItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'CountryItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -320,10 +320,10 @@ class _$CountryItemResponse extends CountryItemResponse {
|
|||
return other is CountryItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -340,11 +340,11 @@ class _$CountryItemResponse extends CountryItemResponse {
|
|||
|
||||
class CountryItemResponseBuilder
|
||||
implements Builder<CountryItemResponse, CountryItemResponseBuilder> {
|
||||
_$CountryItemResponse _$v;
|
||||
_$CountryItemResponse? _$v;
|
||||
|
||||
CountryEntityBuilder _data;
|
||||
CountryEntityBuilder? _data;
|
||||
CountryEntityBuilder get data => _$this._data ??= new CountryEntityBuilder();
|
||||
set data(CountryEntityBuilder data) => _$this._data = data;
|
||||
set data(CountryEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
CountryItemResponseBuilder();
|
||||
|
||||
|
|
@ -364,7 +364,7 @@ class CountryItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CountryItemResponseBuilder) updates) {
|
||||
void update(void Function(CountryItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -376,7 +376,7 @@ class CountryItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$CountryItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -409,18 +409,18 @@ class _$CountryEntity extends CountryEntity {
|
|||
@override
|
||||
final String id;
|
||||
|
||||
factory _$CountryEntity([void Function(CountryEntityBuilder) updates]) =>
|
||||
factory _$CountryEntity([void Function(CountryEntityBuilder)? updates]) =>
|
||||
(new CountryEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$CountryEntity._(
|
||||
{this.name,
|
||||
this.swapPostalCode,
|
||||
this.swapCurrencySymbol,
|
||||
this.thousandSeparator,
|
||||
this.decimalSeparator,
|
||||
this.iso2,
|
||||
this.iso3,
|
||||
this.id})
|
||||
{required this.name,
|
||||
required this.swapPostalCode,
|
||||
required this.swapCurrencySymbol,
|
||||
required this.thousandSeparator,
|
||||
required this.decimalSeparator,
|
||||
required this.iso2,
|
||||
required this.iso3,
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'CountryEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -457,10 +457,10 @@ class _$CountryEntity extends CountryEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, swapPostalCode.hashCode);
|
||||
|
|
@ -491,43 +491,43 @@ class _$CountryEntity extends CountryEntity {
|
|||
|
||||
class CountryEntityBuilder
|
||||
implements Builder<CountryEntity, CountryEntityBuilder> {
|
||||
_$CountryEntity _$v;
|
||||
_$CountryEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
bool _swapPostalCode;
|
||||
bool get swapPostalCode => _$this._swapPostalCode;
|
||||
set swapPostalCode(bool swapPostalCode) =>
|
||||
bool? _swapPostalCode;
|
||||
bool? get swapPostalCode => _$this._swapPostalCode;
|
||||
set swapPostalCode(bool? swapPostalCode) =>
|
||||
_$this._swapPostalCode = swapPostalCode;
|
||||
|
||||
bool _swapCurrencySymbol;
|
||||
bool get swapCurrencySymbol => _$this._swapCurrencySymbol;
|
||||
set swapCurrencySymbol(bool swapCurrencySymbol) =>
|
||||
bool? _swapCurrencySymbol;
|
||||
bool? get swapCurrencySymbol => _$this._swapCurrencySymbol;
|
||||
set swapCurrencySymbol(bool? swapCurrencySymbol) =>
|
||||
_$this._swapCurrencySymbol = swapCurrencySymbol;
|
||||
|
||||
String _thousandSeparator;
|
||||
String get thousandSeparator => _$this._thousandSeparator;
|
||||
set thousandSeparator(String thousandSeparator) =>
|
||||
String? _thousandSeparator;
|
||||
String? get thousandSeparator => _$this._thousandSeparator;
|
||||
set thousandSeparator(String? thousandSeparator) =>
|
||||
_$this._thousandSeparator = thousandSeparator;
|
||||
|
||||
String _decimalSeparator;
|
||||
String get decimalSeparator => _$this._decimalSeparator;
|
||||
set decimalSeparator(String decimalSeparator) =>
|
||||
String? _decimalSeparator;
|
||||
String? get decimalSeparator => _$this._decimalSeparator;
|
||||
set decimalSeparator(String? decimalSeparator) =>
|
||||
_$this._decimalSeparator = decimalSeparator;
|
||||
|
||||
String _iso2;
|
||||
String get iso2 => _$this._iso2;
|
||||
set iso2(String iso2) => _$this._iso2 = iso2;
|
||||
String? _iso2;
|
||||
String? get iso2 => _$this._iso2;
|
||||
set iso2(String? iso2) => _$this._iso2 = iso2;
|
||||
|
||||
String _iso3;
|
||||
String get iso3 => _$this._iso3;
|
||||
set iso3(String iso3) => _$this._iso3 = iso3;
|
||||
String? _iso3;
|
||||
String? get iso3 => _$this._iso3;
|
||||
set iso3(String? iso3) => _$this._iso3 = iso3;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
CountryEntityBuilder();
|
||||
|
||||
|
|
@ -554,7 +554,7 @@ class CountryEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CountryEntityBuilder) updates) {
|
||||
void update(void Function(CountryEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ abstract class CurrencyEntity extends Object
|
|||
double get exchangeRate;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -111,7 +111,7 @@ abstract class CurrencyEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ abstract class CurrencyEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<CurrencyEntity> get serializer =>
|
||||
_$currencyEntitySerializer;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$CurrencyListResponseSerializer
|
|||
final String wireName = 'CurrencyListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, CurrencyListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$CurrencyListResponseSerializer
|
|||
|
||||
@override
|
||||
CurrencyListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CurrencyListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(CurrencyEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(CurrencyEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$CurrencyItemResponseSerializer
|
|||
final String wireName = 'CurrencyItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, CurrencyItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(CurrencyEntity)),
|
||||
|
|
@ -87,19 +87,20 @@ class _$CurrencyItemResponseSerializer
|
|||
|
||||
@override
|
||||
CurrencyItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CurrencyItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(CurrencyEntity)) as CurrencyEntity);
|
||||
specifiedType: const FullType(CurrencyEntity))!
|
||||
as CurrencyEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,9 +117,9 @@ class _$CurrencyEntitySerializer
|
|||
final String wireName = 'CurrencyEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, CurrencyEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, CurrencyEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'symbol',
|
||||
|
|
@ -150,51 +151,51 @@ class _$CurrencyEntitySerializer
|
|||
|
||||
@override
|
||||
CurrencyEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new CurrencyEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'symbol':
|
||||
result.symbol = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'precision':
|
||||
result.precision = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'thousand_separator':
|
||||
result.thousandSeparator = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'decimal_separator':
|
||||
result.decimalSeparator = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'code':
|
||||
result.code = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'swap_currency_symbol':
|
||||
result.swapCurrencySymbol = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'exchange_rate':
|
||||
result.exchangeRate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -208,10 +209,10 @@ class _$CurrencyListResponse extends CurrencyListResponse {
|
|||
final BuiltList<CurrencyEntity> data;
|
||||
|
||||
factory _$CurrencyListResponse(
|
||||
[void Function(CurrencyListResponseBuilder) updates]) =>
|
||||
[void Function(CurrencyListResponseBuilder)? updates]) =>
|
||||
(new CurrencyListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$CurrencyListResponse._({this.data}) : super._() {
|
||||
_$CurrencyListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'CurrencyListResponse', 'data');
|
||||
}
|
||||
|
|
@ -231,10 +232,10 @@ class _$CurrencyListResponse extends CurrencyListResponse {
|
|||
return other is CurrencyListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -251,12 +252,12 @@ class _$CurrencyListResponse extends CurrencyListResponse {
|
|||
|
||||
class CurrencyListResponseBuilder
|
||||
implements Builder<CurrencyListResponse, CurrencyListResponseBuilder> {
|
||||
_$CurrencyListResponse _$v;
|
||||
_$CurrencyListResponse? _$v;
|
||||
|
||||
ListBuilder<CurrencyEntity> _data;
|
||||
ListBuilder<CurrencyEntity>? _data;
|
||||
ListBuilder<CurrencyEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<CurrencyEntity>();
|
||||
set data(ListBuilder<CurrencyEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<CurrencyEntity>? data) => _$this._data = data;
|
||||
|
||||
CurrencyListResponseBuilder();
|
||||
|
||||
|
|
@ -276,7 +277,7 @@ class CurrencyListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CurrencyListResponseBuilder) updates) {
|
||||
void update(void Function(CurrencyListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -288,7 +289,7 @@ class CurrencyListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$CurrencyListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -308,10 +309,10 @@ class _$CurrencyItemResponse extends CurrencyItemResponse {
|
|||
final CurrencyEntity data;
|
||||
|
||||
factory _$CurrencyItemResponse(
|
||||
[void Function(CurrencyItemResponseBuilder) updates]) =>
|
||||
[void Function(CurrencyItemResponseBuilder)? updates]) =>
|
||||
(new CurrencyItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$CurrencyItemResponse._({this.data}) : super._() {
|
||||
_$CurrencyItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'CurrencyItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -331,10 +332,10 @@ class _$CurrencyItemResponse extends CurrencyItemResponse {
|
|||
return other is CurrencyItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -351,12 +352,12 @@ class _$CurrencyItemResponse extends CurrencyItemResponse {
|
|||
|
||||
class CurrencyItemResponseBuilder
|
||||
implements Builder<CurrencyItemResponse, CurrencyItemResponseBuilder> {
|
||||
_$CurrencyItemResponse _$v;
|
||||
_$CurrencyItemResponse? _$v;
|
||||
|
||||
CurrencyEntityBuilder _data;
|
||||
CurrencyEntityBuilder? _data;
|
||||
CurrencyEntityBuilder get data =>
|
||||
_$this._data ??= new CurrencyEntityBuilder();
|
||||
set data(CurrencyEntityBuilder data) => _$this._data = data;
|
||||
set data(CurrencyEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
CurrencyItemResponseBuilder();
|
||||
|
||||
|
|
@ -376,7 +377,7 @@ class CurrencyItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CurrencyItemResponseBuilder) updates) {
|
||||
void update(void Function(CurrencyItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -388,7 +389,7 @@ class CurrencyItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$CurrencyItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -423,19 +424,19 @@ class _$CurrencyEntity extends CurrencyEntity {
|
|||
@override
|
||||
final String id;
|
||||
|
||||
factory _$CurrencyEntity([void Function(CurrencyEntityBuilder) updates]) =>
|
||||
factory _$CurrencyEntity([void Function(CurrencyEntityBuilder)? updates]) =>
|
||||
(new CurrencyEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$CurrencyEntity._(
|
||||
{this.name,
|
||||
this.symbol,
|
||||
this.precision,
|
||||
this.thousandSeparator,
|
||||
this.decimalSeparator,
|
||||
this.code,
|
||||
this.swapCurrencySymbol,
|
||||
this.exchangeRate,
|
||||
this.id})
|
||||
{required this.name,
|
||||
required this.symbol,
|
||||
required this.precision,
|
||||
required this.thousandSeparator,
|
||||
required this.decimalSeparator,
|
||||
required this.code,
|
||||
required this.swapCurrencySymbol,
|
||||
required this.exchangeRate,
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'CurrencyEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(symbol, r'CurrencyEntity', 'symbol');
|
||||
|
|
@ -476,10 +477,10 @@ class _$CurrencyEntity extends CurrencyEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, symbol.hashCode);
|
||||
|
|
@ -512,46 +513,46 @@ class _$CurrencyEntity extends CurrencyEntity {
|
|||
|
||||
class CurrencyEntityBuilder
|
||||
implements Builder<CurrencyEntity, CurrencyEntityBuilder> {
|
||||
_$CurrencyEntity _$v;
|
||||
_$CurrencyEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _symbol;
|
||||
String get symbol => _$this._symbol;
|
||||
set symbol(String symbol) => _$this._symbol = symbol;
|
||||
String? _symbol;
|
||||
String? get symbol => _$this._symbol;
|
||||
set symbol(String? symbol) => _$this._symbol = symbol;
|
||||
|
||||
int _precision;
|
||||
int get precision => _$this._precision;
|
||||
set precision(int precision) => _$this._precision = precision;
|
||||
int? _precision;
|
||||
int? get precision => _$this._precision;
|
||||
set precision(int? precision) => _$this._precision = precision;
|
||||
|
||||
String _thousandSeparator;
|
||||
String get thousandSeparator => _$this._thousandSeparator;
|
||||
set thousandSeparator(String thousandSeparator) =>
|
||||
String? _thousandSeparator;
|
||||
String? get thousandSeparator => _$this._thousandSeparator;
|
||||
set thousandSeparator(String? thousandSeparator) =>
|
||||
_$this._thousandSeparator = thousandSeparator;
|
||||
|
||||
String _decimalSeparator;
|
||||
String get decimalSeparator => _$this._decimalSeparator;
|
||||
set decimalSeparator(String decimalSeparator) =>
|
||||
String? _decimalSeparator;
|
||||
String? get decimalSeparator => _$this._decimalSeparator;
|
||||
set decimalSeparator(String? decimalSeparator) =>
|
||||
_$this._decimalSeparator = decimalSeparator;
|
||||
|
||||
String _code;
|
||||
String get code => _$this._code;
|
||||
set code(String code) => _$this._code = code;
|
||||
String? _code;
|
||||
String? get code => _$this._code;
|
||||
set code(String? code) => _$this._code = code;
|
||||
|
||||
bool _swapCurrencySymbol;
|
||||
bool get swapCurrencySymbol => _$this._swapCurrencySymbol;
|
||||
set swapCurrencySymbol(bool swapCurrencySymbol) =>
|
||||
bool? _swapCurrencySymbol;
|
||||
bool? get swapCurrencySymbol => _$this._swapCurrencySymbol;
|
||||
set swapCurrencySymbol(bool? swapCurrencySymbol) =>
|
||||
_$this._swapCurrencySymbol = swapCurrencySymbol;
|
||||
|
||||
double _exchangeRate;
|
||||
double get exchangeRate => _$this._exchangeRate;
|
||||
set exchangeRate(double exchangeRate) => _$this._exchangeRate = exchangeRate;
|
||||
double? _exchangeRate;
|
||||
double? get exchangeRate => _$this._exchangeRate;
|
||||
set exchangeRate(double? exchangeRate) => _$this._exchangeRate = exchangeRate;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
CurrencyEntityBuilder();
|
||||
|
||||
|
|
@ -579,7 +580,7 @@ class CurrencyEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CurrencyEntityBuilder) updates) {
|
||||
void update(void Function(CurrencyEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ abstract class DateFormatEntity extends Object
|
|||
String get format;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ abstract class DateFormatEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ abstract class DateFormatEntity extends Object
|
|||
String get listDisplayName => preview;
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<DateFormatEntity> get serializer =>
|
||||
_$dateFormatEntitySerializer;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$DateFormatListResponseSerializer
|
|||
final String wireName = 'DateFormatListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DateFormatListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$DateFormatListResponseSerializer
|
|||
|
||||
@override
|
||||
DateFormatListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DateFormatListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DateFormatEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DateFormatEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$DateFormatItemResponseSerializer
|
|||
final String wireName = 'DateFormatItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DateFormatItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(DateFormatEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$DateFormatItemResponseSerializer
|
|||
|
||||
@override
|
||||
DateFormatItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DateFormatItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(DateFormatEntity))
|
||||
specifiedType: const FullType(DateFormatEntity))!
|
||||
as DateFormatEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -117,9 +117,9 @@ class _$DateFormatEntitySerializer
|
|||
final String wireName = 'DateFormatEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, DateFormatEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, DateFormatEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'format_dart',
|
||||
serializers.serialize(object.format,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -132,23 +132,23 @@ class _$DateFormatEntitySerializer
|
|||
|
||||
@override
|
||||
DateFormatEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DateFormatEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'format_dart':
|
||||
result.format = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -162,10 +162,10 @@ class _$DateFormatListResponse extends DateFormatListResponse {
|
|||
final BuiltList<DateFormatEntity> data;
|
||||
|
||||
factory _$DateFormatListResponse(
|
||||
[void Function(DateFormatListResponseBuilder) updates]) =>
|
||||
[void Function(DateFormatListResponseBuilder)? updates]) =>
|
||||
(new DateFormatListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DateFormatListResponse._({this.data}) : super._() {
|
||||
_$DateFormatListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'DateFormatListResponse', 'data');
|
||||
}
|
||||
|
|
@ -185,10 +185,10 @@ class _$DateFormatListResponse extends DateFormatListResponse {
|
|||
return other is DateFormatListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -205,12 +205,12 @@ class _$DateFormatListResponse extends DateFormatListResponse {
|
|||
|
||||
class DateFormatListResponseBuilder
|
||||
implements Builder<DateFormatListResponse, DateFormatListResponseBuilder> {
|
||||
_$DateFormatListResponse _$v;
|
||||
_$DateFormatListResponse? _$v;
|
||||
|
||||
ListBuilder<DateFormatEntity> _data;
|
||||
ListBuilder<DateFormatEntity>? _data;
|
||||
ListBuilder<DateFormatEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<DateFormatEntity>();
|
||||
set data(ListBuilder<DateFormatEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<DateFormatEntity>? data) => _$this._data = data;
|
||||
|
||||
DateFormatListResponseBuilder();
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ class DateFormatListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DateFormatListResponseBuilder) updates) {
|
||||
void update(void Function(DateFormatListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ class DateFormatListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DateFormatListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -262,10 +262,10 @@ class _$DateFormatItemResponse extends DateFormatItemResponse {
|
|||
final DateFormatEntity data;
|
||||
|
||||
factory _$DateFormatItemResponse(
|
||||
[void Function(DateFormatItemResponseBuilder) updates]) =>
|
||||
[void Function(DateFormatItemResponseBuilder)? updates]) =>
|
||||
(new DateFormatItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DateFormatItemResponse._({this.data}) : super._() {
|
||||
_$DateFormatItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'DateFormatItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -285,10 +285,10 @@ class _$DateFormatItemResponse extends DateFormatItemResponse {
|
|||
return other is DateFormatItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -305,12 +305,12 @@ class _$DateFormatItemResponse extends DateFormatItemResponse {
|
|||
|
||||
class DateFormatItemResponseBuilder
|
||||
implements Builder<DateFormatItemResponse, DateFormatItemResponseBuilder> {
|
||||
_$DateFormatItemResponse _$v;
|
||||
_$DateFormatItemResponse? _$v;
|
||||
|
||||
DateFormatEntityBuilder _data;
|
||||
DateFormatEntityBuilder? _data;
|
||||
DateFormatEntityBuilder get data =>
|
||||
_$this._data ??= new DateFormatEntityBuilder();
|
||||
set data(DateFormatEntityBuilder data) => _$this._data = data;
|
||||
set data(DateFormatEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
DateFormatItemResponseBuilder();
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ class DateFormatItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DateFormatItemResponseBuilder) updates) {
|
||||
void update(void Function(DateFormatItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ class DateFormatItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DateFormatItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -364,10 +364,10 @@ class _$DateFormatEntity extends DateFormatEntity {
|
|||
final String id;
|
||||
|
||||
factory _$DateFormatEntity(
|
||||
[void Function(DateFormatEntityBuilder) updates]) =>
|
||||
[void Function(DateFormatEntityBuilder)? updates]) =>
|
||||
(new DateFormatEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$DateFormatEntity._({this.format, this.id}) : super._() {
|
||||
_$DateFormatEntity._({required this.format, required this.id}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
format, r'DateFormatEntity', 'format');
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'DateFormatEntity', 'id');
|
||||
|
|
@ -389,10 +389,10 @@ class _$DateFormatEntity extends DateFormatEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, format.hashCode);
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
|
|
@ -411,15 +411,15 @@ class _$DateFormatEntity extends DateFormatEntity {
|
|||
|
||||
class DateFormatEntityBuilder
|
||||
implements Builder<DateFormatEntity, DateFormatEntityBuilder> {
|
||||
_$DateFormatEntity _$v;
|
||||
_$DateFormatEntity? _$v;
|
||||
|
||||
String _format;
|
||||
String get format => _$this._format;
|
||||
set format(String format) => _$this._format = format;
|
||||
String? _format;
|
||||
String? get format => _$this._format;
|
||||
set format(String? format) => _$this._format = format;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
DateFormatEntityBuilder();
|
||||
|
||||
|
|
@ -440,7 +440,7 @@ class DateFormatEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DateFormatEntityBuilder) updates) {
|
||||
void update(void Function(DateFormatEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$DatetimeFormatListResponseSerializer
|
|||
final String wireName = 'DatetimeFormatListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DatetimeFormatListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,15 +39,15 @@ class _$DatetimeFormatListResponseSerializer
|
|||
|
||||
@override
|
||||
DatetimeFormatListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DatetimeFormatListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
|
|
@ -73,10 +73,10 @@ class _$DatetimeFormatItemResponseSerializer
|
|||
final String wireName = 'DatetimeFormatItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DatetimeFormatItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(DatetimeFormatEntity)),
|
||||
|
|
@ -87,15 +87,15 @@ class _$DatetimeFormatItemResponseSerializer
|
|||
|
||||
@override
|
||||
DatetimeFormatItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DatetimeFormatItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
|
|
@ -120,10 +120,10 @@ class _$DatetimeFormatEntitySerializer
|
|||
final String wireName = 'DatetimeFormatEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DatetimeFormatEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
'format_dart',
|
||||
|
|
@ -136,23 +136,23 @@ class _$DatetimeFormatEntitySerializer
|
|||
|
||||
@override
|
||||
DatetimeFormatEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DatetimeFormatEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'format_dart':
|
||||
result.format = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -166,10 +166,10 @@ class _$DatetimeFormatListResponse extends DatetimeFormatListResponse {
|
|||
final BuiltList<DatetimeFormatEntity> data;
|
||||
|
||||
factory _$DatetimeFormatListResponse(
|
||||
[void Function(DatetimeFormatListResponseBuilder) updates]) =>
|
||||
[void Function(DatetimeFormatListResponseBuilder)? updates]) =>
|
||||
(new DatetimeFormatListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DatetimeFormatListResponse._({this.data}) : super._() {
|
||||
_$DatetimeFormatListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'DatetimeFormatListResponse', 'data');
|
||||
}
|
||||
|
|
@ -189,10 +189,10 @@ class _$DatetimeFormatListResponse extends DatetimeFormatListResponse {
|
|||
return other is DatetimeFormatListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -210,9 +210,9 @@ class _$DatetimeFormatListResponse extends DatetimeFormatListResponse {
|
|||
class DatetimeFormatListResponseBuilder
|
||||
implements
|
||||
Builder<DatetimeFormatListResponse, DatetimeFormatListResponseBuilder> {
|
||||
_$DatetimeFormatListResponse _$v;
|
||||
_$DatetimeFormatListResponse? _$v;
|
||||
|
||||
ListBuilder<DatetimeFormatEntity> _data;
|
||||
ListBuilder<DatetimeFormatEntity>? _data;
|
||||
ListBuilder<DatetimeFormatEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<DatetimeFormatEntity>();
|
||||
set data(ListBuilder<DatetimeFormatEntity> data) => _$this._data = data;
|
||||
|
|
@ -235,7 +235,7 @@ class DatetimeFormatListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DatetimeFormatListResponseBuilder) updates) {
|
||||
void update(void Function(DatetimeFormatListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ class DatetimeFormatListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DatetimeFormatListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -267,10 +267,10 @@ class _$DatetimeFormatItemResponse extends DatetimeFormatItemResponse {
|
|||
final DatetimeFormatEntity data;
|
||||
|
||||
factory _$DatetimeFormatItemResponse(
|
||||
[void Function(DatetimeFormatItemResponseBuilder) updates]) =>
|
||||
[void Function(DatetimeFormatItemResponseBuilder)? updates]) =>
|
||||
(new DatetimeFormatItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$DatetimeFormatItemResponse._({this.data}) : super._() {
|
||||
_$DatetimeFormatItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'DatetimeFormatItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -290,10 +290,10 @@ class _$DatetimeFormatItemResponse extends DatetimeFormatItemResponse {
|
|||
return other is DatetimeFormatItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -311,9 +311,9 @@ class _$DatetimeFormatItemResponse extends DatetimeFormatItemResponse {
|
|||
class DatetimeFormatItemResponseBuilder
|
||||
implements
|
||||
Builder<DatetimeFormatItemResponse, DatetimeFormatItemResponseBuilder> {
|
||||
_$DatetimeFormatItemResponse _$v;
|
||||
_$DatetimeFormatItemResponse? _$v;
|
||||
|
||||
DatetimeFormatEntityBuilder _data;
|
||||
DatetimeFormatEntityBuilder? _data;
|
||||
DatetimeFormatEntityBuilder get data =>
|
||||
_$this._data ??= new DatetimeFormatEntityBuilder();
|
||||
set data(DatetimeFormatEntityBuilder data) => _$this._data = data;
|
||||
|
|
@ -336,7 +336,7 @@ class DatetimeFormatItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DatetimeFormatItemResponseBuilder) updates) {
|
||||
void update(void Function(DatetimeFormatItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -348,7 +348,7 @@ class DatetimeFormatItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$DatetimeFormatItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -370,10 +370,10 @@ class _$DatetimeFormatEntity extends DatetimeFormatEntity {
|
|||
final String format;
|
||||
|
||||
factory _$DatetimeFormatEntity(
|
||||
[void Function(DatetimeFormatEntityBuilder) updates]) =>
|
||||
[void Function(DatetimeFormatEntityBuilder)? updates]) =>
|
||||
(new DatetimeFormatEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$DatetimeFormatEntity._({this.id, this.format}) : super._() {
|
||||
_$DatetimeFormatEntity._({required this.id, required this.format}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'DatetimeFormatEntity', 'id');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
format, r'DatetimeFormatEntity', 'format');
|
||||
|
|
@ -396,10 +396,10 @@ class _$DatetimeFormatEntity extends DatetimeFormatEntity {
|
|||
format == other.format;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, format.hashCode);
|
||||
|
|
@ -418,15 +418,15 @@ class _$DatetimeFormatEntity extends DatetimeFormatEntity {
|
|||
|
||||
class DatetimeFormatEntityBuilder
|
||||
implements Builder<DatetimeFormatEntity, DatetimeFormatEntityBuilder> {
|
||||
_$DatetimeFormatEntity _$v;
|
||||
_$DatetimeFormatEntity? _$v;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String _format;
|
||||
String get format => _$this._format;
|
||||
set format(String format) => _$this._format = format;
|
||||
String? _format;
|
||||
String? get format => _$this._format;
|
||||
set format(String? format) => _$this._format = format;
|
||||
|
||||
DatetimeFormatEntityBuilder();
|
||||
|
||||
|
|
@ -447,7 +447,7 @@ class DatetimeFormatEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DatetimeFormatEntityBuilder) updates) {
|
||||
void update(void Function(DatetimeFormatEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class _$DocumentStatusEntitySerializer
|
|||
final String wireName = 'DocumentStatusEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, DocumentStatusEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
'name',
|
||||
|
|
@ -35,23 +35,23 @@ class _$DocumentStatusEntitySerializer
|
|||
|
||||
@override
|
||||
DocumentStatusEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new DocumentStatusEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -67,10 +67,10 @@ class _$DocumentStatusEntity extends DocumentStatusEntity {
|
|||
final String name;
|
||||
|
||||
factory _$DocumentStatusEntity(
|
||||
[void Function(DocumentStatusEntityBuilder) updates]) =>
|
||||
[void Function(DocumentStatusEntityBuilder)? updates]) =>
|
||||
(new DocumentStatusEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$DocumentStatusEntity._({this.id, this.name}) : super._() {
|
||||
_$DocumentStatusEntity._({required this.id, required this.name}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'DocumentStatusEntity', 'id');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
name, r'DocumentStatusEntity', 'name');
|
||||
|
|
@ -93,10 +93,10 @@ class _$DocumentStatusEntity extends DocumentStatusEntity {
|
|||
name == other.name;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
|
|
@ -115,15 +115,15 @@ class _$DocumentStatusEntity extends DocumentStatusEntity {
|
|||
|
||||
class DocumentStatusEntityBuilder
|
||||
implements Builder<DocumentStatusEntity, DocumentStatusEntityBuilder> {
|
||||
_$DocumentStatusEntity _$v;
|
||||
_$DocumentStatusEntity? _$v;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
DocumentStatusEntityBuilder();
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ class DocumentStatusEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(DocumentStatusEntityBuilder) updates) {
|
||||
void update(void Function(DocumentStatusEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class FontFields {
|
|||
abstract class FontEntity extends Object
|
||||
with SelectableEntity
|
||||
implements Built<FontEntity, FontEntityBuilder> {
|
||||
factory FontEntity({String id, String name}) {
|
||||
factory FontEntity({String? id, String? name}) {
|
||||
return _$FontEntity._(
|
||||
id: id ?? '',
|
||||
name: name ?? '',
|
||||
|
|
@ -29,7 +29,7 @@ abstract class FontEntity extends Object
|
|||
String get name;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ abstract class FontEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ abstract class FontEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<FontEntity> get serializer => _$fontEntitySerializer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ class _$FontEntitySerializer implements StructuredSerializer<FontEntity> {
|
|||
final String wireName = 'FontEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, FontEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, FontEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'id',
|
||||
|
|
@ -28,23 +28,23 @@ class _$FontEntitySerializer implements StructuredSerializer<FontEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
FontEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
FontEntity deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new FontEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -59,10 +59,10 @@ class _$FontEntity extends FontEntity {
|
|||
@override
|
||||
final String id;
|
||||
|
||||
factory _$FontEntity([void Function(FontEntityBuilder) updates]) =>
|
||||
factory _$FontEntity([void Function(FontEntityBuilder)? updates]) =>
|
||||
(new FontEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$FontEntity._({this.name, this.id}) : super._() {
|
||||
_$FontEntity._({required this.name, required this.id}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'FontEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'FontEntity', 'id');
|
||||
}
|
||||
|
|
@ -80,10 +80,10 @@ class _$FontEntity extends FontEntity {
|
|||
return other is FontEntity && name == other.name && id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
|
|
@ -101,15 +101,15 @@ class _$FontEntity extends FontEntity {
|
|||
}
|
||||
|
||||
class FontEntityBuilder implements Builder<FontEntity, FontEntityBuilder> {
|
||||
_$FontEntity _$v;
|
||||
_$FontEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
FontEntityBuilder();
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ class FontEntityBuilder implements Builder<FontEntity, FontEntityBuilder> {
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(FontEntityBuilder) updates) {
|
||||
void update(void Function(FontEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ abstract class IndustryEntity extends Object
|
|||
String get name;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ abstract class IndustryEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ abstract class IndustryEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<IndustryEntity> get serializer =>
|
||||
_$industryEntitySerializer;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$IndustryListResponseSerializer
|
|||
final String wireName = 'IndustryListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, IndustryListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$IndustryListResponseSerializer
|
|||
|
||||
@override
|
||||
IndustryListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new IndustryListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(IndustryEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(IndustryEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$IndustryItemResponseSerializer
|
|||
final String wireName = 'IndustryItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, IndustryItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(IndustryEntity)),
|
||||
|
|
@ -87,19 +87,20 @@ class _$IndustryItemResponseSerializer
|
|||
|
||||
@override
|
||||
IndustryItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new IndustryItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(IndustryEntity)) as IndustryEntity);
|
||||
specifiedType: const FullType(IndustryEntity))!
|
||||
as IndustryEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,9 +117,9 @@ class _$IndustryEntitySerializer
|
|||
final String wireName = 'IndustryEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, IndustryEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, IndustryEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'id',
|
||||
|
|
@ -130,23 +131,23 @@ class _$IndustryEntitySerializer
|
|||
|
||||
@override
|
||||
IndustryEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new IndustryEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -160,10 +161,10 @@ class _$IndustryListResponse extends IndustryListResponse {
|
|||
final BuiltList<IndustryEntity> data;
|
||||
|
||||
factory _$IndustryListResponse(
|
||||
[void Function(IndustryListResponseBuilder) updates]) =>
|
||||
[void Function(IndustryListResponseBuilder)? updates]) =>
|
||||
(new IndustryListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$IndustryListResponse._({this.data}) : super._() {
|
||||
_$IndustryListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'IndustryListResponse', 'data');
|
||||
}
|
||||
|
|
@ -183,10 +184,10 @@ class _$IndustryListResponse extends IndustryListResponse {
|
|||
return other is IndustryListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -203,12 +204,12 @@ class _$IndustryListResponse extends IndustryListResponse {
|
|||
|
||||
class IndustryListResponseBuilder
|
||||
implements Builder<IndustryListResponse, IndustryListResponseBuilder> {
|
||||
_$IndustryListResponse _$v;
|
||||
_$IndustryListResponse? _$v;
|
||||
|
||||
ListBuilder<IndustryEntity> _data;
|
||||
ListBuilder<IndustryEntity>? _data;
|
||||
ListBuilder<IndustryEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<IndustryEntity>();
|
||||
set data(ListBuilder<IndustryEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<IndustryEntity>? data) => _$this._data = data;
|
||||
|
||||
IndustryListResponseBuilder();
|
||||
|
||||
|
|
@ -228,7 +229,7 @@ class IndustryListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(IndustryListResponseBuilder) updates) {
|
||||
void update(void Function(IndustryListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +241,7 @@ class IndustryListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$IndustryListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -260,10 +261,10 @@ class _$IndustryItemResponse extends IndustryItemResponse {
|
|||
final IndustryEntity data;
|
||||
|
||||
factory _$IndustryItemResponse(
|
||||
[void Function(IndustryItemResponseBuilder) updates]) =>
|
||||
[void Function(IndustryItemResponseBuilder)? updates]) =>
|
||||
(new IndustryItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$IndustryItemResponse._({this.data}) : super._() {
|
||||
_$IndustryItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'IndustryItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -283,10 +284,10 @@ class _$IndustryItemResponse extends IndustryItemResponse {
|
|||
return other is IndustryItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -303,12 +304,12 @@ class _$IndustryItemResponse extends IndustryItemResponse {
|
|||
|
||||
class IndustryItemResponseBuilder
|
||||
implements Builder<IndustryItemResponse, IndustryItemResponseBuilder> {
|
||||
_$IndustryItemResponse _$v;
|
||||
_$IndustryItemResponse? _$v;
|
||||
|
||||
IndustryEntityBuilder _data;
|
||||
IndustryEntityBuilder? _data;
|
||||
IndustryEntityBuilder get data =>
|
||||
_$this._data ??= new IndustryEntityBuilder();
|
||||
set data(IndustryEntityBuilder data) => _$this._data = data;
|
||||
set data(IndustryEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
IndustryItemResponseBuilder();
|
||||
|
||||
|
|
@ -328,7 +329,7 @@ class IndustryItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(IndustryItemResponseBuilder) updates) {
|
||||
void update(void Function(IndustryItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -340,7 +341,7 @@ class IndustryItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$IndustryItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -361,10 +362,10 @@ class _$IndustryEntity extends IndustryEntity {
|
|||
@override
|
||||
final String id;
|
||||
|
||||
factory _$IndustryEntity([void Function(IndustryEntityBuilder) updates]) =>
|
||||
factory _$IndustryEntity([void Function(IndustryEntityBuilder)? updates]) =>
|
||||
(new IndustryEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$IndustryEntity._({this.name, this.id}) : super._() {
|
||||
_$IndustryEntity._({required this.name, required this.id}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'IndustryEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'IndustryEntity', 'id');
|
||||
}
|
||||
|
|
@ -383,10 +384,10 @@ class _$IndustryEntity extends IndustryEntity {
|
|||
return other is IndustryEntity && name == other.name && id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
|
|
@ -405,15 +406,15 @@ class _$IndustryEntity extends IndustryEntity {
|
|||
|
||||
class IndustryEntityBuilder
|
||||
implements Builder<IndustryEntity, IndustryEntityBuilder> {
|
||||
_$IndustryEntity _$v;
|
||||
_$IndustryEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
IndustryEntityBuilder();
|
||||
|
||||
|
|
@ -434,7 +435,7 @@ class IndustryEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(IndustryEntityBuilder) updates) {
|
||||
void update(void Function(IndustryEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class _$InvoiceStatusEntitySerializer
|
|||
final String wireName = 'InvoiceStatusEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, InvoiceStatusEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
'name',
|
||||
|
|
@ -35,23 +35,23 @@ class _$InvoiceStatusEntitySerializer
|
|||
|
||||
@override
|
||||
InvoiceStatusEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new InvoiceStatusEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -67,10 +67,10 @@ class _$InvoiceStatusEntity extends InvoiceStatusEntity {
|
|||
final String name;
|
||||
|
||||
factory _$InvoiceStatusEntity(
|
||||
[void Function(InvoiceStatusEntityBuilder) updates]) =>
|
||||
[void Function(InvoiceStatusEntityBuilder)? updates]) =>
|
||||
(new InvoiceStatusEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$InvoiceStatusEntity._({this.id, this.name}) : super._() {
|
||||
_$InvoiceStatusEntity._({required this.id, required this.name}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'InvoiceStatusEntity', 'id');
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'InvoiceStatusEntity', 'name');
|
||||
}
|
||||
|
|
@ -90,10 +90,10 @@ class _$InvoiceStatusEntity extends InvoiceStatusEntity {
|
|||
return other is InvoiceStatusEntity && id == other.id && name == other.name;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
|
|
@ -112,15 +112,15 @@ class _$InvoiceStatusEntity extends InvoiceStatusEntity {
|
|||
|
||||
class InvoiceStatusEntityBuilder
|
||||
implements Builder<InvoiceStatusEntity, InvoiceStatusEntityBuilder> {
|
||||
_$InvoiceStatusEntity _$v;
|
||||
_$InvoiceStatusEntity? _$v;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
InvoiceStatusEntityBuilder();
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ class InvoiceStatusEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(InvoiceStatusEntityBuilder) updates) {
|
||||
void update(void Function(InvoiceStatusEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ abstract class LanguageEntity extends Object
|
|||
String get locale;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ abstract class LanguageEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -100,7 +100,7 @@ abstract class LanguageEntity extends Object
|
|||
String get listDisplayName => name;
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<LanguageEntity> get serializer =>
|
||||
_$languageEntitySerializer;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$LanguageListResponseSerializer
|
|||
final String wireName = 'LanguageListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, LanguageListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$LanguageListResponseSerializer
|
|||
|
||||
@override
|
||||
LanguageListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new LanguageListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(LanguageEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(LanguageEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$LanguageItemResponseSerializer
|
|||
final String wireName = 'LanguageItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, LanguageItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(LanguageEntity)),
|
||||
|
|
@ -87,19 +87,20 @@ class _$LanguageItemResponseSerializer
|
|||
|
||||
@override
|
||||
LanguageItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new LanguageItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(LanguageEntity)) as LanguageEntity);
|
||||
specifiedType: const FullType(LanguageEntity))!
|
||||
as LanguageEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,9 +117,9 @@ class _$LanguageEntitySerializer
|
|||
final String wireName = 'LanguageEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, LanguageEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, LanguageEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'locale',
|
||||
|
|
@ -133,27 +134,27 @@ class _$LanguageEntitySerializer
|
|||
|
||||
@override
|
||||
LanguageEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new LanguageEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'locale':
|
||||
result.locale = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -167,10 +168,10 @@ class _$LanguageListResponse extends LanguageListResponse {
|
|||
final BuiltList<LanguageEntity> data;
|
||||
|
||||
factory _$LanguageListResponse(
|
||||
[void Function(LanguageListResponseBuilder) updates]) =>
|
||||
[void Function(LanguageListResponseBuilder)? updates]) =>
|
||||
(new LanguageListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$LanguageListResponse._({this.data}) : super._() {
|
||||
_$LanguageListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'LanguageListResponse', 'data');
|
||||
}
|
||||
|
|
@ -190,10 +191,10 @@ class _$LanguageListResponse extends LanguageListResponse {
|
|||
return other is LanguageListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -210,12 +211,12 @@ class _$LanguageListResponse extends LanguageListResponse {
|
|||
|
||||
class LanguageListResponseBuilder
|
||||
implements Builder<LanguageListResponse, LanguageListResponseBuilder> {
|
||||
_$LanguageListResponse _$v;
|
||||
_$LanguageListResponse? _$v;
|
||||
|
||||
ListBuilder<LanguageEntity> _data;
|
||||
ListBuilder<LanguageEntity>? _data;
|
||||
ListBuilder<LanguageEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<LanguageEntity>();
|
||||
set data(ListBuilder<LanguageEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<LanguageEntity>? data) => _$this._data = data;
|
||||
|
||||
LanguageListResponseBuilder();
|
||||
|
||||
|
|
@ -235,7 +236,7 @@ class LanguageListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(LanguageListResponseBuilder) updates) {
|
||||
void update(void Function(LanguageListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -247,7 +248,7 @@ class LanguageListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$LanguageListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -267,10 +268,10 @@ class _$LanguageItemResponse extends LanguageItemResponse {
|
|||
final LanguageEntity data;
|
||||
|
||||
factory _$LanguageItemResponse(
|
||||
[void Function(LanguageItemResponseBuilder) updates]) =>
|
||||
[void Function(LanguageItemResponseBuilder)? updates]) =>
|
||||
(new LanguageItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$LanguageItemResponse._({this.data}) : super._() {
|
||||
_$LanguageItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'LanguageItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -290,10 +291,10 @@ class _$LanguageItemResponse extends LanguageItemResponse {
|
|||
return other is LanguageItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -310,12 +311,12 @@ class _$LanguageItemResponse extends LanguageItemResponse {
|
|||
|
||||
class LanguageItemResponseBuilder
|
||||
implements Builder<LanguageItemResponse, LanguageItemResponseBuilder> {
|
||||
_$LanguageItemResponse _$v;
|
||||
_$LanguageItemResponse? _$v;
|
||||
|
||||
LanguageEntityBuilder _data;
|
||||
LanguageEntityBuilder? _data;
|
||||
LanguageEntityBuilder get data =>
|
||||
_$this._data ??= new LanguageEntityBuilder();
|
||||
set data(LanguageEntityBuilder data) => _$this._data = data;
|
||||
set data(LanguageEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
LanguageItemResponseBuilder();
|
||||
|
||||
|
|
@ -335,7 +336,7 @@ class LanguageItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(LanguageItemResponseBuilder) updates) {
|
||||
void update(void Function(LanguageItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -347,7 +348,7 @@ class LanguageItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$LanguageItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -370,10 +371,12 @@ class _$LanguageEntity extends LanguageEntity {
|
|||
@override
|
||||
final String id;
|
||||
|
||||
factory _$LanguageEntity([void Function(LanguageEntityBuilder) updates]) =>
|
||||
factory _$LanguageEntity([void Function(LanguageEntityBuilder)? updates]) =>
|
||||
(new LanguageEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$LanguageEntity._({this.name, this.locale, this.id}) : super._() {
|
||||
_$LanguageEntity._(
|
||||
{required this.name, required this.locale, required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'LanguageEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(locale, r'LanguageEntity', 'locale');
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'LanguageEntity', 'id');
|
||||
|
|
@ -396,10 +399,10 @@ class _$LanguageEntity extends LanguageEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, locale.hashCode);
|
||||
|
|
@ -420,19 +423,19 @@ class _$LanguageEntity extends LanguageEntity {
|
|||
|
||||
class LanguageEntityBuilder
|
||||
implements Builder<LanguageEntity, LanguageEntityBuilder> {
|
||||
_$LanguageEntity _$v;
|
||||
_$LanguageEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _locale;
|
||||
String get locale => _$this._locale;
|
||||
set locale(String locale) => _$this._locale = locale;
|
||||
String? _locale;
|
||||
String? get locale => _$this._locale;
|
||||
set locale(String? locale) => _$this._locale = locale;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
LanguageEntityBuilder();
|
||||
|
||||
|
|
@ -454,7 +457,7 @@ class LanguageEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(LanguageEntityBuilder) updates) {
|
||||
void update(void Function(LanguageEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class _$PaymentStatusEntitySerializer
|
|||
final String wireName = 'PaymentStatusEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, PaymentStatusEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
'name',
|
||||
|
|
@ -35,23 +35,23 @@ class _$PaymentStatusEntitySerializer
|
|||
|
||||
@override
|
||||
PaymentStatusEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PaymentStatusEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -67,10 +67,10 @@ class _$PaymentStatusEntity extends PaymentStatusEntity {
|
|||
final String name;
|
||||
|
||||
factory _$PaymentStatusEntity(
|
||||
[void Function(PaymentStatusEntityBuilder) updates]) =>
|
||||
[void Function(PaymentStatusEntityBuilder)? updates]) =>
|
||||
(new PaymentStatusEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$PaymentStatusEntity._({this.id, this.name}) : super._() {
|
||||
_$PaymentStatusEntity._({required this.id, required this.name}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'PaymentStatusEntity', 'id');
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'PaymentStatusEntity', 'name');
|
||||
}
|
||||
|
|
@ -90,10 +90,10 @@ class _$PaymentStatusEntity extends PaymentStatusEntity {
|
|||
return other is PaymentStatusEntity && id == other.id && name == other.name;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
|
|
@ -112,15 +112,15 @@ class _$PaymentStatusEntity extends PaymentStatusEntity {
|
|||
|
||||
class PaymentStatusEntityBuilder
|
||||
implements Builder<PaymentStatusEntity, PaymentStatusEntityBuilder> {
|
||||
_$PaymentStatusEntity _$v;
|
||||
_$PaymentStatusEntity? _$v;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
PaymentStatusEntityBuilder();
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ class PaymentStatusEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PaymentStatusEntityBuilder) updates) {
|
||||
void update(void Function(PaymentStatusEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ abstract class PaymentTypeEntity extends Object
|
|||
String get name;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ abstract class PaymentTypeEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ abstract class PaymentTypeEntity extends Object
|
|||
String get listDisplayName => name;
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<PaymentTypeEntity> get serializer =>
|
||||
_$paymentTypeEntitySerializer;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$PaymentTypeListResponseSerializer
|
|||
final String wireName = 'PaymentTypeListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, PaymentTypeListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$PaymentTypeListResponseSerializer
|
|||
|
||||
@override
|
||||
PaymentTypeListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PaymentTypeListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(PaymentTypeEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(PaymentTypeEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$PaymentTypeItemResponseSerializer
|
|||
final String wireName = 'PaymentTypeItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, PaymentTypeItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(PaymentTypeEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$PaymentTypeItemResponseSerializer
|
|||
|
||||
@override
|
||||
PaymentTypeItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PaymentTypeItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(PaymentTypeEntity))
|
||||
specifiedType: const FullType(PaymentTypeEntity))!
|
||||
as PaymentTypeEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -117,9 +117,9 @@ class _$PaymentTypeEntitySerializer
|
|||
final String wireName = 'PaymentTypeEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, PaymentTypeEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, PaymentTypeEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'id',
|
||||
|
|
@ -131,23 +131,23 @@ class _$PaymentTypeEntitySerializer
|
|||
|
||||
@override
|
||||
PaymentTypeEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new PaymentTypeEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -161,10 +161,10 @@ class _$PaymentTypeListResponse extends PaymentTypeListResponse {
|
|||
final BuiltList<PaymentTypeEntity> data;
|
||||
|
||||
factory _$PaymentTypeListResponse(
|
||||
[void Function(PaymentTypeListResponseBuilder) updates]) =>
|
||||
[void Function(PaymentTypeListResponseBuilder)? updates]) =>
|
||||
(new PaymentTypeListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$PaymentTypeListResponse._({this.data}) : super._() {
|
||||
_$PaymentTypeListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'PaymentTypeListResponse', 'data');
|
||||
}
|
||||
|
|
@ -184,10 +184,10 @@ class _$PaymentTypeListResponse extends PaymentTypeListResponse {
|
|||
return other is PaymentTypeListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -205,12 +205,12 @@ class _$PaymentTypeListResponse extends PaymentTypeListResponse {
|
|||
class PaymentTypeListResponseBuilder
|
||||
implements
|
||||
Builder<PaymentTypeListResponse, PaymentTypeListResponseBuilder> {
|
||||
_$PaymentTypeListResponse _$v;
|
||||
_$PaymentTypeListResponse? _$v;
|
||||
|
||||
ListBuilder<PaymentTypeEntity> _data;
|
||||
ListBuilder<PaymentTypeEntity>? _data;
|
||||
ListBuilder<PaymentTypeEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<PaymentTypeEntity>();
|
||||
set data(ListBuilder<PaymentTypeEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<PaymentTypeEntity>? data) => _$this._data = data;
|
||||
|
||||
PaymentTypeListResponseBuilder();
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ class PaymentTypeListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PaymentTypeListResponseBuilder) updates) {
|
||||
void update(void Function(PaymentTypeListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ class PaymentTypeListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$PaymentTypeListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -262,10 +262,10 @@ class _$PaymentTypeItemResponse extends PaymentTypeItemResponse {
|
|||
final PaymentTypeEntity data;
|
||||
|
||||
factory _$PaymentTypeItemResponse(
|
||||
[void Function(PaymentTypeItemResponseBuilder) updates]) =>
|
||||
[void Function(PaymentTypeItemResponseBuilder)? updates]) =>
|
||||
(new PaymentTypeItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$PaymentTypeItemResponse._({this.data}) : super._() {
|
||||
_$PaymentTypeItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'PaymentTypeItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -285,10 +285,10 @@ class _$PaymentTypeItemResponse extends PaymentTypeItemResponse {
|
|||
return other is PaymentTypeItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -306,12 +306,12 @@ class _$PaymentTypeItemResponse extends PaymentTypeItemResponse {
|
|||
class PaymentTypeItemResponseBuilder
|
||||
implements
|
||||
Builder<PaymentTypeItemResponse, PaymentTypeItemResponseBuilder> {
|
||||
_$PaymentTypeItemResponse _$v;
|
||||
_$PaymentTypeItemResponse? _$v;
|
||||
|
||||
PaymentTypeEntityBuilder _data;
|
||||
PaymentTypeEntityBuilder? _data;
|
||||
PaymentTypeEntityBuilder get data =>
|
||||
_$this._data ??= new PaymentTypeEntityBuilder();
|
||||
set data(PaymentTypeEntityBuilder data) => _$this._data = data;
|
||||
set data(PaymentTypeEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
PaymentTypeItemResponseBuilder();
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ class PaymentTypeItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PaymentTypeItemResponseBuilder) updates) {
|
||||
void update(void Function(PaymentTypeItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ class PaymentTypeItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$PaymentTypeItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -365,10 +365,10 @@ class _$PaymentTypeEntity extends PaymentTypeEntity {
|
|||
final String id;
|
||||
|
||||
factory _$PaymentTypeEntity(
|
||||
[void Function(PaymentTypeEntityBuilder) updates]) =>
|
||||
[void Function(PaymentTypeEntityBuilder)? updates]) =>
|
||||
(new PaymentTypeEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$PaymentTypeEntity._({this.name, this.id}) : super._() {
|
||||
_$PaymentTypeEntity._({required this.name, required this.id}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'PaymentTypeEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'PaymentTypeEntity', 'id');
|
||||
}
|
||||
|
|
@ -387,10 +387,10 @@ class _$PaymentTypeEntity extends PaymentTypeEntity {
|
|||
return other is PaymentTypeEntity && name == other.name && id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
|
|
@ -409,15 +409,15 @@ class _$PaymentTypeEntity extends PaymentTypeEntity {
|
|||
|
||||
class PaymentTypeEntityBuilder
|
||||
implements Builder<PaymentTypeEntity, PaymentTypeEntityBuilder> {
|
||||
_$PaymentTypeEntity _$v;
|
||||
_$PaymentTypeEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
PaymentTypeEntityBuilder();
|
||||
|
||||
|
|
@ -438,7 +438,7 @@ class PaymentTypeEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(PaymentTypeEntityBuilder) updates) {
|
||||
void update(void Function(PaymentTypeEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ abstract class SizeEntity extends Object
|
|||
String get name;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ abstract class SizeEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ abstract class SizeEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<SizeEntity> get serializer => _$sizeEntitySerializer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ class _$SizeListResponseSerializer
|
|||
final String wireName = 'SizeListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, SizeListResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, SizeListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -34,21 +34,21 @@ class _$SizeListResponseSerializer
|
|||
|
||||
@override
|
||||
SizeListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new SizeListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(SizeEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(SizeEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -65,9 +65,9 @@ class _$SizeItemResponseSerializer
|
|||
final String wireName = 'SizeItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, SizeItemResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, SizeItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(SizeEntity)),
|
||||
|
|
@ -78,19 +78,19 @@ class _$SizeItemResponseSerializer
|
|||
|
||||
@override
|
||||
SizeItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new SizeItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(SizeEntity)) as SizeEntity);
|
||||
specifiedType: const FullType(SizeEntity))! as SizeEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -106,9 +106,9 @@ class _$SizeEntitySerializer implements StructuredSerializer<SizeEntity> {
|
|||
final String wireName = 'SizeEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, SizeEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, SizeEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'id',
|
||||
|
|
@ -119,23 +119,23 @@ class _$SizeEntitySerializer implements StructuredSerializer<SizeEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
SizeEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
SizeEntity deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new SizeEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -149,10 +149,10 @@ class _$SizeListResponse extends SizeListResponse {
|
|||
final BuiltList<SizeEntity> data;
|
||||
|
||||
factory _$SizeListResponse(
|
||||
[void Function(SizeListResponseBuilder) updates]) =>
|
||||
[void Function(SizeListResponseBuilder)? updates]) =>
|
||||
(new SizeListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$SizeListResponse._({this.data}) : super._() {
|
||||
_$SizeListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'SizeListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -170,10 +170,10 @@ class _$SizeListResponse extends SizeListResponse {
|
|||
return other is SizeListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -189,12 +189,12 @@ class _$SizeListResponse extends SizeListResponse {
|
|||
|
||||
class SizeListResponseBuilder
|
||||
implements Builder<SizeListResponse, SizeListResponseBuilder> {
|
||||
_$SizeListResponse _$v;
|
||||
_$SizeListResponse? _$v;
|
||||
|
||||
ListBuilder<SizeEntity> _data;
|
||||
ListBuilder<SizeEntity>? _data;
|
||||
ListBuilder<SizeEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<SizeEntity>();
|
||||
set data(ListBuilder<SizeEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<SizeEntity>? data) => _$this._data = data;
|
||||
|
||||
SizeListResponseBuilder();
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ class SizeListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(SizeListResponseBuilder) updates) {
|
||||
void update(void Function(SizeListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ class SizeListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$SizeListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -246,10 +246,10 @@ class _$SizeItemResponse extends SizeItemResponse {
|
|||
final SizeEntity data;
|
||||
|
||||
factory _$SizeItemResponse(
|
||||
[void Function(SizeItemResponseBuilder) updates]) =>
|
||||
[void Function(SizeItemResponseBuilder)? updates]) =>
|
||||
(new SizeItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$SizeItemResponse._({this.data}) : super._() {
|
||||
_$SizeItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'SizeItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -267,10 +267,10 @@ class _$SizeItemResponse extends SizeItemResponse {
|
|||
return other is SizeItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -286,11 +286,11 @@ class _$SizeItemResponse extends SizeItemResponse {
|
|||
|
||||
class SizeItemResponseBuilder
|
||||
implements Builder<SizeItemResponse, SizeItemResponseBuilder> {
|
||||
_$SizeItemResponse _$v;
|
||||
_$SizeItemResponse? _$v;
|
||||
|
||||
SizeEntityBuilder _data;
|
||||
SizeEntityBuilder? _data;
|
||||
SizeEntityBuilder get data => _$this._data ??= new SizeEntityBuilder();
|
||||
set data(SizeEntityBuilder data) => _$this._data = data;
|
||||
set data(SizeEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
SizeItemResponseBuilder();
|
||||
|
||||
|
|
@ -310,7 +310,7 @@ class SizeItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(SizeItemResponseBuilder) updates) {
|
||||
void update(void Function(SizeItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ class SizeItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$SizeItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -343,10 +343,10 @@ class _$SizeEntity extends SizeEntity {
|
|||
@override
|
||||
final String id;
|
||||
|
||||
factory _$SizeEntity([void Function(SizeEntityBuilder) updates]) =>
|
||||
factory _$SizeEntity([void Function(SizeEntityBuilder)? updates]) =>
|
||||
(new SizeEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$SizeEntity._({this.name, this.id}) : super._() {
|
||||
_$SizeEntity._({required this.name, required this.id}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'SizeEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'SizeEntity', 'id');
|
||||
}
|
||||
|
|
@ -364,10 +364,10 @@ class _$SizeEntity extends SizeEntity {
|
|||
return other is SizeEntity && name == other.name && id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
|
|
@ -385,15 +385,15 @@ class _$SizeEntity extends SizeEntity {
|
|||
}
|
||||
|
||||
class SizeEntityBuilder implements Builder<SizeEntity, SizeEntityBuilder> {
|
||||
_$SizeEntity _$v;
|
||||
_$SizeEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
SizeEntityBuilder();
|
||||
|
||||
|
|
@ -414,7 +414,7 @@ class SizeEntityBuilder implements Builder<SizeEntity, SizeEntityBuilder> {
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(SizeEntityBuilder) updates) {
|
||||
void update(void Function(SizeEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ class _$StaticDataListResponseSerializer
|
|||
final String wireName = 'StaticDataListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, StaticDataListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -41,21 +41,21 @@ class _$StaticDataListResponseSerializer
|
|||
|
||||
@override
|
||||
StaticDataListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new StaticDataListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(StaticDataEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(StaticDataEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,10 +75,10 @@ class _$StaticDataItemResponseSerializer
|
|||
final String wireName = 'StaticDataItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, StaticDataItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(StaticDataEntity)),
|
||||
|
|
@ -89,19 +89,19 @@ class _$StaticDataItemResponseSerializer
|
|||
|
||||
@override
|
||||
StaticDataItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new StaticDataItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(StaticDataEntity))
|
||||
specifiedType: const FullType(StaticDataEntity))!
|
||||
as StaticDataEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -119,9 +119,9 @@ class _$StaticDataEntitySerializer
|
|||
final String wireName = 'StaticDataEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, StaticDataEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, StaticDataEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'currencies',
|
||||
serializers.serialize(object.currencies,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -177,88 +177,88 @@ class _$StaticDataEntitySerializer
|
|||
|
||||
@override
|
||||
StaticDataEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new StaticDataEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'currencies':
|
||||
result.currencies.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(CurrencyEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(CurrencyEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'sizes':
|
||||
result.sizes.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(SizeEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(SizeEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'industries':
|
||||
result.industries.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(IndustryEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(IndustryEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'timezones':
|
||||
result.timezones.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TimezoneEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(TimezoneEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'gateways':
|
||||
result.gateways.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(GatewayEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(GatewayEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'date_formats':
|
||||
result.dateFormats.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DateFormatEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DateFormatEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'datetime_formats':
|
||||
result.datetimeFormats.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DatetimeFormatEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DatetimeFormatEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'languages':
|
||||
result.languages.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(LanguageEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(LanguageEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'payment_types':
|
||||
result.paymentTypes.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(PaymentTypeEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(PaymentTypeEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'countries':
|
||||
result.countries.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(CountryEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(CountryEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'invoice_status':
|
||||
result.invoiceStatus.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(InvoiceStatusEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(InvoiceStatusEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'templates':
|
||||
result.templates.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(TemplateEntity)
|
||||
])));
|
||||
]))!);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -275,9 +275,9 @@ class _$TemplateEntitySerializer
|
|||
final String wireName = 'TemplateEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TemplateEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TemplateEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'subject',
|
||||
serializers.serialize(object.subject,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -290,23 +290,23 @@ class _$TemplateEntitySerializer
|
|||
|
||||
@override
|
||||
TemplateEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TemplateEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'subject':
|
||||
result.subject = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'body':
|
||||
result.body = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -320,10 +320,10 @@ class _$StaticDataListResponse extends StaticDataListResponse {
|
|||
final BuiltList<StaticDataEntity> data;
|
||||
|
||||
factory _$StaticDataListResponse(
|
||||
[void Function(StaticDataListResponseBuilder) updates]) =>
|
||||
[void Function(StaticDataListResponseBuilder)? updates]) =>
|
||||
(new StaticDataListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$StaticDataListResponse._({this.data}) : super._() {
|
||||
_$StaticDataListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'StaticDataListResponse', 'data');
|
||||
}
|
||||
|
|
@ -343,10 +343,10 @@ class _$StaticDataListResponse extends StaticDataListResponse {
|
|||
return other is StaticDataListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -363,12 +363,12 @@ class _$StaticDataListResponse extends StaticDataListResponse {
|
|||
|
||||
class StaticDataListResponseBuilder
|
||||
implements Builder<StaticDataListResponse, StaticDataListResponseBuilder> {
|
||||
_$StaticDataListResponse _$v;
|
||||
_$StaticDataListResponse? _$v;
|
||||
|
||||
ListBuilder<StaticDataEntity> _data;
|
||||
ListBuilder<StaticDataEntity>? _data;
|
||||
ListBuilder<StaticDataEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<StaticDataEntity>();
|
||||
set data(ListBuilder<StaticDataEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<StaticDataEntity>? data) => _$this._data = data;
|
||||
|
||||
StaticDataListResponseBuilder();
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ class StaticDataListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(StaticDataListResponseBuilder) updates) {
|
||||
void update(void Function(StaticDataListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ class StaticDataListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$StaticDataListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -420,10 +420,10 @@ class _$StaticDataItemResponse extends StaticDataItemResponse {
|
|||
final StaticDataEntity data;
|
||||
|
||||
factory _$StaticDataItemResponse(
|
||||
[void Function(StaticDataItemResponseBuilder) updates]) =>
|
||||
[void Function(StaticDataItemResponseBuilder)? updates]) =>
|
||||
(new StaticDataItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$StaticDataItemResponse._({this.data}) : super._() {
|
||||
_$StaticDataItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'StaticDataItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -443,10 +443,10 @@ class _$StaticDataItemResponse extends StaticDataItemResponse {
|
|||
return other is StaticDataItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -463,12 +463,12 @@ class _$StaticDataItemResponse extends StaticDataItemResponse {
|
|||
|
||||
class StaticDataItemResponseBuilder
|
||||
implements Builder<StaticDataItemResponse, StaticDataItemResponseBuilder> {
|
||||
_$StaticDataItemResponse _$v;
|
||||
_$StaticDataItemResponse? _$v;
|
||||
|
||||
StaticDataEntityBuilder _data;
|
||||
StaticDataEntityBuilder? _data;
|
||||
StaticDataEntityBuilder get data =>
|
||||
_$this._data ??= new StaticDataEntityBuilder();
|
||||
set data(StaticDataEntityBuilder data) => _$this._data = data;
|
||||
set data(StaticDataEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
StaticDataItemResponseBuilder();
|
||||
|
||||
|
|
@ -488,7 +488,7 @@ class StaticDataItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(StaticDataItemResponseBuilder) updates) {
|
||||
void update(void Function(StaticDataItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -500,7 +500,7 @@ class StaticDataItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$StaticDataItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -542,22 +542,22 @@ class _$StaticDataEntity extends StaticDataEntity {
|
|||
final BuiltMap<String, TemplateEntity> templates;
|
||||
|
||||
factory _$StaticDataEntity(
|
||||
[void Function(StaticDataEntityBuilder) updates]) =>
|
||||
[void Function(StaticDataEntityBuilder)? updates]) =>
|
||||
(new StaticDataEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$StaticDataEntity._(
|
||||
{this.currencies,
|
||||
this.sizes,
|
||||
this.industries,
|
||||
this.timezones,
|
||||
this.gateways,
|
||||
this.dateFormats,
|
||||
this.datetimeFormats,
|
||||
this.languages,
|
||||
this.paymentTypes,
|
||||
this.countries,
|
||||
this.invoiceStatus,
|
||||
this.templates})
|
||||
{required this.currencies,
|
||||
required this.sizes,
|
||||
required this.industries,
|
||||
required this.timezones,
|
||||
required this.gateways,
|
||||
required this.dateFormats,
|
||||
required this.datetimeFormats,
|
||||
required this.languages,
|
||||
required this.paymentTypes,
|
||||
required this.countries,
|
||||
required this.invoiceStatus,
|
||||
required this.templates})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
currencies, r'StaticDataEntity', 'currencies');
|
||||
|
|
@ -610,10 +610,10 @@ class _$StaticDataEntity extends StaticDataEntity {
|
|||
templates == other.templates;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, currencies.hashCode);
|
||||
_$hash = $jc(_$hash, sizes.hashCode);
|
||||
|
|
@ -652,77 +652,77 @@ class _$StaticDataEntity extends StaticDataEntity {
|
|||
|
||||
class StaticDataEntityBuilder
|
||||
implements Builder<StaticDataEntity, StaticDataEntityBuilder> {
|
||||
_$StaticDataEntity _$v;
|
||||
_$StaticDataEntity? _$v;
|
||||
|
||||
ListBuilder<CurrencyEntity> _currencies;
|
||||
ListBuilder<CurrencyEntity>? _currencies;
|
||||
ListBuilder<CurrencyEntity> get currencies =>
|
||||
_$this._currencies ??= new ListBuilder<CurrencyEntity>();
|
||||
set currencies(ListBuilder<CurrencyEntity> currencies) =>
|
||||
set currencies(ListBuilder<CurrencyEntity>? currencies) =>
|
||||
_$this._currencies = currencies;
|
||||
|
||||
ListBuilder<SizeEntity> _sizes;
|
||||
ListBuilder<SizeEntity>? _sizes;
|
||||
ListBuilder<SizeEntity> get sizes =>
|
||||
_$this._sizes ??= new ListBuilder<SizeEntity>();
|
||||
set sizes(ListBuilder<SizeEntity> sizes) => _$this._sizes = sizes;
|
||||
set sizes(ListBuilder<SizeEntity>? sizes) => _$this._sizes = sizes;
|
||||
|
||||
ListBuilder<IndustryEntity> _industries;
|
||||
ListBuilder<IndustryEntity>? _industries;
|
||||
ListBuilder<IndustryEntity> get industries =>
|
||||
_$this._industries ??= new ListBuilder<IndustryEntity>();
|
||||
set industries(ListBuilder<IndustryEntity> industries) =>
|
||||
set industries(ListBuilder<IndustryEntity>? industries) =>
|
||||
_$this._industries = industries;
|
||||
|
||||
ListBuilder<TimezoneEntity> _timezones;
|
||||
ListBuilder<TimezoneEntity>? _timezones;
|
||||
ListBuilder<TimezoneEntity> get timezones =>
|
||||
_$this._timezones ??= new ListBuilder<TimezoneEntity>();
|
||||
set timezones(ListBuilder<TimezoneEntity> timezones) =>
|
||||
set timezones(ListBuilder<TimezoneEntity>? timezones) =>
|
||||
_$this._timezones = timezones;
|
||||
|
||||
ListBuilder<GatewayEntity> _gateways;
|
||||
ListBuilder<GatewayEntity>? _gateways;
|
||||
ListBuilder<GatewayEntity> get gateways =>
|
||||
_$this._gateways ??= new ListBuilder<GatewayEntity>();
|
||||
set gateways(ListBuilder<GatewayEntity> gateways) =>
|
||||
set gateways(ListBuilder<GatewayEntity>? gateways) =>
|
||||
_$this._gateways = gateways;
|
||||
|
||||
ListBuilder<DateFormatEntity> _dateFormats;
|
||||
ListBuilder<DateFormatEntity>? _dateFormats;
|
||||
ListBuilder<DateFormatEntity> get dateFormats =>
|
||||
_$this._dateFormats ??= new ListBuilder<DateFormatEntity>();
|
||||
set dateFormats(ListBuilder<DateFormatEntity> dateFormats) =>
|
||||
set dateFormats(ListBuilder<DateFormatEntity>? dateFormats) =>
|
||||
_$this._dateFormats = dateFormats;
|
||||
|
||||
ListBuilder<DatetimeFormatEntity> _datetimeFormats;
|
||||
ListBuilder<DatetimeFormatEntity>? _datetimeFormats;
|
||||
ListBuilder<DatetimeFormatEntity> get datetimeFormats =>
|
||||
_$this._datetimeFormats ??= new ListBuilder<DatetimeFormatEntity>();
|
||||
set datetimeFormats(ListBuilder<DatetimeFormatEntity> datetimeFormats) =>
|
||||
set datetimeFormats(ListBuilder<DatetimeFormatEntity>? datetimeFormats) =>
|
||||
_$this._datetimeFormats = datetimeFormats;
|
||||
|
||||
ListBuilder<LanguageEntity> _languages;
|
||||
ListBuilder<LanguageEntity>? _languages;
|
||||
ListBuilder<LanguageEntity> get languages =>
|
||||
_$this._languages ??= new ListBuilder<LanguageEntity>();
|
||||
set languages(ListBuilder<LanguageEntity> languages) =>
|
||||
set languages(ListBuilder<LanguageEntity>? languages) =>
|
||||
_$this._languages = languages;
|
||||
|
||||
ListBuilder<PaymentTypeEntity> _paymentTypes;
|
||||
ListBuilder<PaymentTypeEntity>? _paymentTypes;
|
||||
ListBuilder<PaymentTypeEntity> get paymentTypes =>
|
||||
_$this._paymentTypes ??= new ListBuilder<PaymentTypeEntity>();
|
||||
set paymentTypes(ListBuilder<PaymentTypeEntity> paymentTypes) =>
|
||||
set paymentTypes(ListBuilder<PaymentTypeEntity>? paymentTypes) =>
|
||||
_$this._paymentTypes = paymentTypes;
|
||||
|
||||
ListBuilder<CountryEntity> _countries;
|
||||
ListBuilder<CountryEntity>? _countries;
|
||||
ListBuilder<CountryEntity> get countries =>
|
||||
_$this._countries ??= new ListBuilder<CountryEntity>();
|
||||
set countries(ListBuilder<CountryEntity> countries) =>
|
||||
set countries(ListBuilder<CountryEntity>? countries) =>
|
||||
_$this._countries = countries;
|
||||
|
||||
ListBuilder<InvoiceStatusEntity> _invoiceStatus;
|
||||
ListBuilder<InvoiceStatusEntity>? _invoiceStatus;
|
||||
ListBuilder<InvoiceStatusEntity> get invoiceStatus =>
|
||||
_$this._invoiceStatus ??= new ListBuilder<InvoiceStatusEntity>();
|
||||
set invoiceStatus(ListBuilder<InvoiceStatusEntity> invoiceStatus) =>
|
||||
set invoiceStatus(ListBuilder<InvoiceStatusEntity>? invoiceStatus) =>
|
||||
_$this._invoiceStatus = invoiceStatus;
|
||||
|
||||
MapBuilder<String, TemplateEntity> _templates;
|
||||
MapBuilder<String, TemplateEntity>? _templates;
|
||||
MapBuilder<String, TemplateEntity> get templates =>
|
||||
_$this._templates ??= new MapBuilder<String, TemplateEntity>();
|
||||
set templates(MapBuilder<String, TemplateEntity> templates) =>
|
||||
set templates(MapBuilder<String, TemplateEntity>? templates) =>
|
||||
_$this._templates = templates;
|
||||
|
||||
StaticDataEntityBuilder();
|
||||
|
|
@ -754,7 +754,7 @@ class StaticDataEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(StaticDataEntityBuilder) updates) {
|
||||
void update(void Function(StaticDataEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -779,7 +779,7 @@ class StaticDataEntityBuilder
|
|||
invoiceStatus: invoiceStatus.build(),
|
||||
templates: templates.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'currencies';
|
||||
currencies.build();
|
||||
|
|
@ -822,10 +822,10 @@ class _$TemplateEntity extends TemplateEntity {
|
|||
@override
|
||||
final String body;
|
||||
|
||||
factory _$TemplateEntity([void Function(TemplateEntityBuilder) updates]) =>
|
||||
factory _$TemplateEntity([void Function(TemplateEntityBuilder)? updates]) =>
|
||||
(new TemplateEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TemplateEntity._({this.subject, this.body}) : super._() {
|
||||
_$TemplateEntity._({required this.subject, required this.body}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
subject, r'TemplateEntity', 'subject');
|
||||
BuiltValueNullFieldError.checkNotNull(body, r'TemplateEntity', 'body');
|
||||
|
|
@ -847,10 +847,10 @@ class _$TemplateEntity extends TemplateEntity {
|
|||
body == other.body;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, subject.hashCode);
|
||||
_$hash = $jc(_$hash, body.hashCode);
|
||||
|
|
@ -869,15 +869,15 @@ class _$TemplateEntity extends TemplateEntity {
|
|||
|
||||
class TemplateEntityBuilder
|
||||
implements Builder<TemplateEntity, TemplateEntityBuilder> {
|
||||
_$TemplateEntity _$v;
|
||||
_$TemplateEntity? _$v;
|
||||
|
||||
String _subject;
|
||||
String get subject => _$this._subject;
|
||||
set subject(String subject) => _$this._subject = subject;
|
||||
String? _subject;
|
||||
String? get subject => _$this._subject;
|
||||
set subject(String? subject) => _$this._subject = subject;
|
||||
|
||||
String _body;
|
||||
String get body => _$this._body;
|
||||
set body(String body) => _$this._body = body;
|
||||
String? _body;
|
||||
String? get body => _$this._body;
|
||||
set body(String? body) => _$this._body = body;
|
||||
|
||||
TemplateEntityBuilder();
|
||||
|
||||
|
|
@ -898,7 +898,7 @@ class TemplateEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TemplateEntityBuilder) updates) {
|
||||
void update(void Function(TemplateEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ abstract class TimezoneEntity extends Object
|
|||
String get location;
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ abstract class TimezoneEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
if (filter == null || filter.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -106,7 +106,7 @@ abstract class TimezoneEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
static Serializer<TimezoneEntity> get serializer =>
|
||||
_$timezoneEntitySerializer;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$TimezoneListResponseSerializer
|
|||
final String wireName = 'TimezoneListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TimezoneListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$TimezoneListResponseSerializer
|
|||
|
||||
@override
|
||||
TimezoneListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TimezoneListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TimezoneEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(TimezoneEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$TimezoneItemResponseSerializer
|
|||
final String wireName = 'TimezoneItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TimezoneItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(TimezoneEntity)),
|
||||
|
|
@ -87,19 +87,20 @@ class _$TimezoneItemResponseSerializer
|
|||
|
||||
@override
|
||||
TimezoneItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TimezoneItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(TimezoneEntity)) as TimezoneEntity);
|
||||
specifiedType: const FullType(TimezoneEntity))!
|
||||
as TimezoneEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,9 +117,9 @@ class _$TimezoneEntitySerializer
|
|||
final String wireName = 'TimezoneEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TimezoneEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TimezoneEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'location',
|
||||
|
|
@ -133,27 +134,27 @@ class _$TimezoneEntitySerializer
|
|||
|
||||
@override
|
||||
TimezoneEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TimezoneEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'location':
|
||||
result.location = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -167,10 +168,10 @@ class _$TimezoneListResponse extends TimezoneListResponse {
|
|||
final BuiltList<TimezoneEntity> data;
|
||||
|
||||
factory _$TimezoneListResponse(
|
||||
[void Function(TimezoneListResponseBuilder) updates]) =>
|
||||
[void Function(TimezoneListResponseBuilder)? updates]) =>
|
||||
(new TimezoneListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TimezoneListResponse._({this.data}) : super._() {
|
||||
_$TimezoneListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TimezoneListResponse', 'data');
|
||||
}
|
||||
|
|
@ -190,10 +191,10 @@ class _$TimezoneListResponse extends TimezoneListResponse {
|
|||
return other is TimezoneListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -210,12 +211,12 @@ class _$TimezoneListResponse extends TimezoneListResponse {
|
|||
|
||||
class TimezoneListResponseBuilder
|
||||
implements Builder<TimezoneListResponse, TimezoneListResponseBuilder> {
|
||||
_$TimezoneListResponse _$v;
|
||||
_$TimezoneListResponse? _$v;
|
||||
|
||||
ListBuilder<TimezoneEntity> _data;
|
||||
ListBuilder<TimezoneEntity>? _data;
|
||||
ListBuilder<TimezoneEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<TimezoneEntity>();
|
||||
set data(ListBuilder<TimezoneEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<TimezoneEntity>? data) => _$this._data = data;
|
||||
|
||||
TimezoneListResponseBuilder();
|
||||
|
||||
|
|
@ -235,7 +236,7 @@ class TimezoneListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TimezoneListResponseBuilder) updates) {
|
||||
void update(void Function(TimezoneListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -247,7 +248,7 @@ class TimezoneListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TimezoneListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -267,10 +268,10 @@ class _$TimezoneItemResponse extends TimezoneItemResponse {
|
|||
final TimezoneEntity data;
|
||||
|
||||
factory _$TimezoneItemResponse(
|
||||
[void Function(TimezoneItemResponseBuilder) updates]) =>
|
||||
[void Function(TimezoneItemResponseBuilder)? updates]) =>
|
||||
(new TimezoneItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TimezoneItemResponse._({this.data}) : super._() {
|
||||
_$TimezoneItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TimezoneItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -290,10 +291,10 @@ class _$TimezoneItemResponse extends TimezoneItemResponse {
|
|||
return other is TimezoneItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -310,12 +311,12 @@ class _$TimezoneItemResponse extends TimezoneItemResponse {
|
|||
|
||||
class TimezoneItemResponseBuilder
|
||||
implements Builder<TimezoneItemResponse, TimezoneItemResponseBuilder> {
|
||||
_$TimezoneItemResponse _$v;
|
||||
_$TimezoneItemResponse? _$v;
|
||||
|
||||
TimezoneEntityBuilder _data;
|
||||
TimezoneEntityBuilder? _data;
|
||||
TimezoneEntityBuilder get data =>
|
||||
_$this._data ??= new TimezoneEntityBuilder();
|
||||
set data(TimezoneEntityBuilder data) => _$this._data = data;
|
||||
set data(TimezoneEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
TimezoneItemResponseBuilder();
|
||||
|
||||
|
|
@ -335,7 +336,7 @@ class TimezoneItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TimezoneItemResponseBuilder) updates) {
|
||||
void update(void Function(TimezoneItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -347,7 +348,7 @@ class TimezoneItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TimezoneItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -370,10 +371,12 @@ class _$TimezoneEntity extends TimezoneEntity {
|
|||
@override
|
||||
final String id;
|
||||
|
||||
factory _$TimezoneEntity([void Function(TimezoneEntityBuilder) updates]) =>
|
||||
factory _$TimezoneEntity([void Function(TimezoneEntityBuilder)? updates]) =>
|
||||
(new TimezoneEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TimezoneEntity._({this.name, this.location, this.id}) : super._() {
|
||||
_$TimezoneEntity._(
|
||||
{required this.name, required this.location, required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'TimezoneEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
location, r'TimezoneEntity', 'location');
|
||||
|
|
@ -397,10 +400,10 @@ class _$TimezoneEntity extends TimezoneEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, location.hashCode);
|
||||
|
|
@ -421,19 +424,19 @@ class _$TimezoneEntity extends TimezoneEntity {
|
|||
|
||||
class TimezoneEntityBuilder
|
||||
implements Builder<TimezoneEntity, TimezoneEntityBuilder> {
|
||||
_$TimezoneEntity _$v;
|
||||
_$TimezoneEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _location;
|
||||
String get location => _$this._location;
|
||||
set location(String location) => _$this._location = location;
|
||||
String? _location;
|
||||
String? get location => _$this._location;
|
||||
set location(String? location) => _$this._location = location;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
TimezoneEntityBuilder();
|
||||
|
||||
|
|
@ -455,7 +458,7 @@ class TimezoneEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TimezoneEntityBuilder) updates) {
|
||||
void update(void Function(TimezoneEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ abstract class SubscriptionEntity extends Object
|
|||
implements Built<SubscriptionEntity, SubscriptionEntityBuilder> {
|
||||
// STARTER: properties - do not remove comment
|
||||
|
||||
factory SubscriptionEntity({String id, AppState state}) {
|
||||
factory SubscriptionEntity({String? id, AppState? state}) {
|
||||
return _$SubscriptionEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
name: '',
|
||||
|
|
@ -179,16 +179,16 @@ abstract class SubscriptionEntity extends Object
|
|||
String get displayName => id;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (!multiselect && includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted!) {
|
||||
if (!multiselect && includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
|
@ -201,22 +201,22 @@ abstract class SubscriptionEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo(
|
||||
SubscriptionEntity subscription, String sortField, bool sortAscending) {
|
||||
SubscriptionEntity? subscription, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final subscriptionA = sortAscending ? this : subscription;
|
||||
final subscriptionB = sortAscending ? subscription : this;
|
||||
|
||||
switch (sortField) {
|
||||
case SubscriptionFields.name:
|
||||
response = subscriptionA.displayName
|
||||
response = subscriptionA!.displayName
|
||||
.toLowerCase()
|
||||
.compareTo(subscriptionB.displayName.toLowerCase());
|
||||
.compareTo(subscriptionB!.displayName.toLowerCase());
|
||||
break;
|
||||
case SubscriptionFields.createdAt:
|
||||
response = subscriptionA.createdAt.compareTo(subscriptionB.createdAt);
|
||||
response = subscriptionA!.createdAt.compareTo(subscriptionB!.createdAt);
|
||||
break;
|
||||
case SubscriptionFields.updatedAt:
|
||||
response = subscriptionA.updatedAt.compareTo(subscriptionB.updatedAt);
|
||||
response = subscriptionA!.updatedAt.compareTo(subscriptionB!.updatedAt);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by subscription.$sortField is not implemented');
|
||||
|
|
@ -225,14 +225,14 @@ abstract class SubscriptionEntity extends Object
|
|||
|
||||
if (response == 0) {
|
||||
// STARTER: sort default - do not remove comment
|
||||
return subscriptionA.createdAt.compareTo(subscriptionB.createdAt);
|
||||
return subscriptionA!.createdAt.compareTo(subscriptionB!.createdAt);
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -242,7 +242,7 @@ abstract class SubscriptionEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -255,10 +255,10 @@ abstract class SubscriptionEntity extends Object
|
|||
String get listDisplayName => name;
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
// ignore: unused_element
|
||||
static void _initializeBuilder(SubscriptionEntityBuilder builder) => builder
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ class _$SubscriptionListResponseSerializer
|
|||
final String wireName = 'SubscriptionListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, SubscriptionListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -41,21 +41,21 @@ class _$SubscriptionListResponseSerializer
|
|||
|
||||
@override
|
||||
SubscriptionListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new SubscriptionListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(SubscriptionEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(SubscriptionEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,10 +75,10 @@ class _$SubscriptionItemResponseSerializer
|
|||
final String wireName = 'SubscriptionItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, SubscriptionItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(SubscriptionEntity)),
|
||||
|
|
@ -89,19 +89,19 @@ class _$SubscriptionItemResponseSerializer
|
|||
|
||||
@override
|
||||
SubscriptionItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new SubscriptionItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(SubscriptionEntity))
|
||||
specifiedType: const FullType(SubscriptionEntity))!
|
||||
as SubscriptionEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -119,9 +119,10 @@ class _$SubscriptionEntitySerializer
|
|||
final String wireName = 'SubscriptionEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, SubscriptionEntity object,
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, SubscriptionEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'group_id',
|
||||
|
|
@ -205,7 +206,7 @@ class _$SubscriptionEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -239,144 +240,144 @@ class _$SubscriptionEntitySerializer
|
|||
|
||||
@override
|
||||
SubscriptionEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new SubscriptionEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'group_id':
|
||||
result.groupId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'product_ids':
|
||||
result.productIds = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'recurring_product_ids':
|
||||
result.recurringProductIds = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'optional_product_ids':
|
||||
result.optionalProductIds = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'optional_recurring_product_ids':
|
||||
result.optionalRecurringProductIds = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'registration_required':
|
||||
result.registrationRequired = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'use_inventory_management':
|
||||
result.useInventoryManagement = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'frequency_id':
|
||||
result.frequencyId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'auto_bill':
|
||||
result.autoBill = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'promo_code':
|
||||
result.promoCode = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'promo_discount':
|
||||
result.promoDiscount = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'price':
|
||||
result.price = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'is_amount_discount':
|
||||
result.isAmountDiscount = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'allow_cancellation':
|
||||
result.allowCancellation = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'per_seat_enabled':
|
||||
result.perSeatEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'max_seats_limit':
|
||||
result.maxSeatsLimit = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'trial_enabled':
|
||||
result.trialEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'trial_duration':
|
||||
result.trialDuration = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'allow_query_overrides':
|
||||
result.allowQueryOverrides = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'allow_plan_changes':
|
||||
result.allowPlanChanges = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'refund_period':
|
||||
result.refundPeriod = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'webhook_configuration':
|
||||
result.webhookConfiguration.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(WebhookConfigurationEntity))
|
||||
specifiedType: const FullType(WebhookConfigurationEntity))!
|
||||
as WebhookConfigurationEntity);
|
||||
break;
|
||||
case 'purchase_page':
|
||||
result.purchasePage = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -396,10 +397,10 @@ class _$WebhookConfigurationEntitySerializer
|
|||
final String wireName = 'WebhookConfigurationEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, WebhookConfigurationEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'return_url',
|
||||
serializers.serialize(object.returnUrl,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -423,36 +424,36 @@ class _$WebhookConfigurationEntitySerializer
|
|||
|
||||
@override
|
||||
WebhookConfigurationEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new WebhookConfigurationEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'return_url':
|
||||
result.returnUrl = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'post_purchase_url':
|
||||
result.postPurchaseUrl = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'post_purchase_rest_method':
|
||||
result.postPurchaseRestMethod = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'post_purchase_headers':
|
||||
result.postPurchaseHeaders.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(String)])));
|
||||
const [const FullType(String), const FullType(String)]))!);
|
||||
break;
|
||||
case 'post_purchase_body':
|
||||
result.postPurchaseBody = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -466,10 +467,10 @@ class _$SubscriptionListResponse extends SubscriptionListResponse {
|
|||
final BuiltList<SubscriptionEntity> data;
|
||||
|
||||
factory _$SubscriptionListResponse(
|
||||
[void Function(SubscriptionListResponseBuilder) updates]) =>
|
||||
[void Function(SubscriptionListResponseBuilder)? updates]) =>
|
||||
(new SubscriptionListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$SubscriptionListResponse._({this.data}) : super._() {
|
||||
_$SubscriptionListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'SubscriptionListResponse', 'data');
|
||||
}
|
||||
|
|
@ -489,10 +490,10 @@ class _$SubscriptionListResponse extends SubscriptionListResponse {
|
|||
return other is SubscriptionListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -510,12 +511,12 @@ class _$SubscriptionListResponse extends SubscriptionListResponse {
|
|||
class SubscriptionListResponseBuilder
|
||||
implements
|
||||
Builder<SubscriptionListResponse, SubscriptionListResponseBuilder> {
|
||||
_$SubscriptionListResponse _$v;
|
||||
_$SubscriptionListResponse? _$v;
|
||||
|
||||
ListBuilder<SubscriptionEntity> _data;
|
||||
ListBuilder<SubscriptionEntity>? _data;
|
||||
ListBuilder<SubscriptionEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<SubscriptionEntity>();
|
||||
set data(ListBuilder<SubscriptionEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<SubscriptionEntity>? data) => _$this._data = data;
|
||||
|
||||
SubscriptionListResponseBuilder();
|
||||
|
||||
|
|
@ -535,7 +536,7 @@ class SubscriptionListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(SubscriptionListResponseBuilder) updates) {
|
||||
void update(void Function(SubscriptionListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -547,7 +548,7 @@ class SubscriptionListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$SubscriptionListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -567,10 +568,10 @@ class _$SubscriptionItemResponse extends SubscriptionItemResponse {
|
|||
final SubscriptionEntity data;
|
||||
|
||||
factory _$SubscriptionItemResponse(
|
||||
[void Function(SubscriptionItemResponseBuilder) updates]) =>
|
||||
[void Function(SubscriptionItemResponseBuilder)? updates]) =>
|
||||
(new SubscriptionItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$SubscriptionItemResponse._({this.data}) : super._() {
|
||||
_$SubscriptionItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'SubscriptionItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -590,10 +591,10 @@ class _$SubscriptionItemResponse extends SubscriptionItemResponse {
|
|||
return other is SubscriptionItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -611,12 +612,12 @@ class _$SubscriptionItemResponse extends SubscriptionItemResponse {
|
|||
class SubscriptionItemResponseBuilder
|
||||
implements
|
||||
Builder<SubscriptionItemResponse, SubscriptionItemResponseBuilder> {
|
||||
_$SubscriptionItemResponse _$v;
|
||||
_$SubscriptionItemResponse? _$v;
|
||||
|
||||
SubscriptionEntityBuilder _data;
|
||||
SubscriptionEntityBuilder? _data;
|
||||
SubscriptionEntityBuilder get data =>
|
||||
_$this._data ??= new SubscriptionEntityBuilder();
|
||||
set data(SubscriptionEntityBuilder data) => _$this._data = data;
|
||||
set data(SubscriptionEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
SubscriptionItemResponseBuilder();
|
||||
|
||||
|
|
@ -636,7 +637,7 @@ class SubscriptionItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(SubscriptionItemResponseBuilder) updates) {
|
||||
void update(void Function(SubscriptionItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -648,7 +649,7 @@ class SubscriptionItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$SubscriptionItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -713,7 +714,7 @@ class _$SubscriptionEntity extends SubscriptionEntity {
|
|||
@override
|
||||
final String purchasePage;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -721,51 +722,51 @@ class _$SubscriptionEntity extends SubscriptionEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$SubscriptionEntity(
|
||||
[void Function(SubscriptionEntityBuilder) updates]) =>
|
||||
[void Function(SubscriptionEntityBuilder)? updates]) =>
|
||||
(new SubscriptionEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$SubscriptionEntity._(
|
||||
{this.name,
|
||||
this.groupId,
|
||||
this.productIds,
|
||||
this.recurringProductIds,
|
||||
this.optionalProductIds,
|
||||
this.optionalRecurringProductIds,
|
||||
this.registrationRequired,
|
||||
this.useInventoryManagement,
|
||||
this.frequencyId,
|
||||
this.autoBill,
|
||||
this.promoCode,
|
||||
this.promoDiscount,
|
||||
this.price,
|
||||
this.isAmountDiscount,
|
||||
this.allowCancellation,
|
||||
this.perSeatEnabled,
|
||||
this.maxSeatsLimit,
|
||||
this.trialEnabled,
|
||||
this.trialDuration,
|
||||
this.allowQueryOverrides,
|
||||
this.allowPlanChanges,
|
||||
this.refundPeriod,
|
||||
this.webhookConfiguration,
|
||||
this.purchasePage,
|
||||
{required this.name,
|
||||
required this.groupId,
|
||||
required this.productIds,
|
||||
required this.recurringProductIds,
|
||||
required this.optionalProductIds,
|
||||
required this.optionalRecurringProductIds,
|
||||
required this.registrationRequired,
|
||||
required this.useInventoryManagement,
|
||||
required this.frequencyId,
|
||||
required this.autoBill,
|
||||
required this.promoCode,
|
||||
required this.promoDiscount,
|
||||
required this.price,
|
||||
required this.isAmountDiscount,
|
||||
required this.allowCancellation,
|
||||
required this.perSeatEnabled,
|
||||
required this.maxSeatsLimit,
|
||||
required this.trialEnabled,
|
||||
required this.trialDuration,
|
||||
required this.allowQueryOverrides,
|
||||
required this.allowPlanChanges,
|
||||
required this.refundPeriod,
|
||||
required this.webhookConfiguration,
|
||||
required this.purchasePage,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'SubscriptionEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -870,10 +871,10 @@ class _$SubscriptionEntity extends SubscriptionEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, groupId.hashCode);
|
||||
|
|
@ -952,151 +953,154 @@ class _$SubscriptionEntity extends SubscriptionEntity {
|
|||
|
||||
class SubscriptionEntityBuilder
|
||||
implements Builder<SubscriptionEntity, SubscriptionEntityBuilder> {
|
||||
_$SubscriptionEntity _$v;
|
||||
_$SubscriptionEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _groupId;
|
||||
String get groupId => _$this._groupId;
|
||||
set groupId(String groupId) => _$this._groupId = groupId;
|
||||
String? _groupId;
|
||||
String? get groupId => _$this._groupId;
|
||||
set groupId(String? groupId) => _$this._groupId = groupId;
|
||||
|
||||
String _productIds;
|
||||
String get productIds => _$this._productIds;
|
||||
set productIds(String productIds) => _$this._productIds = productIds;
|
||||
String? _productIds;
|
||||
String? get productIds => _$this._productIds;
|
||||
set productIds(String? productIds) => _$this._productIds = productIds;
|
||||
|
||||
String _recurringProductIds;
|
||||
String get recurringProductIds => _$this._recurringProductIds;
|
||||
set recurringProductIds(String recurringProductIds) =>
|
||||
String? _recurringProductIds;
|
||||
String? get recurringProductIds => _$this._recurringProductIds;
|
||||
set recurringProductIds(String? recurringProductIds) =>
|
||||
_$this._recurringProductIds = recurringProductIds;
|
||||
|
||||
String _optionalProductIds;
|
||||
String get optionalProductIds => _$this._optionalProductIds;
|
||||
set optionalProductIds(String optionalProductIds) =>
|
||||
String? _optionalProductIds;
|
||||
String? get optionalProductIds => _$this._optionalProductIds;
|
||||
set optionalProductIds(String? optionalProductIds) =>
|
||||
_$this._optionalProductIds = optionalProductIds;
|
||||
|
||||
String _optionalRecurringProductIds;
|
||||
String get optionalRecurringProductIds => _$this._optionalRecurringProductIds;
|
||||
set optionalRecurringProductIds(String optionalRecurringProductIds) =>
|
||||
String? _optionalRecurringProductIds;
|
||||
String? get optionalRecurringProductIds =>
|
||||
_$this._optionalRecurringProductIds;
|
||||
set optionalRecurringProductIds(String? optionalRecurringProductIds) =>
|
||||
_$this._optionalRecurringProductIds = optionalRecurringProductIds;
|
||||
|
||||
bool _registrationRequired;
|
||||
bool get registrationRequired => _$this._registrationRequired;
|
||||
set registrationRequired(bool registrationRequired) =>
|
||||
bool? _registrationRequired;
|
||||
bool? get registrationRequired => _$this._registrationRequired;
|
||||
set registrationRequired(bool? registrationRequired) =>
|
||||
_$this._registrationRequired = registrationRequired;
|
||||
|
||||
bool _useInventoryManagement;
|
||||
bool get useInventoryManagement => _$this._useInventoryManagement;
|
||||
set useInventoryManagement(bool useInventoryManagement) =>
|
||||
bool? _useInventoryManagement;
|
||||
bool? get useInventoryManagement => _$this._useInventoryManagement;
|
||||
set useInventoryManagement(bool? useInventoryManagement) =>
|
||||
_$this._useInventoryManagement = useInventoryManagement;
|
||||
|
||||
String _frequencyId;
|
||||
String get frequencyId => _$this._frequencyId;
|
||||
set frequencyId(String frequencyId) => _$this._frequencyId = frequencyId;
|
||||
String? _frequencyId;
|
||||
String? get frequencyId => _$this._frequencyId;
|
||||
set frequencyId(String? frequencyId) => _$this._frequencyId = frequencyId;
|
||||
|
||||
String _autoBill;
|
||||
String get autoBill => _$this._autoBill;
|
||||
set autoBill(String autoBill) => _$this._autoBill = autoBill;
|
||||
String? _autoBill;
|
||||
String? get autoBill => _$this._autoBill;
|
||||
set autoBill(String? autoBill) => _$this._autoBill = autoBill;
|
||||
|
||||
String _promoCode;
|
||||
String get promoCode => _$this._promoCode;
|
||||
set promoCode(String promoCode) => _$this._promoCode = promoCode;
|
||||
String? _promoCode;
|
||||
String? get promoCode => _$this._promoCode;
|
||||
set promoCode(String? promoCode) => _$this._promoCode = promoCode;
|
||||
|
||||
double _promoDiscount;
|
||||
double get promoDiscount => _$this._promoDiscount;
|
||||
set promoDiscount(double promoDiscount) =>
|
||||
double? _promoDiscount;
|
||||
double? get promoDiscount => _$this._promoDiscount;
|
||||
set promoDiscount(double? promoDiscount) =>
|
||||
_$this._promoDiscount = promoDiscount;
|
||||
|
||||
double _price;
|
||||
double get price => _$this._price;
|
||||
set price(double price) => _$this._price = price;
|
||||
double? _price;
|
||||
double? get price => _$this._price;
|
||||
set price(double? price) => _$this._price = price;
|
||||
|
||||
bool _isAmountDiscount;
|
||||
bool get isAmountDiscount => _$this._isAmountDiscount;
|
||||
set isAmountDiscount(bool isAmountDiscount) =>
|
||||
bool? _isAmountDiscount;
|
||||
bool? get isAmountDiscount => _$this._isAmountDiscount;
|
||||
set isAmountDiscount(bool? isAmountDiscount) =>
|
||||
_$this._isAmountDiscount = isAmountDiscount;
|
||||
|
||||
bool _allowCancellation;
|
||||
bool get allowCancellation => _$this._allowCancellation;
|
||||
set allowCancellation(bool allowCancellation) =>
|
||||
bool? _allowCancellation;
|
||||
bool? get allowCancellation => _$this._allowCancellation;
|
||||
set allowCancellation(bool? allowCancellation) =>
|
||||
_$this._allowCancellation = allowCancellation;
|
||||
|
||||
bool _perSeatEnabled;
|
||||
bool get perSeatEnabled => _$this._perSeatEnabled;
|
||||
set perSeatEnabled(bool perSeatEnabled) =>
|
||||
bool? _perSeatEnabled;
|
||||
bool? get perSeatEnabled => _$this._perSeatEnabled;
|
||||
set perSeatEnabled(bool? perSeatEnabled) =>
|
||||
_$this._perSeatEnabled = perSeatEnabled;
|
||||
|
||||
int _maxSeatsLimit;
|
||||
int get maxSeatsLimit => _$this._maxSeatsLimit;
|
||||
set maxSeatsLimit(int maxSeatsLimit) => _$this._maxSeatsLimit = maxSeatsLimit;
|
||||
int? _maxSeatsLimit;
|
||||
int? get maxSeatsLimit => _$this._maxSeatsLimit;
|
||||
set maxSeatsLimit(int? maxSeatsLimit) =>
|
||||
_$this._maxSeatsLimit = maxSeatsLimit;
|
||||
|
||||
bool _trialEnabled;
|
||||
bool get trialEnabled => _$this._trialEnabled;
|
||||
set trialEnabled(bool trialEnabled) => _$this._trialEnabled = trialEnabled;
|
||||
bool? _trialEnabled;
|
||||
bool? get trialEnabled => _$this._trialEnabled;
|
||||
set trialEnabled(bool? trialEnabled) => _$this._trialEnabled = trialEnabled;
|
||||
|
||||
int _trialDuration;
|
||||
int get trialDuration => _$this._trialDuration;
|
||||
set trialDuration(int trialDuration) => _$this._trialDuration = trialDuration;
|
||||
int? _trialDuration;
|
||||
int? get trialDuration => _$this._trialDuration;
|
||||
set trialDuration(int? trialDuration) =>
|
||||
_$this._trialDuration = trialDuration;
|
||||
|
||||
bool _allowQueryOverrides;
|
||||
bool get allowQueryOverrides => _$this._allowQueryOverrides;
|
||||
set allowQueryOverrides(bool allowQueryOverrides) =>
|
||||
bool? _allowQueryOverrides;
|
||||
bool? get allowQueryOverrides => _$this._allowQueryOverrides;
|
||||
set allowQueryOverrides(bool? allowQueryOverrides) =>
|
||||
_$this._allowQueryOverrides = allowQueryOverrides;
|
||||
|
||||
bool _allowPlanChanges;
|
||||
bool get allowPlanChanges => _$this._allowPlanChanges;
|
||||
set allowPlanChanges(bool allowPlanChanges) =>
|
||||
bool? _allowPlanChanges;
|
||||
bool? get allowPlanChanges => _$this._allowPlanChanges;
|
||||
set allowPlanChanges(bool? allowPlanChanges) =>
|
||||
_$this._allowPlanChanges = allowPlanChanges;
|
||||
|
||||
int _refundPeriod;
|
||||
int get refundPeriod => _$this._refundPeriod;
|
||||
set refundPeriod(int refundPeriod) => _$this._refundPeriod = refundPeriod;
|
||||
int? _refundPeriod;
|
||||
int? get refundPeriod => _$this._refundPeriod;
|
||||
set refundPeriod(int? refundPeriod) => _$this._refundPeriod = refundPeriod;
|
||||
|
||||
WebhookConfigurationEntityBuilder _webhookConfiguration;
|
||||
WebhookConfigurationEntityBuilder? _webhookConfiguration;
|
||||
WebhookConfigurationEntityBuilder get webhookConfiguration =>
|
||||
_$this._webhookConfiguration ??= new WebhookConfigurationEntityBuilder();
|
||||
set webhookConfiguration(
|
||||
WebhookConfigurationEntityBuilder webhookConfiguration) =>
|
||||
WebhookConfigurationEntityBuilder? webhookConfiguration) =>
|
||||
_$this._webhookConfiguration = webhookConfiguration;
|
||||
|
||||
String _purchasePage;
|
||||
String get purchasePage => _$this._purchasePage;
|
||||
set purchasePage(String purchasePage) => _$this._purchasePage = purchasePage;
|
||||
String? _purchasePage;
|
||||
String? get purchasePage => _$this._purchasePage;
|
||||
set purchasePage(String? purchasePage) => _$this._purchasePage = purchasePage;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
SubscriptionEntityBuilder() {
|
||||
SubscriptionEntity._initializeBuilder(this);
|
||||
|
|
@ -1149,7 +1153,7 @@ class SubscriptionEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(SubscriptionEntityBuilder) updates) {
|
||||
void update(void Function(SubscriptionEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1203,7 +1207,7 @@ class SubscriptionEntityBuilder
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'SubscriptionEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'webhookConfiguration';
|
||||
webhookConfiguration.build();
|
||||
|
|
@ -1231,15 +1235,15 @@ class _$WebhookConfigurationEntity extends WebhookConfigurationEntity {
|
|||
final String postPurchaseBody;
|
||||
|
||||
factory _$WebhookConfigurationEntity(
|
||||
[void Function(WebhookConfigurationEntityBuilder) updates]) =>
|
||||
[void Function(WebhookConfigurationEntityBuilder)? updates]) =>
|
||||
(new WebhookConfigurationEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$WebhookConfigurationEntity._(
|
||||
{this.returnUrl,
|
||||
this.postPurchaseUrl,
|
||||
this.postPurchaseRestMethod,
|
||||
this.postPurchaseHeaders,
|
||||
this.postPurchaseBody})
|
||||
{required this.returnUrl,
|
||||
required this.postPurchaseUrl,
|
||||
required this.postPurchaseRestMethod,
|
||||
required this.postPurchaseHeaders,
|
||||
required this.postPurchaseBody})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
returnUrl, r'WebhookConfigurationEntity', 'returnUrl');
|
||||
|
|
@ -1273,10 +1277,10 @@ class _$WebhookConfigurationEntity extends WebhookConfigurationEntity {
|
|||
postPurchaseBody == other.postPurchaseBody;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, returnUrl.hashCode);
|
||||
_$hash = $jc(_$hash, postPurchaseUrl.hashCode);
|
||||
|
|
@ -1302,31 +1306,31 @@ class _$WebhookConfigurationEntity extends WebhookConfigurationEntity {
|
|||
class WebhookConfigurationEntityBuilder
|
||||
implements
|
||||
Builder<WebhookConfigurationEntity, WebhookConfigurationEntityBuilder> {
|
||||
_$WebhookConfigurationEntity _$v;
|
||||
_$WebhookConfigurationEntity? _$v;
|
||||
|
||||
String _returnUrl;
|
||||
String get returnUrl => _$this._returnUrl;
|
||||
set returnUrl(String returnUrl) => _$this._returnUrl = returnUrl;
|
||||
String? _returnUrl;
|
||||
String? get returnUrl => _$this._returnUrl;
|
||||
set returnUrl(String? returnUrl) => _$this._returnUrl = returnUrl;
|
||||
|
||||
String _postPurchaseUrl;
|
||||
String get postPurchaseUrl => _$this._postPurchaseUrl;
|
||||
set postPurchaseUrl(String postPurchaseUrl) =>
|
||||
String? _postPurchaseUrl;
|
||||
String? get postPurchaseUrl => _$this._postPurchaseUrl;
|
||||
set postPurchaseUrl(String? postPurchaseUrl) =>
|
||||
_$this._postPurchaseUrl = postPurchaseUrl;
|
||||
|
||||
String _postPurchaseRestMethod;
|
||||
String get postPurchaseRestMethod => _$this._postPurchaseRestMethod;
|
||||
set postPurchaseRestMethod(String postPurchaseRestMethod) =>
|
||||
String? _postPurchaseRestMethod;
|
||||
String? get postPurchaseRestMethod => _$this._postPurchaseRestMethod;
|
||||
set postPurchaseRestMethod(String? postPurchaseRestMethod) =>
|
||||
_$this._postPurchaseRestMethod = postPurchaseRestMethod;
|
||||
|
||||
MapBuilder<String, String> _postPurchaseHeaders;
|
||||
MapBuilder<String, String>? _postPurchaseHeaders;
|
||||
MapBuilder<String, String> get postPurchaseHeaders =>
|
||||
_$this._postPurchaseHeaders ??= new MapBuilder<String, String>();
|
||||
set postPurchaseHeaders(MapBuilder<String, String> postPurchaseHeaders) =>
|
||||
set postPurchaseHeaders(MapBuilder<String, String>? postPurchaseHeaders) =>
|
||||
_$this._postPurchaseHeaders = postPurchaseHeaders;
|
||||
|
||||
String _postPurchaseBody;
|
||||
String get postPurchaseBody => _$this._postPurchaseBody;
|
||||
set postPurchaseBody(String postPurchaseBody) =>
|
||||
String? _postPurchaseBody;
|
||||
String? get postPurchaseBody => _$this._postPurchaseBody;
|
||||
set postPurchaseBody(String? postPurchaseBody) =>
|
||||
_$this._postPurchaseBody = postPurchaseBody;
|
||||
|
||||
WebhookConfigurationEntityBuilder() {
|
||||
|
|
@ -1353,7 +1357,7 @@ class WebhookConfigurationEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(WebhookConfigurationEntityBuilder) updates) {
|
||||
void update(void Function(WebhookConfigurationEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1381,7 +1385,7 @@ class WebhookConfigurationEntityBuilder
|
|||
r'WebhookConfigurationEntity',
|
||||
'postPurchaseBody'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'postPurchaseHeaders';
|
||||
postPurchaseHeaders.build();
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ class _$SystemLogEntitySerializer
|
|||
final String wireName = 'SystemLogEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, SystemLogEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, SystemLogEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
'company_id',
|
||||
|
|
@ -50,51 +50,51 @@ class _$SystemLogEntitySerializer
|
|||
|
||||
@override
|
||||
SystemLogEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new SystemLogEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'company_id':
|
||||
result.companyId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.userId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'client_id':
|
||||
result.clientId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'event_id':
|
||||
result.eventId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
case 'category_id':
|
||||
result.categoryId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
case 'type_id':
|
||||
result.typeId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
case 'log':
|
||||
result.log = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -123,19 +123,19 @@ class _$SystemLogEntity extends SystemLogEntity {
|
|||
@override
|
||||
final int createdAt;
|
||||
|
||||
factory _$SystemLogEntity([void Function(SystemLogEntityBuilder) updates]) =>
|
||||
factory _$SystemLogEntity([void Function(SystemLogEntityBuilder)? updates]) =>
|
||||
(new SystemLogEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$SystemLogEntity._(
|
||||
{this.id,
|
||||
this.companyId,
|
||||
this.userId,
|
||||
this.clientId,
|
||||
this.eventId,
|
||||
this.categoryId,
|
||||
this.typeId,
|
||||
this.log,
|
||||
this.createdAt})
|
||||
{required this.id,
|
||||
required this.companyId,
|
||||
required this.userId,
|
||||
required this.clientId,
|
||||
required this.eventId,
|
||||
required this.categoryId,
|
||||
required this.typeId,
|
||||
required this.log,
|
||||
required this.createdAt})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'SystemLogEntity', 'id');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -176,10 +176,10 @@ class _$SystemLogEntity extends SystemLogEntity {
|
|||
createdAt == other.createdAt;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, companyId.hashCode);
|
||||
|
|
@ -212,43 +212,43 @@ class _$SystemLogEntity extends SystemLogEntity {
|
|||
|
||||
class SystemLogEntityBuilder
|
||||
implements Builder<SystemLogEntity, SystemLogEntityBuilder> {
|
||||
_$SystemLogEntity _$v;
|
||||
_$SystemLogEntity? _$v;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String _companyId;
|
||||
String get companyId => _$this._companyId;
|
||||
set companyId(String companyId) => _$this._companyId = companyId;
|
||||
String? _companyId;
|
||||
String? get companyId => _$this._companyId;
|
||||
set companyId(String? companyId) => _$this._companyId = companyId;
|
||||
|
||||
String _userId;
|
||||
String get userId => _$this._userId;
|
||||
set userId(String userId) => _$this._userId = userId;
|
||||
String? _userId;
|
||||
String? get userId => _$this._userId;
|
||||
set userId(String? userId) => _$this._userId = userId;
|
||||
|
||||
String _clientId;
|
||||
String get clientId => _$this._clientId;
|
||||
set clientId(String clientId) => _$this._clientId = clientId;
|
||||
String? _clientId;
|
||||
String? get clientId => _$this._clientId;
|
||||
set clientId(String? clientId) => _$this._clientId = clientId;
|
||||
|
||||
int _eventId;
|
||||
int get eventId => _$this._eventId;
|
||||
set eventId(int eventId) => _$this._eventId = eventId;
|
||||
int? _eventId;
|
||||
int? get eventId => _$this._eventId;
|
||||
set eventId(int? eventId) => _$this._eventId = eventId;
|
||||
|
||||
int _categoryId;
|
||||
int get categoryId => _$this._categoryId;
|
||||
set categoryId(int categoryId) => _$this._categoryId = categoryId;
|
||||
int? _categoryId;
|
||||
int? get categoryId => _$this._categoryId;
|
||||
set categoryId(int? categoryId) => _$this._categoryId = categoryId;
|
||||
|
||||
int _typeId;
|
||||
int get typeId => _$this._typeId;
|
||||
set typeId(int typeId) => _$this._typeId = typeId;
|
||||
int? _typeId;
|
||||
int? get typeId => _$this._typeId;
|
||||
set typeId(int? typeId) => _$this._typeId = typeId;
|
||||
|
||||
String _log;
|
||||
String get log => _$this._log;
|
||||
set log(String log) => _$this._log = log;
|
||||
String? _log;
|
||||
String? get log => _$this._log;
|
||||
set log(String? log) => _$this._log = log;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
SystemLogEntityBuilder();
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ class SystemLogEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(SystemLogEntityBuilder) updates) {
|
||||
void update(void Function(SystemLogEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ class TaskFields {
|
|||
|
||||
abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
||||
factory TaskTime({
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
String description,
|
||||
bool isBillable,
|
||||
DateTime? startDate,
|
||||
DateTime? endDate,
|
||||
String? description,
|
||||
bool? isBillable,
|
||||
}) {
|
||||
return _$TaskTime._(
|
||||
startDate: startDate ??
|
||||
|
|
@ -108,27 +108,25 @@ abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
@nullable
|
||||
DateTime get startDate;
|
||||
DateTime? get startDate;
|
||||
|
||||
@nullable
|
||||
DateTime get endDate;
|
||||
DateTime? get endDate;
|
||||
|
||||
String get description;
|
||||
|
||||
bool get isBillable;
|
||||
|
||||
Duration get duration => (endDate ?? DateTime.now()).difference(startDate);
|
||||
Duration get duration => (endDate ?? DateTime.now()).difference(startDate!);
|
||||
|
||||
List<dynamic> get asList {
|
||||
final startTime = startDate != null
|
||||
? (startDate.millisecondsSinceEpoch / 1000).floor()
|
||||
? (startDate!.millisecondsSinceEpoch / 1000).floor()
|
||||
: 0;
|
||||
var endTime =
|
||||
endDate != null ? (endDate.millisecondsSinceEpoch / 1000).floor() : 0;
|
||||
endDate != null ? (endDate!.millisecondsSinceEpoch / 1000).floor() : 0;
|
||||
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext);
|
||||
final company = store.state.company;
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext!);
|
||||
final company = store.state.company!;
|
||||
|
||||
// Handle the end time being before the start time
|
||||
if (!company.showTaskEndDate && endTime != 0) {
|
||||
|
|
@ -154,7 +152,7 @@ abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
|||
startDate == null && endDate == null && description.isEmpty;
|
||||
|
||||
Map<String, Duration> getParts() {
|
||||
final localStartDate = startDate.toLocal();
|
||||
final localStartDate = startDate!.toLocal();
|
||||
final localEndDate = (endDate ?? DateTime.now()).toLocal();
|
||||
final startSqlDate = convertDateTimeToSqlDate(localStartDate);
|
||||
final endSqlDate = convertDateTimeToSqlDate(localEndDate);
|
||||
|
|
@ -199,21 +197,21 @@ abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
|||
|
||||
return TaskTime(
|
||||
startDate: DateTime(
|
||||
dateTime.toLocal()?.year,
|
||||
dateTime.toLocal()?.month,
|
||||
dateTime.toLocal()?.day,
|
||||
startDate?.toLocal()?.hour ?? now.hour,
|
||||
startDate?.toLocal()?.minute ?? now.minute,
|
||||
startDate?.toLocal()?.second ?? now.second,
|
||||
dateTime.toLocal().year,
|
||||
dateTime.toLocal().month,
|
||||
dateTime.toLocal().day,
|
||||
startDate?.toLocal().hour ?? now.hour,
|
||||
startDate?.toLocal().minute ?? now.minute,
|
||||
startDate?.toLocal().second ?? now.second,
|
||||
).toUtc(),
|
||||
endDate: syncDates && endDate != null
|
||||
? DateTime(
|
||||
dateTime.toLocal()?.year,
|
||||
dateTime.toLocal()?.month,
|
||||
dateTime.toLocal()?.day,
|
||||
endDate.toLocal().hour,
|
||||
endDate.toLocal().minute,
|
||||
endDate.toLocal().second,
|
||||
dateTime.toLocal().year,
|
||||
dateTime.toLocal().month,
|
||||
dateTime.toLocal().day,
|
||||
endDate!.toLocal().hour,
|
||||
endDate!.toLocal().minute,
|
||||
endDate!.toLocal().second,
|
||||
)
|
||||
: endDate,
|
||||
description: description,
|
||||
|
|
@ -232,12 +230,12 @@ abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
|||
return TaskTime(
|
||||
startDate: startDate,
|
||||
endDate: DateTime(
|
||||
dateTime.toLocal()?.year,
|
||||
dateTime.toLocal()?.month,
|
||||
dateTime.toLocal()?.day,
|
||||
endDate?.toLocal()?.hour ?? now.hour,
|
||||
endDate?.toLocal()?.minute ?? now.minute,
|
||||
endDate?.toLocal()?.second ?? now.second,
|
||||
dateTime.toLocal().year,
|
||||
dateTime.toLocal().month,
|
||||
dateTime.toLocal().day,
|
||||
endDate?.toLocal().hour ?? now.hour,
|
||||
endDate?.toLocal().minute ?? now.minute,
|
||||
endDate?.toLocal().second ?? now.second,
|
||||
).toUtc(),
|
||||
description: description,
|
||||
isBillable: isBillable,
|
||||
|
|
@ -249,9 +247,9 @@ abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
|||
|
||||
return TaskTime(
|
||||
startDate: DateTime(
|
||||
startDate?.toLocal()?.year ?? now.year,
|
||||
startDate?.toLocal()?.month ?? now.month,
|
||||
startDate?.toLocal()?.day ?? now.day,
|
||||
startDate?.toLocal().year ?? now.year,
|
||||
startDate?.toLocal().month ?? now.month,
|
||||
startDate?.toLocal().day ?? now.day,
|
||||
dateTime.toLocal().hour,
|
||||
dateTime.toLocal().minute,
|
||||
dateTime.toLocal().second,
|
||||
|
|
@ -267,9 +265,9 @@ abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
|||
return TaskTime(
|
||||
startDate: startDate,
|
||||
endDate: DateTime(
|
||||
endDate?.toLocal()?.year ?? startDate?.toLocal()?.year ?? now.year,
|
||||
endDate?.toLocal()?.month ?? startDate?.toLocal()?.month ?? now.month,
|
||||
endDate?.toLocal()?.day ?? startDate?.toLocal()?.day ?? now.day,
|
||||
endDate?.toLocal().year ?? startDate?.toLocal().year ?? now.year,
|
||||
endDate?.toLocal().month ?? startDate?.toLocal().month ?? now.month,
|
||||
endDate?.toLocal().day ?? startDate?.toLocal().day ?? now.day,
|
||||
dateTime.toLocal().hour,
|
||||
dateTime.toLocal().minute,
|
||||
dateTime.toLocal().second,
|
||||
|
|
@ -296,11 +294,11 @@ abstract class TaskEntity extends Object
|
|||
with BaseEntity, SelectableEntity, BelongsToClient
|
||||
implements Built<TaskEntity, TaskEntityBuilder> {
|
||||
factory TaskEntity({
|
||||
String id,
|
||||
AppState state,
|
||||
ClientEntity client,
|
||||
UserEntity user,
|
||||
ProjectEntity project,
|
||||
String? id,
|
||||
AppState? state,
|
||||
ClientEntity? client,
|
||||
UserEntity? user,
|
||||
ProjectEntity? project,
|
||||
}) {
|
||||
final isRunning = state?.company?.autoStartTasks ?? false;
|
||||
|
||||
|
|
@ -327,7 +325,7 @@ abstract class TaskEntity extends Object
|
|||
createdAt: 0,
|
||||
createdUserId: '',
|
||||
statusId: defaultTaskStatusId(
|
||||
state?.taskStatusState?.map ?? BuiltMap<String, TaskStatusEntity>()),
|
||||
state?.taskStatusState?.map ?? BuiltMap<String, TaskStatusEntity>())!,
|
||||
documents: BuiltList<DocumentEntity>(),
|
||||
);
|
||||
}
|
||||
|
|
@ -352,7 +350,7 @@ abstract class TaskEntity extends Object
|
|||
|
||||
TaskEntity stop() {
|
||||
final times = getTaskTimes();
|
||||
final taskTime = times.last.stop;
|
||||
final taskTime = times.last!.stop;
|
||||
|
||||
return updateTaskTime(taskTime, times.length - 1);
|
||||
}
|
||||
|
|
@ -370,28 +368,28 @@ abstract class TaskEntity extends Object
|
|||
|
||||
bool get areTimesValid {
|
||||
final times = getTaskTimes();
|
||||
DateTime lastDateTime = DateTime(2000);
|
||||
DateTime? lastDateTime = DateTime(2000);
|
||||
int countRunning = 0;
|
||||
bool isValid = true;
|
||||
|
||||
times.forEach((time) {
|
||||
final startDate = time.startDate;
|
||||
final startDate = time!.startDate;
|
||||
final endDate = time.endDate;
|
||||
|
||||
if (time.isRunning) {
|
||||
countRunning++;
|
||||
|
||||
if (startDate.isBefore(lastDateTime)) {
|
||||
if (startDate!.isBefore(lastDateTime!)) {
|
||||
isValid = false;
|
||||
}
|
||||
} else {
|
||||
if (startDate.isBefore(lastDateTime) || startDate.isAfter(endDate)) {
|
||||
if (startDate!.isBefore(lastDateTime!) || startDate.isAfter(endDate!)) {
|
||||
isValid = false;
|
||||
}
|
||||
if (endDate.isBefore(startDate) || endDate.isBefore(lastDateTime)) {
|
||||
if (endDate!.isBefore(startDate) || endDate.isBefore(lastDateTime!)) {
|
||||
isValid = false;
|
||||
}
|
||||
lastDateTime = lastDateTime.isAfter(endDate) ? lastDateTime : endDate;
|
||||
lastDateTime = lastDateTime!.isAfter(endDate) ? lastDateTime : endDate;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -400,27 +398,27 @@ abstract class TaskEntity extends Object
|
|||
|
||||
List get getInvalidTimeIndices {
|
||||
final times = getTaskTimes();
|
||||
DateTime lastDateTime = DateTime(2000);
|
||||
DateTime? lastDateTime = DateTime(2000);
|
||||
|
||||
final indices = <int>[];
|
||||
int counter = 0;
|
||||
|
||||
times.forEach((time) {
|
||||
final startDate = time.startDate;
|
||||
final startDate = time!.startDate;
|
||||
final endDate = time.endDate;
|
||||
|
||||
if (time.isRunning) {
|
||||
if (startDate.isBefore(lastDateTime)) {
|
||||
if (startDate!.isBefore(lastDateTime!)) {
|
||||
indices.add(counter);
|
||||
}
|
||||
} else {
|
||||
if (startDate.isBefore(lastDateTime) || startDate.isAfter(endDate)) {
|
||||
if (startDate!.isBefore(lastDateTime!) || startDate.isAfter(endDate!)) {
|
||||
indices.add(counter);
|
||||
}
|
||||
if (endDate.isBefore(startDate) || endDate.isBefore(lastDateTime)) {
|
||||
if (endDate!.isBefore(startDate) || endDate.isBefore(lastDateTime!)) {
|
||||
indices.add(counter);
|
||||
}
|
||||
lastDateTime = lastDateTime.isAfter(endDate) ? lastDateTime : endDate;
|
||||
lastDateTime = lastDateTime!.isAfter(endDate) ? lastDateTime : endDate;
|
||||
}
|
||||
|
||||
counter++;
|
||||
|
|
@ -436,10 +434,10 @@ abstract class TaskEntity extends Object
|
|||
return false;
|
||||
}
|
||||
|
||||
return taskTimes.any((taskTime) => taskTime.isRunning);
|
||||
return taskTimes.any((taskTime) => taskTime!.isRunning);
|
||||
}
|
||||
|
||||
bool isBetween(String startDate, String endDate) {
|
||||
bool isBetween(String? startDate, String? endDate) {
|
||||
final taskTimes = getTaskTimes();
|
||||
|
||||
if (taskTimes.isEmpty) {
|
||||
|
|
@ -447,21 +445,21 @@ abstract class TaskEntity extends Object
|
|||
}
|
||||
|
||||
final taskStartDate =
|
||||
convertDateTimeToSqlDate(taskTimes.first.startDate.toLocal());
|
||||
if (startDate.compareTo(taskStartDate) <= 0 &&
|
||||
endDate.compareTo(taskStartDate) >= 0) {
|
||||
convertDateTimeToSqlDate(taskTimes.first!.startDate!.toLocal());
|
||||
if (startDate!.compareTo(taskStartDate) <= 0 &&
|
||||
endDate!.compareTo(taskStartDate) >= 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final completedTimes = taskTimes.where((element) => !element.isRunning);
|
||||
final completedTimes = taskTimes.where((element) => !element!.isRunning);
|
||||
|
||||
if (completedTimes.isNotEmpty) {
|
||||
final lastTaskTime = completedTimes.last;
|
||||
final lastTaskTime = completedTimes.last!;
|
||||
final taskEndDate =
|
||||
convertDateTimeToSqlDate(lastTaskTime.endDate.toLocal());
|
||||
convertDateTimeToSqlDate(lastTaskTime.endDate!.toLocal());
|
||||
|
||||
if (startDate.compareTo(taskEndDate) <= 0 &&
|
||||
endDate.compareTo(taskEndDate) >= 0) {
|
||||
endDate!.compareTo(taskEndDate) >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -469,7 +467,7 @@ abstract class TaskEntity extends Object
|
|||
return false;
|
||||
}
|
||||
|
||||
int get startTimestamp {
|
||||
int? get startTimestamp {
|
||||
if (timeLog.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -485,7 +483,7 @@ abstract class TaskEntity extends Object
|
|||
return first[0];
|
||||
}
|
||||
|
||||
int get endTimestamp {
|
||||
int? get endTimestamp {
|
||||
if (timeLog.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -506,8 +504,8 @@ abstract class TaskEntity extends Object
|
|||
return last[1].round();
|
||||
}
|
||||
|
||||
List<TaskTime> getTaskTimes({bool sort = true}) {
|
||||
final List<TaskTime> details = [];
|
||||
List<TaskTime?> getTaskTimes({bool sort = true}) {
|
||||
final List<TaskTime?> details = [];
|
||||
|
||||
if (timeLog.isEmpty) {
|
||||
return details;
|
||||
|
|
@ -515,8 +513,8 @@ abstract class TaskEntity extends Object
|
|||
|
||||
final List<dynamic> log = jsonDecode(timeLog);
|
||||
log.forEach((dynamic detail) {
|
||||
int startDate;
|
||||
int endDate;
|
||||
int? startDate;
|
||||
int? endDate;
|
||||
final taskItem = detail as List<dynamic>;
|
||||
|
||||
if (taskItem[0] == false || taskItem[0] == null) {
|
||||
|
|
@ -544,7 +542,7 @@ abstract class TaskEntity extends Object
|
|||
|
||||
if (sort) {
|
||||
details
|
||||
.sort((timeA, timeB) => timeA.startDate.compareTo(timeB.startDate));
|
||||
.sort((timeA, timeB) => timeA!.startDate!.compareTo(timeB!.startDate!));
|
||||
}
|
||||
|
||||
return details;
|
||||
|
|
@ -590,8 +588,8 @@ abstract class TaskEntity extends Object
|
|||
int seconds = 0;
|
||||
|
||||
getTaskTimes().forEach((taskTime) {
|
||||
if (!onlyBillable || taskTime.isBillable) {
|
||||
seconds += taskTime.duration.inSeconds;
|
||||
if (!onlyBillable || taskTime!.isBillable) {
|
||||
seconds += taskTime!.duration.inSeconds;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -628,28 +626,27 @@ abstract class TaskEntity extends Object
|
|||
@BuiltValueField(wireName: 'status_id')
|
||||
String get statusId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'status_order')
|
||||
int get statusOrder;
|
||||
int? get statusOrder;
|
||||
|
||||
BuiltList<DocumentEntity> get documents;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
final isLocked = userCompany.company.invoiceTaskLock && isInvoiced;
|
||||
final isLocked = userCompany!.company!.invoiceTaskLock && isInvoiced;
|
||||
|
||||
if (!isDeleted) {
|
||||
if (!isDeleted!) {
|
||||
if (includeEdit &&
|
||||
userCompany.canEditEntity(this) &&
|
||||
!isLocked &&
|
||||
!isDeleted &&
|
||||
!isDeleted! &&
|
||||
!multiselect) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
|
@ -682,13 +679,13 @@ abstract class TaskEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (!isDeleted && !multiselect && isOld) {
|
||||
if (!isDeleted! && !multiselect && isOld) {
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
actions.add(EntityAction.changeStatus);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isDeleted && multiselect) {
|
||||
if (!isDeleted! && multiselect) {
|
||||
actions.add(EntityAction.documents);
|
||||
}
|
||||
|
||||
|
|
@ -700,113 +697,113 @@ abstract class TaskEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo(
|
||||
TaskEntity task,
|
||||
TaskEntity? task,
|
||||
String sortField,
|
||||
bool sortAscending,
|
||||
BuiltMap<String, UserEntity> userMap,
|
||||
BuiltMap<String, ClientEntity> clientMap,
|
||||
BuiltMap<String, ProjectEntity> projectMap,
|
||||
BuiltMap<String, InvoiceEntity> invoiceMap,
|
||||
BuiltMap<String, TaskStatusEntity> taskStatusMap,
|
||||
BuiltMap<String?, UserEntity?> userMap,
|
||||
BuiltMap<String?, ClientEntity?> clientMap,
|
||||
BuiltMap<String?, ProjectEntity?> projectMap,
|
||||
BuiltMap<String?, InvoiceEntity?> invoiceMap,
|
||||
BuiltMap<String?, TaskStatusEntity?> taskStatusMap,
|
||||
) {
|
||||
int response = 0;
|
||||
final TaskEntity taskA = sortAscending ? this : task;
|
||||
final TaskEntity taskB = sortAscending ? task : this;
|
||||
final TaskEntity? taskA = sortAscending ? this : task;
|
||||
final TaskEntity? taskB = sortAscending ? task : this;
|
||||
|
||||
switch (sortField) {
|
||||
case TaskFields.duration:
|
||||
case TaskFields.amount:
|
||||
response =
|
||||
taskA.calculateDuration().compareTo(taskB.calculateDuration());
|
||||
taskA!.calculateDuration().compareTo(taskB!.calculateDuration());
|
||||
break;
|
||||
case TaskFields.description:
|
||||
response = taskA.description.compareTo(taskB.description);
|
||||
response = taskA!.description.compareTo(taskB!.description);
|
||||
break;
|
||||
case TaskFields.customValue1:
|
||||
response = taskA.customValue1.compareTo(taskB.customValue1);
|
||||
response = taskA!.customValue1.compareTo(taskB!.customValue1);
|
||||
break;
|
||||
case TaskFields.customValue2:
|
||||
response = taskA.customValue2.compareTo(taskB.customValue2);
|
||||
response = taskA!.customValue2.compareTo(taskB!.customValue2);
|
||||
break;
|
||||
case TaskFields.customValue3:
|
||||
response = taskA.customValue3.compareTo(taskB.customValue3);
|
||||
response = taskA!.customValue3.compareTo(taskB!.customValue3);
|
||||
break;
|
||||
case TaskFields.customValue4:
|
||||
response = taskA.customValue4.compareTo(taskB.customValue4);
|
||||
response = taskA!.customValue4.compareTo(taskB!.customValue4);
|
||||
break;
|
||||
case TaskFields.clientId:
|
||||
case TaskFields.client:
|
||||
final clientA = clientMap[taskA.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[taskB.clientId] ?? ClientEntity();
|
||||
final clientA = clientMap[taskA!.clientId] ?? ClientEntity();
|
||||
final clientB = clientMap[taskB!.clientId] ?? ClientEntity();
|
||||
response = removeDiacritics(clientA.listDisplayName)
|
||||
.toLowerCase()
|
||||
.compareTo(removeDiacritics(clientB.listDisplayName).toLowerCase());
|
||||
break;
|
||||
case TaskFields.projectId:
|
||||
case TaskFields.project:
|
||||
final projectA = projectMap[taskA.projectId] ?? ProjectEntity();
|
||||
final projectB = projectMap[taskB.projectId] ?? ProjectEntity();
|
||||
final projectA = projectMap[taskA!.projectId] ?? ProjectEntity();
|
||||
final projectB = projectMap[taskB!.projectId] ?? ProjectEntity();
|
||||
response = projectA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(projectB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case TaskFields.invoiceId:
|
||||
final invoiceA = invoiceMap[taskA.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceB = invoiceMap[taskB.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceA = invoiceMap[taskA!.invoiceId] ?? InvoiceEntity();
|
||||
final invoiceB = invoiceMap[taskB!.invoiceId] ?? InvoiceEntity();
|
||||
response = invoiceA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(invoiceB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.state:
|
||||
final stateA =
|
||||
EntityState.valueOf(taskA.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(taskA!.entityState) ?? EntityState.active;
|
||||
final stateB =
|
||||
EntityState.valueOf(taskB.entityState) ?? EntityState.active;
|
||||
EntityState.valueOf(taskB!.entityState) ?? EntityState.active;
|
||||
response =
|
||||
stateA.name.toLowerCase().compareTo(stateB.name.toLowerCase());
|
||||
break;
|
||||
case TaskFields.date:
|
||||
case TaskFields.timeLog:
|
||||
response =
|
||||
taskA.timeLog.toLowerCase().compareTo(taskB.timeLog.toLowerCase());
|
||||
taskA!.timeLog.toLowerCase().compareTo(taskB!.timeLog.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdAt:
|
||||
response = taskA.createdAt.compareTo(taskB.createdAt);
|
||||
response = taskA!.createdAt.compareTo(taskB!.createdAt);
|
||||
break;
|
||||
case TaskFields.archivedAt:
|
||||
response = taskA.archivedAt.compareTo(taskB.archivedAt);
|
||||
response = taskA!.archivedAt.compareTo(taskB!.archivedAt);
|
||||
break;
|
||||
case TaskFields.updatedAt:
|
||||
response = taskA.updatedAt.compareTo(taskB.updatedAt);
|
||||
response = taskA!.updatedAt.compareTo(taskB!.updatedAt);
|
||||
break;
|
||||
case TaskFields.documents:
|
||||
response = taskA.documents.length.compareTo(taskB.documents.length);
|
||||
response = taskA!.documents.length.compareTo(taskB!.documents.length);
|
||||
break;
|
||||
case TaskFields.number:
|
||||
response = compareNatural(
|
||||
taskA.number.toLowerCase(), taskB.number.toLowerCase());
|
||||
taskA!.number.toLowerCase(), taskB!.number.toLowerCase());
|
||||
break;
|
||||
case TaskFields.createdBy:
|
||||
final userA = userMap[taskA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[taskB.createdUserId] ?? UserEntity();
|
||||
final userA = userMap[taskA!.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[taskB!.createdUserId] ?? UserEntity();
|
||||
response = userA.fullName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.fullName.toLowerCase());
|
||||
break;
|
||||
case TaskFields.assignedTo:
|
||||
final userA = userMap[taskA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[taskB.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap[taskA!.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[taskB!.assignedUserId] ?? UserEntity();
|
||||
response = userA.fullName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.fullName.toLowerCase());
|
||||
break;
|
||||
case TaskFields.status:
|
||||
final taskAStatus = taskA.isRunning
|
||||
final taskAStatus = taskA!.isRunning
|
||||
? -1
|
||||
: taskA.isInvoiced
|
||||
? 999999
|
||||
: (taskStatusMap[taskA.statusId]?.statusOrder ?? 0);
|
||||
final taskBStatus = taskB.isRunning
|
||||
final taskBStatus = taskB!.isRunning
|
||||
? -1
|
||||
: taskB.isInvoiced
|
||||
? 999999
|
||||
|
|
@ -819,14 +816,14 @@ abstract class TaskEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = task.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
response = task!.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
number,
|
||||
|
|
@ -862,7 +859,7 @@ abstract class TaskEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
number,
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ class _$TaskListResponseSerializer
|
|||
final String wireName = 'TaskListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaskListResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaskListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -35,21 +35,21 @@ class _$TaskListResponseSerializer
|
|||
|
||||
@override
|
||||
TaskListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaskListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TaskEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(TaskEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -66,9 +66,9 @@ class _$TaskItemResponseSerializer
|
|||
final String wireName = 'TaskItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaskItemResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaskItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(TaskEntity)),
|
||||
|
|
@ -79,19 +79,19 @@ class _$TaskItemResponseSerializer
|
|||
|
||||
@override
|
||||
TaskItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaskItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(TaskEntity)) as TaskEntity);
|
||||
specifiedType: const FullType(TaskEntity))! as TaskEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -107,9 +107,9 @@ class _$TaskTimeSerializer implements StructuredSerializer<TaskTime> {
|
|||
final String wireName = 'TaskTime';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaskTime object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaskTime object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'description',
|
||||
serializers.serialize(object.description,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -117,7 +117,7 @@ class _$TaskTimeSerializer implements StructuredSerializer<TaskTime> {
|
|||
serializers.serialize(object.isBillable,
|
||||
specifiedType: const FullType(bool)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.startDate;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -136,31 +136,31 @@ class _$TaskTimeSerializer implements StructuredSerializer<TaskTime> {
|
|||
}
|
||||
|
||||
@override
|
||||
TaskTime deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
TaskTime deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaskTimeBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'startDate':
|
||||
result.startDate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(DateTime)) as DateTime;
|
||||
specifiedType: const FullType(DateTime)) as DateTime?;
|
||||
break;
|
||||
case 'endDate':
|
||||
result.endDate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(DateTime)) as DateTime;
|
||||
specifiedType: const FullType(DateTime)) as DateTime?;
|
||||
break;
|
||||
case 'description':
|
||||
result.description = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'isBillable':
|
||||
result.isBillable = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -176,9 +176,9 @@ class _$TaskEntitySerializer implements StructuredSerializer<TaskEntity> {
|
|||
final String wireName = 'TaskEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaskEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaskEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'description',
|
||||
serializers.serialize(object.description,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -230,7 +230,7 @@ class _$TaskEntitySerializer implements StructuredSerializer<TaskEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.statusOrder;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -269,105 +269,105 @@ class _$TaskEntitySerializer implements StructuredSerializer<TaskEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
TaskEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
TaskEntity deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaskEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'description':
|
||||
result.description = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'number':
|
||||
result.number = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'invoice_id':
|
||||
result.invoiceId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'client_id':
|
||||
result.clientId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'rate':
|
||||
result.rate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'project_id':
|
||||
result.projectId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'time_log':
|
||||
result.timeLog = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value1':
|
||||
result.customValue1 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value2':
|
||||
result.customValue2 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value3':
|
||||
result.customValue3 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value4':
|
||||
result.customValue4 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'status_id':
|
||||
result.statusId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'status_order':
|
||||
result.statusOrder = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
case 'documents':
|
||||
result.documents.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(DocumentEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(DocumentEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -381,10 +381,10 @@ class _$TaskListResponse extends TaskListResponse {
|
|||
final BuiltList<TaskEntity> data;
|
||||
|
||||
factory _$TaskListResponse(
|
||||
[void Function(TaskListResponseBuilder) updates]) =>
|
||||
[void Function(TaskListResponseBuilder)? updates]) =>
|
||||
(new TaskListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TaskListResponse._({this.data}) : super._() {
|
||||
_$TaskListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'TaskListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -402,10 +402,10 @@ class _$TaskListResponse extends TaskListResponse {
|
|||
return other is TaskListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -421,12 +421,12 @@ class _$TaskListResponse extends TaskListResponse {
|
|||
|
||||
class TaskListResponseBuilder
|
||||
implements Builder<TaskListResponse, TaskListResponseBuilder> {
|
||||
_$TaskListResponse _$v;
|
||||
_$TaskListResponse? _$v;
|
||||
|
||||
ListBuilder<TaskEntity> _data;
|
||||
ListBuilder<TaskEntity>? _data;
|
||||
ListBuilder<TaskEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<TaskEntity>();
|
||||
set data(ListBuilder<TaskEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<TaskEntity>? data) => _$this._data = data;
|
||||
|
||||
TaskListResponseBuilder();
|
||||
|
||||
|
|
@ -446,7 +446,7 @@ class TaskListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaskListResponseBuilder) updates) {
|
||||
void update(void Function(TaskListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ class TaskListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TaskListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -478,10 +478,10 @@ class _$TaskItemResponse extends TaskItemResponse {
|
|||
final TaskEntity data;
|
||||
|
||||
factory _$TaskItemResponse(
|
||||
[void Function(TaskItemResponseBuilder) updates]) =>
|
||||
[void Function(TaskItemResponseBuilder)? updates]) =>
|
||||
(new TaskItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TaskItemResponse._({this.data}) : super._() {
|
||||
_$TaskItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'TaskItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -499,10 +499,10 @@ class _$TaskItemResponse extends TaskItemResponse {
|
|||
return other is TaskItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -518,11 +518,11 @@ class _$TaskItemResponse extends TaskItemResponse {
|
|||
|
||||
class TaskItemResponseBuilder
|
||||
implements Builder<TaskItemResponse, TaskItemResponseBuilder> {
|
||||
_$TaskItemResponse _$v;
|
||||
_$TaskItemResponse? _$v;
|
||||
|
||||
TaskEntityBuilder _data;
|
||||
TaskEntityBuilder? _data;
|
||||
TaskEntityBuilder get data => _$this._data ??= new TaskEntityBuilder();
|
||||
set data(TaskEntityBuilder data) => _$this._data = data;
|
||||
set data(TaskEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
TaskItemResponseBuilder();
|
||||
|
||||
|
|
@ -542,7 +542,7 @@ class TaskItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaskItemResponseBuilder) updates) {
|
||||
void update(void Function(TaskItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -554,7 +554,7 @@ class TaskItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TaskItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -571,19 +571,22 @@ class TaskItemResponseBuilder
|
|||
|
||||
class _$TaskTime extends TaskTime {
|
||||
@override
|
||||
final DateTime startDate;
|
||||
final DateTime? startDate;
|
||||
@override
|
||||
final DateTime endDate;
|
||||
final DateTime? endDate;
|
||||
@override
|
||||
final String description;
|
||||
@override
|
||||
final bool isBillable;
|
||||
|
||||
factory _$TaskTime([void Function(TaskTimeBuilder) updates]) =>
|
||||
factory _$TaskTime([void Function(TaskTimeBuilder)? updates]) =>
|
||||
(new TaskTimeBuilder()..update(updates))._build();
|
||||
|
||||
_$TaskTime._(
|
||||
{this.startDate, this.endDate, this.description, this.isBillable})
|
||||
{this.startDate,
|
||||
this.endDate,
|
||||
required this.description,
|
||||
required this.isBillable})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
description, r'TaskTime', 'description');
|
||||
|
|
@ -608,10 +611,10 @@ class _$TaskTime extends TaskTime {
|
|||
isBillable == other.isBillable;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, startDate.hashCode);
|
||||
_$hash = $jc(_$hash, endDate.hashCode);
|
||||
|
|
@ -633,23 +636,23 @@ class _$TaskTime extends TaskTime {
|
|||
}
|
||||
|
||||
class TaskTimeBuilder implements Builder<TaskTime, TaskTimeBuilder> {
|
||||
_$TaskTime _$v;
|
||||
_$TaskTime? _$v;
|
||||
|
||||
DateTime _startDate;
|
||||
DateTime get startDate => _$this._startDate;
|
||||
set startDate(DateTime startDate) => _$this._startDate = startDate;
|
||||
DateTime? _startDate;
|
||||
DateTime? get startDate => _$this._startDate;
|
||||
set startDate(DateTime? startDate) => _$this._startDate = startDate;
|
||||
|
||||
DateTime _endDate;
|
||||
DateTime get endDate => _$this._endDate;
|
||||
set endDate(DateTime endDate) => _$this._endDate = endDate;
|
||||
DateTime? _endDate;
|
||||
DateTime? get endDate => _$this._endDate;
|
||||
set endDate(DateTime? endDate) => _$this._endDate = endDate;
|
||||
|
||||
String _description;
|
||||
String get description => _$this._description;
|
||||
set description(String description) => _$this._description = description;
|
||||
String? _description;
|
||||
String? get description => _$this._description;
|
||||
set description(String? description) => _$this._description = description;
|
||||
|
||||
bool _isBillable;
|
||||
bool get isBillable => _$this._isBillable;
|
||||
set isBillable(bool isBillable) => _$this._isBillable = isBillable;
|
||||
bool? _isBillable;
|
||||
bool? get isBillable => _$this._isBillable;
|
||||
set isBillable(bool? isBillable) => _$this._isBillable = isBillable;
|
||||
|
||||
TaskTimeBuilder();
|
||||
|
||||
|
|
@ -672,7 +675,7 @@ class TaskTimeBuilder implements Builder<TaskTime, TaskTimeBuilder> {
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaskTimeBuilder) updates) {
|
||||
void update(void Function(TaskTimeBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -719,11 +722,11 @@ class _$TaskEntity extends TaskEntity {
|
|||
@override
|
||||
final String statusId;
|
||||
@override
|
||||
final int statusOrder;
|
||||
final int? statusOrder;
|
||||
@override
|
||||
final BuiltList<DocumentEntity> documents;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -731,40 +734,40 @@ class _$TaskEntity extends TaskEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$TaskEntity([void Function(TaskEntityBuilder) updates]) =>
|
||||
factory _$TaskEntity([void Function(TaskEntityBuilder)? updates]) =>
|
||||
(new TaskEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TaskEntity._(
|
||||
{this.description,
|
||||
this.number,
|
||||
this.invoiceId,
|
||||
this.clientId,
|
||||
this.rate,
|
||||
this.projectId,
|
||||
this.timeLog,
|
||||
this.customValue1,
|
||||
this.customValue2,
|
||||
this.customValue3,
|
||||
this.customValue4,
|
||||
this.statusId,
|
||||
{required this.description,
|
||||
required this.number,
|
||||
required this.invoiceId,
|
||||
required this.clientId,
|
||||
required this.rate,
|
||||
required this.projectId,
|
||||
required this.timeLog,
|
||||
required this.customValue1,
|
||||
required this.customValue2,
|
||||
required this.customValue3,
|
||||
required this.customValue4,
|
||||
required this.statusId,
|
||||
this.statusOrder,
|
||||
this.documents,
|
||||
required this.documents,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
description, r'TaskEntity', 'description');
|
||||
|
|
@ -831,10 +834,10 @@ class _$TaskEntity extends TaskEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, description.hashCode);
|
||||
_$hash = $jc(_$hash, number.hashCode);
|
||||
|
|
@ -892,99 +895,99 @@ class _$TaskEntity extends TaskEntity {
|
|||
}
|
||||
|
||||
class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
|
||||
_$TaskEntity _$v;
|
||||
_$TaskEntity? _$v;
|
||||
|
||||
String _description;
|
||||
String get description => _$this._description;
|
||||
set description(String description) => _$this._description = description;
|
||||
String? _description;
|
||||
String? get description => _$this._description;
|
||||
set description(String? description) => _$this._description = description;
|
||||
|
||||
String _number;
|
||||
String get number => _$this._number;
|
||||
set number(String number) => _$this._number = number;
|
||||
String? _number;
|
||||
String? get number => _$this._number;
|
||||
set number(String? number) => _$this._number = number;
|
||||
|
||||
String _invoiceId;
|
||||
String get invoiceId => _$this._invoiceId;
|
||||
set invoiceId(String invoiceId) => _$this._invoiceId = invoiceId;
|
||||
String? _invoiceId;
|
||||
String? get invoiceId => _$this._invoiceId;
|
||||
set invoiceId(String? invoiceId) => _$this._invoiceId = invoiceId;
|
||||
|
||||
String _clientId;
|
||||
String get clientId => _$this._clientId;
|
||||
set clientId(String clientId) => _$this._clientId = clientId;
|
||||
String? _clientId;
|
||||
String? get clientId => _$this._clientId;
|
||||
set clientId(String? clientId) => _$this._clientId = clientId;
|
||||
|
||||
double _rate;
|
||||
double get rate => _$this._rate;
|
||||
set rate(double rate) => _$this._rate = rate;
|
||||
double? _rate;
|
||||
double? get rate => _$this._rate;
|
||||
set rate(double? rate) => _$this._rate = rate;
|
||||
|
||||
String _projectId;
|
||||
String get projectId => _$this._projectId;
|
||||
set projectId(String projectId) => _$this._projectId = projectId;
|
||||
String? _projectId;
|
||||
String? get projectId => _$this._projectId;
|
||||
set projectId(String? projectId) => _$this._projectId = projectId;
|
||||
|
||||
String _timeLog;
|
||||
String get timeLog => _$this._timeLog;
|
||||
set timeLog(String timeLog) => _$this._timeLog = timeLog;
|
||||
String? _timeLog;
|
||||
String? get timeLog => _$this._timeLog;
|
||||
set timeLog(String? timeLog) => _$this._timeLog = timeLog;
|
||||
|
||||
String _customValue1;
|
||||
String get customValue1 => _$this._customValue1;
|
||||
set customValue1(String customValue1) => _$this._customValue1 = customValue1;
|
||||
String? _customValue1;
|
||||
String? get customValue1 => _$this._customValue1;
|
||||
set customValue1(String? customValue1) => _$this._customValue1 = customValue1;
|
||||
|
||||
String _customValue2;
|
||||
String get customValue2 => _$this._customValue2;
|
||||
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
|
||||
String? _customValue2;
|
||||
String? get customValue2 => _$this._customValue2;
|
||||
set customValue2(String? customValue2) => _$this._customValue2 = customValue2;
|
||||
|
||||
String _customValue3;
|
||||
String get customValue3 => _$this._customValue3;
|
||||
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
|
||||
String? _customValue3;
|
||||
String? get customValue3 => _$this._customValue3;
|
||||
set customValue3(String? customValue3) => _$this._customValue3 = customValue3;
|
||||
|
||||
String _customValue4;
|
||||
String get customValue4 => _$this._customValue4;
|
||||
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
|
||||
String? _customValue4;
|
||||
String? get customValue4 => _$this._customValue4;
|
||||
set customValue4(String? customValue4) => _$this._customValue4 = customValue4;
|
||||
|
||||
String _statusId;
|
||||
String get statusId => _$this._statusId;
|
||||
set statusId(String statusId) => _$this._statusId = statusId;
|
||||
String? _statusId;
|
||||
String? get statusId => _$this._statusId;
|
||||
set statusId(String? statusId) => _$this._statusId = statusId;
|
||||
|
||||
int _statusOrder;
|
||||
int get statusOrder => _$this._statusOrder;
|
||||
set statusOrder(int statusOrder) => _$this._statusOrder = statusOrder;
|
||||
int? _statusOrder;
|
||||
int? get statusOrder => _$this._statusOrder;
|
||||
set statusOrder(int? statusOrder) => _$this._statusOrder = statusOrder;
|
||||
|
||||
ListBuilder<DocumentEntity> _documents;
|
||||
ListBuilder<DocumentEntity>? _documents;
|
||||
ListBuilder<DocumentEntity> get documents =>
|
||||
_$this._documents ??= new ListBuilder<DocumentEntity>();
|
||||
set documents(ListBuilder<DocumentEntity> documents) =>
|
||||
set documents(ListBuilder<DocumentEntity>? documents) =>
|
||||
_$this._documents = documents;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
TaskEntityBuilder();
|
||||
|
||||
|
|
@ -1025,7 +1028,7 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaskEntityBuilder) updates) {
|
||||
void update(void Function(TaskEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1069,7 +1072,7 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'TaskEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'documents';
|
||||
documents.build();
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class TaskStatusFields {
|
|||
abstract class TaskStatusEntity extends Object
|
||||
with BaseEntity, SelectableEntity, EntityStatus
|
||||
implements Built<TaskStatusEntity, TaskStatusEntityBuilder> {
|
||||
factory TaskStatusEntity({String id, AppState state}) {
|
||||
factory TaskStatusEntity({String? id, AppState? state}) {
|
||||
return _$TaskStatusEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
name: '',
|
||||
|
|
@ -89,23 +89,22 @@ abstract class TaskStatusEntity extends Object
|
|||
|
||||
String get color;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'status_order')
|
||||
int get statusOrder;
|
||||
int? get statusOrder;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted &&
|
||||
if (!isDeleted! &&
|
||||
!multiselect &&
|
||||
includeEdit &&
|
||||
userCompany.canEditEntity(this)) {
|
||||
userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
|
|
@ -117,24 +116,24 @@ abstract class TaskStatusEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo({
|
||||
TaskStatusEntity taskStatus,
|
||||
String sortField,
|
||||
bool sortAscending,
|
||||
TaskStatusEntity? taskStatus,
|
||||
String? sortField,
|
||||
required bool sortAscending,
|
||||
}) {
|
||||
int response = 0;
|
||||
final TaskStatusEntity taskStatusA = sortAscending ? this : taskStatus;
|
||||
final TaskStatusEntity taskStatusB = sortAscending ? taskStatus : this;
|
||||
final TaskStatusEntity? taskStatusA = sortAscending ? this : taskStatus;
|
||||
final TaskStatusEntity? taskStatusB = sortAscending ? taskStatus : this;
|
||||
|
||||
switch (sortField) {
|
||||
case TaskStatusFields.name:
|
||||
response = taskStatusA.name.compareTo(taskStatusB.name);
|
||||
response = taskStatusA!.name.compareTo(taskStatusB!.name);
|
||||
break;
|
||||
case TaskStatusFields.order:
|
||||
response = (taskStatusA.statusOrder ?? 99999)
|
||||
.compareTo(taskStatusB.statusOrder ?? 99999);
|
||||
response = (taskStatusA!.statusOrder ?? 99999)
|
||||
.compareTo(taskStatusB!.statusOrder ?? 99999);
|
||||
break;
|
||||
case TaskStatusFields.updatedAt:
|
||||
response = taskStatusA.updatedAt.compareTo(taskStatusB.updatedAt);
|
||||
response = taskStatusA!.updatedAt.compareTo(taskStatusB!.updatedAt);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by taskStatus.$sortField is not implemented');
|
||||
|
|
@ -145,7 +144,7 @@ abstract class TaskStatusEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -155,7 +154,7 @@ abstract class TaskStatusEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$TaskStatusListResponseSerializer
|
|||
final String wireName = 'TaskStatusListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TaskStatusListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -39,21 +39,21 @@ class _$TaskStatusListResponseSerializer
|
|||
|
||||
@override
|
||||
TaskStatusListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaskStatusListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TaskStatusEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(TaskStatusEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$TaskStatusItemResponseSerializer
|
|||
final String wireName = 'TaskStatusItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TaskStatusItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(TaskStatusEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$TaskStatusItemResponseSerializer
|
|||
|
||||
@override
|
||||
TaskStatusItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaskStatusItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(TaskStatusEntity))
|
||||
specifiedType: const FullType(TaskStatusEntity))!
|
||||
as TaskStatusEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -117,9 +117,9 @@ class _$TaskStatusEntitySerializer
|
|||
final String wireName = 'TaskStatusEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaskStatusEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaskStatusEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'color',
|
||||
|
|
@ -137,7 +137,7 @@ class _$TaskStatusEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.statusOrder;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -177,59 +177,59 @@ class _$TaskStatusEntitySerializer
|
|||
|
||||
@override
|
||||
TaskStatusEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaskStatusEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'color':
|
||||
result.color = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'status_order':
|
||||
result.statusOrder = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -243,10 +243,10 @@ class _$TaskStatusListResponse extends TaskStatusListResponse {
|
|||
final BuiltList<TaskStatusEntity> data;
|
||||
|
||||
factory _$TaskStatusListResponse(
|
||||
[void Function(TaskStatusListResponseBuilder) updates]) =>
|
||||
[void Function(TaskStatusListResponseBuilder)? updates]) =>
|
||||
(new TaskStatusListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TaskStatusListResponse._({this.data}) : super._() {
|
||||
_$TaskStatusListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TaskStatusListResponse', 'data');
|
||||
}
|
||||
|
|
@ -266,10 +266,10 @@ class _$TaskStatusListResponse extends TaskStatusListResponse {
|
|||
return other is TaskStatusListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -286,12 +286,12 @@ class _$TaskStatusListResponse extends TaskStatusListResponse {
|
|||
|
||||
class TaskStatusListResponseBuilder
|
||||
implements Builder<TaskStatusListResponse, TaskStatusListResponseBuilder> {
|
||||
_$TaskStatusListResponse _$v;
|
||||
_$TaskStatusListResponse? _$v;
|
||||
|
||||
ListBuilder<TaskStatusEntity> _data;
|
||||
ListBuilder<TaskStatusEntity>? _data;
|
||||
ListBuilder<TaskStatusEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<TaskStatusEntity>();
|
||||
set data(ListBuilder<TaskStatusEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<TaskStatusEntity>? data) => _$this._data = data;
|
||||
|
||||
TaskStatusListResponseBuilder();
|
||||
|
||||
|
|
@ -311,7 +311,7 @@ class TaskStatusListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaskStatusListResponseBuilder) updates) {
|
||||
void update(void Function(TaskStatusListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -323,7 +323,7 @@ class TaskStatusListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TaskStatusListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -343,10 +343,10 @@ class _$TaskStatusItemResponse extends TaskStatusItemResponse {
|
|||
final TaskStatusEntity data;
|
||||
|
||||
factory _$TaskStatusItemResponse(
|
||||
[void Function(TaskStatusItemResponseBuilder) updates]) =>
|
||||
[void Function(TaskStatusItemResponseBuilder)? updates]) =>
|
||||
(new TaskStatusItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TaskStatusItemResponse._({this.data}) : super._() {
|
||||
_$TaskStatusItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TaskStatusItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -366,10 +366,10 @@ class _$TaskStatusItemResponse extends TaskStatusItemResponse {
|
|||
return other is TaskStatusItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -386,12 +386,12 @@ class _$TaskStatusItemResponse extends TaskStatusItemResponse {
|
|||
|
||||
class TaskStatusItemResponseBuilder
|
||||
implements Builder<TaskStatusItemResponse, TaskStatusItemResponseBuilder> {
|
||||
_$TaskStatusItemResponse _$v;
|
||||
_$TaskStatusItemResponse? _$v;
|
||||
|
||||
TaskStatusEntityBuilder _data;
|
||||
TaskStatusEntityBuilder? _data;
|
||||
TaskStatusEntityBuilder get data =>
|
||||
_$this._data ??= new TaskStatusEntityBuilder();
|
||||
set data(TaskStatusEntityBuilder data) => _$this._data = data;
|
||||
set data(TaskStatusEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
TaskStatusItemResponseBuilder();
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ class TaskStatusItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaskStatusItemResponseBuilder) updates) {
|
||||
void update(void Function(TaskStatusItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ class TaskStatusItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TaskStatusItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -444,9 +444,9 @@ class _$TaskStatusEntity extends TaskStatusEntity {
|
|||
@override
|
||||
final String color;
|
||||
@override
|
||||
final int statusOrder;
|
||||
final int? statusOrder;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -454,30 +454,30 @@ class _$TaskStatusEntity extends TaskStatusEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$TaskStatusEntity(
|
||||
[void Function(TaskStatusEntityBuilder) updates]) =>
|
||||
[void Function(TaskStatusEntityBuilder)? updates]) =>
|
||||
(new TaskStatusEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TaskStatusEntity._(
|
||||
{this.name,
|
||||
this.color,
|
||||
{required this.name,
|
||||
required this.color,
|
||||
this.statusOrder,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'TaskStatusEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(color, r'TaskStatusEntity', 'color');
|
||||
|
|
@ -515,10 +515,10 @@ class _$TaskStatusEntity extends TaskStatusEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, color.hashCode);
|
||||
|
|
@ -555,53 +555,53 @@ class _$TaskStatusEntity extends TaskStatusEntity {
|
|||
|
||||
class TaskStatusEntityBuilder
|
||||
implements Builder<TaskStatusEntity, TaskStatusEntityBuilder> {
|
||||
_$TaskStatusEntity _$v;
|
||||
_$TaskStatusEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
String _color;
|
||||
String get color => _$this._color;
|
||||
set color(String color) => _$this._color = color;
|
||||
String? _color;
|
||||
String? get color => _$this._color;
|
||||
set color(String? color) => _$this._color = color;
|
||||
|
||||
int _statusOrder;
|
||||
int get statusOrder => _$this._statusOrder;
|
||||
set statusOrder(int statusOrder) => _$this._statusOrder = statusOrder;
|
||||
int? _statusOrder;
|
||||
int? get statusOrder => _$this._statusOrder;
|
||||
set statusOrder(int? statusOrder) => _$this._statusOrder = statusOrder;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
TaskStatusEntityBuilder() {
|
||||
TaskStatusEntity._initializeBuilder(this);
|
||||
|
|
@ -633,7 +633,7 @@ class TaskStatusEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaskStatusEntityBuilder) updates) {
|
||||
void update(void Function(TaskStatusEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ class _$TaxDataEntitySerializer implements StructuredSerializer<TaxDataEntity> {
|
|||
final String wireName = 'TaxDataEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaxDataEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaxDataEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'geoPostalCode',
|
||||
serializers.serialize(object.geoPostalCode,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -65,59 +65,59 @@ class _$TaxDataEntitySerializer implements StructuredSerializer<TaxDataEntity> {
|
|||
|
||||
@override
|
||||
TaxDataEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaxDataEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'geoPostalCode':
|
||||
result.geoPostalCode = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'geoCity':
|
||||
result.geoCity = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'geoCounty':
|
||||
result.geoCounty = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'geoState':
|
||||
result.geoState = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'taxSales':
|
||||
result.taxSales = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
case 'stateSalesTax':
|
||||
result.stateSalesTax = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
case 'citySalesTax':
|
||||
result.citySalesTax = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
case 'cityTaxCode':
|
||||
result.cityTaxCode = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'countySalesTax':
|
||||
result.countySalesTax = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
case 'countyTaxCode':
|
||||
result.countyTaxCode = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'districtSalesTax':
|
||||
result.districtSalesTax = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -134,9 +134,9 @@ class _$TaxConfigEntitySerializer
|
|||
final String wireName = 'TaxConfigEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaxConfigEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaxConfigEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'version',
|
||||
serializers.serialize(object.version,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -156,30 +156,30 @@ class _$TaxConfigEntitySerializer
|
|||
|
||||
@override
|
||||
TaxConfigEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaxConfigEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'version':
|
||||
result.version = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'seller_subregion':
|
||||
result.sellerSubregion = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'regions':
|
||||
result.regions.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(TaxConfigRegionEntity)
|
||||
])));
|
||||
]))!);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -199,10 +199,10 @@ class _$TaxConfigRegionEntitySerializer
|
|||
final String wireName = 'TaxConfigRegionEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TaxConfigRegionEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'has_sales_above_threshold',
|
||||
serializers.serialize(object.hasSalesAboveThreshold,
|
||||
specifiedType: const FullType(bool)),
|
||||
|
|
@ -224,34 +224,34 @@ class _$TaxConfigRegionEntitySerializer
|
|||
|
||||
@override
|
||||
TaxConfigRegionEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaxConfigRegionEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'has_sales_above_threshold':
|
||||
result.hasSalesAboveThreshold = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'tax_all_subregions':
|
||||
result.taxAll = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'tax_threshold':
|
||||
result.taxThreshold = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
case 'subregions':
|
||||
result.subregions.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap, const [
|
||||
const FullType(String),
|
||||
const FullType(TaxConfigSubregionEntity)
|
||||
])));
|
||||
]))!);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -271,10 +271,10 @@ class _$TaxConfigSubregionEntitySerializer
|
|||
final String wireName = 'TaxConfigSubregionEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TaxConfigSubregionEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'apply_tax',
|
||||
serializers.serialize(object.applyTax,
|
||||
specifiedType: const FullType(bool)),
|
||||
|
|
@ -294,31 +294,31 @@ class _$TaxConfigSubregionEntitySerializer
|
|||
|
||||
@override
|
||||
TaxConfigSubregionEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaxConfigSubregionEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current as String?;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'apply_tax':
|
||||
result.applyTax = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'tax_rate':
|
||||
result.taxRate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
case 'tax_name':
|
||||
result.taxName = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'reduced_tax_rate':
|
||||
result.reducedTaxRate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double)) as double?;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -351,21 +351,21 @@ class _$TaxDataEntity extends TaxDataEntity {
|
|||
@override
|
||||
final double districtSalesTax;
|
||||
|
||||
factory _$TaxDataEntity([void Function(TaxDataEntityBuilder) updates]) =>
|
||||
factory _$TaxDataEntity([void Function(TaxDataEntityBuilder)? updates]) =>
|
||||
(new TaxDataEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TaxDataEntity._(
|
||||
{this.geoPostalCode,
|
||||
this.geoCity,
|
||||
this.geoCounty,
|
||||
this.geoState,
|
||||
this.taxSales,
|
||||
this.stateSalesTax,
|
||||
this.citySalesTax,
|
||||
this.cityTaxCode,
|
||||
this.countySalesTax,
|
||||
this.countyTaxCode,
|
||||
this.districtSalesTax})
|
||||
{required this.geoPostalCode,
|
||||
required this.geoCity,
|
||||
required this.geoCounty,
|
||||
required this.geoState,
|
||||
required this.taxSales,
|
||||
required this.stateSalesTax,
|
||||
required this.citySalesTax,
|
||||
required this.cityTaxCode,
|
||||
required this.countySalesTax,
|
||||
required this.countyTaxCode,
|
||||
required this.districtSalesTax})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
geoPostalCode, r'TaxDataEntity', 'geoPostalCode');
|
||||
|
|
@ -452,55 +452,55 @@ class _$TaxDataEntity extends TaxDataEntity {
|
|||
|
||||
class TaxDataEntityBuilder
|
||||
implements Builder<TaxDataEntity, TaxDataEntityBuilder> {
|
||||
_$TaxDataEntity _$v;
|
||||
_$TaxDataEntity? _$v;
|
||||
|
||||
String _geoPostalCode;
|
||||
String get geoPostalCode => _$this._geoPostalCode;
|
||||
set geoPostalCode(String geoPostalCode) =>
|
||||
String? _geoPostalCode;
|
||||
String? get geoPostalCode => _$this._geoPostalCode;
|
||||
set geoPostalCode(String? geoPostalCode) =>
|
||||
_$this._geoPostalCode = geoPostalCode;
|
||||
|
||||
String _geoCity;
|
||||
String get geoCity => _$this._geoCity;
|
||||
set geoCity(String geoCity) => _$this._geoCity = geoCity;
|
||||
String? _geoCity;
|
||||
String? get geoCity => _$this._geoCity;
|
||||
set geoCity(String? geoCity) => _$this._geoCity = geoCity;
|
||||
|
||||
String _geoCounty;
|
||||
String get geoCounty => _$this._geoCounty;
|
||||
set geoCounty(String geoCounty) => _$this._geoCounty = geoCounty;
|
||||
String? _geoCounty;
|
||||
String? get geoCounty => _$this._geoCounty;
|
||||
set geoCounty(String? geoCounty) => _$this._geoCounty = geoCounty;
|
||||
|
||||
String _geoState;
|
||||
String get geoState => _$this._geoState;
|
||||
set geoState(String geoState) => _$this._geoState = geoState;
|
||||
String? _geoState;
|
||||
String? get geoState => _$this._geoState;
|
||||
set geoState(String? geoState) => _$this._geoState = geoState;
|
||||
|
||||
double _taxSales;
|
||||
double get taxSales => _$this._taxSales;
|
||||
set taxSales(double taxSales) => _$this._taxSales = taxSales;
|
||||
double? _taxSales;
|
||||
double? get taxSales => _$this._taxSales;
|
||||
set taxSales(double? taxSales) => _$this._taxSales = taxSales;
|
||||
|
||||
double _stateSalesTax;
|
||||
double get stateSalesTax => _$this._stateSalesTax;
|
||||
set stateSalesTax(double stateSalesTax) =>
|
||||
double? _stateSalesTax;
|
||||
double? get stateSalesTax => _$this._stateSalesTax;
|
||||
set stateSalesTax(double? stateSalesTax) =>
|
||||
_$this._stateSalesTax = stateSalesTax;
|
||||
|
||||
double _citySalesTax;
|
||||
double get citySalesTax => _$this._citySalesTax;
|
||||
set citySalesTax(double citySalesTax) => _$this._citySalesTax = citySalesTax;
|
||||
double? _citySalesTax;
|
||||
double? get citySalesTax => _$this._citySalesTax;
|
||||
set citySalesTax(double? citySalesTax) => _$this._citySalesTax = citySalesTax;
|
||||
|
||||
String _cityTaxCode;
|
||||
String get cityTaxCode => _$this._cityTaxCode;
|
||||
set cityTaxCode(String cityTaxCode) => _$this._cityTaxCode = cityTaxCode;
|
||||
String? _cityTaxCode;
|
||||
String? get cityTaxCode => _$this._cityTaxCode;
|
||||
set cityTaxCode(String? cityTaxCode) => _$this._cityTaxCode = cityTaxCode;
|
||||
|
||||
double _countySalesTax;
|
||||
double get countySalesTax => _$this._countySalesTax;
|
||||
set countySalesTax(double countySalesTax) =>
|
||||
double? _countySalesTax;
|
||||
double? get countySalesTax => _$this._countySalesTax;
|
||||
set countySalesTax(double? countySalesTax) =>
|
||||
_$this._countySalesTax = countySalesTax;
|
||||
|
||||
String _countyTaxCode;
|
||||
String get countyTaxCode => _$this._countyTaxCode;
|
||||
set countyTaxCode(String countyTaxCode) =>
|
||||
String? _countyTaxCode;
|
||||
String? get countyTaxCode => _$this._countyTaxCode;
|
||||
set countyTaxCode(String? countyTaxCode) =>
|
||||
_$this._countyTaxCode = countyTaxCode;
|
||||
|
||||
double _districtSalesTax;
|
||||
double get districtSalesTax => _$this._districtSalesTax;
|
||||
set districtSalesTax(double districtSalesTax) =>
|
||||
double? _districtSalesTax;
|
||||
double? get districtSalesTax => _$this._districtSalesTax;
|
||||
set districtSalesTax(double? districtSalesTax) =>
|
||||
_$this._districtSalesTax = districtSalesTax;
|
||||
|
||||
TaxDataEntityBuilder() {
|
||||
|
|
@ -533,7 +533,7 @@ class TaxDataEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaxDataEntityBuilder) updates) {
|
||||
void update(void Function(TaxDataEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -576,10 +576,10 @@ class _$TaxConfigEntity extends TaxConfigEntity {
|
|||
@override
|
||||
final BuiltMap<String, TaxConfigRegionEntity> regions;
|
||||
|
||||
factory _$TaxConfigEntity([void Function(TaxConfigEntityBuilder) updates]) =>
|
||||
factory _$TaxConfigEntity([void Function(TaxConfigEntityBuilder)? updates]) =>
|
||||
(new TaxConfigEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TaxConfigEntity._({this.version, this.sellerSubregion, this.regions})
|
||||
_$TaxConfigEntity._({required this.version, required this.sellerSubregion, required this.regions})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
version, r'TaxConfigEntity', 'version');
|
||||
|
|
@ -606,10 +606,10 @@ class _$TaxConfigEntity extends TaxConfigEntity {
|
|||
regions == other.regions;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, version.hashCode);
|
||||
_$hash = $jc(_$hash, sellerSubregion.hashCode);
|
||||
|
|
@ -630,18 +630,18 @@ class _$TaxConfigEntity extends TaxConfigEntity {
|
|||
|
||||
class TaxConfigEntityBuilder
|
||||
implements Builder<TaxConfigEntity, TaxConfigEntityBuilder> {
|
||||
_$TaxConfigEntity _$v;
|
||||
_$TaxConfigEntity? _$v;
|
||||
|
||||
String _version;
|
||||
String get version => _$this._version;
|
||||
set version(String version) => _$this._version = version;
|
||||
String? _version;
|
||||
String? get version => _$this._version;
|
||||
set version(String? version) => _$this._version = version;
|
||||
|
||||
String _sellerSubregion;
|
||||
String get sellerSubregion => _$this._sellerSubregion;
|
||||
set sellerSubregion(String sellerSubregion) =>
|
||||
String? _sellerSubregion;
|
||||
String? get sellerSubregion => _$this._sellerSubregion;
|
||||
set sellerSubregion(String? sellerSubregion) =>
|
||||
_$this._sellerSubregion = sellerSubregion;
|
||||
|
||||
MapBuilder<String, TaxConfigRegionEntity> _regions;
|
||||
MapBuilder<String, TaxConfigRegionEntity>? _regions;
|
||||
MapBuilder<String, TaxConfigRegionEntity> get regions =>
|
||||
_$this._regions ??= new MapBuilder<String, TaxConfigRegionEntity>();
|
||||
set regions(MapBuilder<String, TaxConfigRegionEntity> regions) =>
|
||||
|
|
@ -669,7 +669,7 @@ class TaxConfigEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaxConfigEntityBuilder) updates) {
|
||||
void update(void Function(TaxConfigEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -687,7 +687,7 @@ class TaxConfigEntityBuilder
|
|||
sellerSubregion, r'TaxConfigEntity', 'sellerSubregion'),
|
||||
regions: regions.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'regions';
|
||||
regions.build();
|
||||
|
|
@ -713,14 +713,14 @@ class _$TaxConfigRegionEntity extends TaxConfigRegionEntity {
|
|||
final BuiltMap<String, TaxConfigSubregionEntity> subregions;
|
||||
|
||||
factory _$TaxConfigRegionEntity(
|
||||
[void Function(TaxConfigRegionEntityBuilder) updates]) =>
|
||||
[void Function(TaxConfigRegionEntityBuilder)? updates]) =>
|
||||
(new TaxConfigRegionEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TaxConfigRegionEntity._(
|
||||
{this.hasSalesAboveThreshold,
|
||||
this.taxAll,
|
||||
this.taxThreshold,
|
||||
this.subregions})
|
||||
{required this.hasSalesAboveThreshold,
|
||||
required this.taxAll,
|
||||
required this.taxThreshold,
|
||||
required this.subregions})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(hasSalesAboveThreshold,
|
||||
r'TaxConfigRegionEntity', 'hasSalesAboveThreshold');
|
||||
|
|
@ -751,10 +751,10 @@ class _$TaxConfigRegionEntity extends TaxConfigRegionEntity {
|
|||
subregions == other.subregions;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, hasSalesAboveThreshold.hashCode);
|
||||
_$hash = $jc(_$hash, taxAll.hashCode);
|
||||
|
|
@ -777,22 +777,22 @@ class _$TaxConfigRegionEntity extends TaxConfigRegionEntity {
|
|||
|
||||
class TaxConfigRegionEntityBuilder
|
||||
implements Builder<TaxConfigRegionEntity, TaxConfigRegionEntityBuilder> {
|
||||
_$TaxConfigRegionEntity _$v;
|
||||
_$TaxConfigRegionEntity? _$v;
|
||||
|
||||
bool _hasSalesAboveThreshold;
|
||||
bool get hasSalesAboveThreshold => _$this._hasSalesAboveThreshold;
|
||||
set hasSalesAboveThreshold(bool hasSalesAboveThreshold) =>
|
||||
bool? _hasSalesAboveThreshold;
|
||||
bool? get hasSalesAboveThreshold => _$this._hasSalesAboveThreshold;
|
||||
set hasSalesAboveThreshold(bool? hasSalesAboveThreshold) =>
|
||||
_$this._hasSalesAboveThreshold = hasSalesAboveThreshold;
|
||||
|
||||
bool _taxAll;
|
||||
bool get taxAll => _$this._taxAll;
|
||||
set taxAll(bool taxAll) => _$this._taxAll = taxAll;
|
||||
bool? _taxAll;
|
||||
bool? get taxAll => _$this._taxAll;
|
||||
set taxAll(bool? taxAll) => _$this._taxAll = taxAll;
|
||||
|
||||
double _taxThreshold;
|
||||
double get taxThreshold => _$this._taxThreshold;
|
||||
set taxThreshold(double taxThreshold) => _$this._taxThreshold = taxThreshold;
|
||||
double? _taxThreshold;
|
||||
double? get taxThreshold => _$this._taxThreshold;
|
||||
set taxThreshold(double? taxThreshold) => _$this._taxThreshold = taxThreshold;
|
||||
|
||||
MapBuilder<String, TaxConfigSubregionEntity> _subregions;
|
||||
MapBuilder<String, TaxConfigSubregionEntity>? _subregions;
|
||||
MapBuilder<String, TaxConfigSubregionEntity> get subregions =>
|
||||
_$this._subregions ??= new MapBuilder<String, TaxConfigSubregionEntity>();
|
||||
set subregions(MapBuilder<String, TaxConfigSubregionEntity> subregions) =>
|
||||
|
|
@ -821,7 +821,7 @@ class TaxConfigRegionEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaxConfigRegionEntityBuilder) updates) {
|
||||
void update(void Function(TaxConfigRegionEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -843,7 +843,7 @@ class TaxConfigRegionEntityBuilder
|
|||
taxThreshold, r'TaxConfigRegionEntity', 'taxThreshold'),
|
||||
subregions: subregions.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'subregions';
|
||||
subregions.build();
|
||||
|
|
@ -869,11 +869,11 @@ class _$TaxConfigSubregionEntity extends TaxConfigSubregionEntity {
|
|||
final double reducedTaxRate;
|
||||
|
||||
factory _$TaxConfigSubregionEntity(
|
||||
[void Function(TaxConfigSubregionEntityBuilder) updates]) =>
|
||||
[void Function(TaxConfigSubregionEntityBuilder)? updates]) =>
|
||||
(new TaxConfigSubregionEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TaxConfigSubregionEntity._(
|
||||
{this.applyTax, this.taxRate, this.taxName, this.reducedTaxRate})
|
||||
{required this.applyTax, required this.taxRate, required this.taxName, required this.reducedTaxRate})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
applyTax, r'TaxConfigSubregionEntity', 'applyTax');
|
||||
|
|
@ -904,10 +904,10 @@ class _$TaxConfigSubregionEntity extends TaxConfigSubregionEntity {
|
|||
reducedTaxRate == other.reducedTaxRate;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, applyTax.hashCode);
|
||||
_$hash = $jc(_$hash, taxRate.hashCode);
|
||||
|
|
@ -931,23 +931,23 @@ class _$TaxConfigSubregionEntity extends TaxConfigSubregionEntity {
|
|||
class TaxConfigSubregionEntityBuilder
|
||||
implements
|
||||
Builder<TaxConfigSubregionEntity, TaxConfigSubregionEntityBuilder> {
|
||||
_$TaxConfigSubregionEntity _$v;
|
||||
_$TaxConfigSubregionEntity? _$v;
|
||||
|
||||
bool _applyTax;
|
||||
bool get applyTax => _$this._applyTax;
|
||||
set applyTax(bool applyTax) => _$this._applyTax = applyTax;
|
||||
bool? _applyTax;
|
||||
bool? get applyTax => _$this._applyTax;
|
||||
set applyTax(bool? applyTax) => _$this._applyTax = applyTax;
|
||||
|
||||
double _taxRate;
|
||||
double get taxRate => _$this._taxRate;
|
||||
set taxRate(double taxRate) => _$this._taxRate = taxRate;
|
||||
double? _taxRate;
|
||||
double? get taxRate => _$this._taxRate;
|
||||
set taxRate(double? taxRate) => _$this._taxRate = taxRate;
|
||||
|
||||
String _taxName;
|
||||
String get taxName => _$this._taxName;
|
||||
set taxName(String taxName) => _$this._taxName = taxName;
|
||||
String? _taxName;
|
||||
String? get taxName => _$this._taxName;
|
||||
set taxName(String? taxName) => _$this._taxName = taxName;
|
||||
|
||||
double _reducedTaxRate;
|
||||
double get reducedTaxRate => _$this._reducedTaxRate;
|
||||
set reducedTaxRate(double reducedTaxRate) =>
|
||||
double? _reducedTaxRate;
|
||||
double? get reducedTaxRate => _$this._reducedTaxRate;
|
||||
set reducedTaxRate(double? reducedTaxRate) =>
|
||||
_$this._reducedTaxRate = reducedTaxRate;
|
||||
|
||||
TaxConfigSubregionEntityBuilder() {
|
||||
|
|
@ -973,7 +973,7 @@ class TaxConfigSubregionEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaxConfigSubregionEntityBuilder) updates) {
|
||||
void update(void Function(TaxConfigSubregionEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class TaxRateFields {
|
|||
abstract class TaxRateEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<TaxRateEntity, TaxRateEntityBuilder> {
|
||||
factory TaxRateEntity({String id, String name, double rate, AppState state}) {
|
||||
factory TaxRateEntity({String? id, String? name, double? rate, AppState? state}) {
|
||||
return _$TaxRateEntity._(
|
||||
id: BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -93,18 +93,18 @@ abstract class TaxRateEntity extends Object
|
|||
|
||||
bool get isEmpty => rate == 0 && name.isEmpty;
|
||||
|
||||
int compareTo(TaxRateEntity taxRate, String sortField, bool sortAscending) {
|
||||
int compareTo(TaxRateEntity? taxRate, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final TaxRateEntity taxRateA = sortAscending ? this : taxRate;
|
||||
final TaxRateEntity taxRateB = sortAscending ? taxRate : this;
|
||||
final TaxRateEntity? taxRateA = sortAscending ? this : taxRate;
|
||||
final TaxRateEntity? taxRateB = sortAscending ? taxRate : this;
|
||||
|
||||
switch (sortField) {
|
||||
case TaxRateFields.name:
|
||||
response =
|
||||
taxRateA.name.toLowerCase().compareTo(taxRateB.name.toLowerCase());
|
||||
taxRateA!.name.toLowerCase().compareTo(taxRateB!.name.toLowerCase());
|
||||
break;
|
||||
case TaxRateFields.rate:
|
||||
response = taxRateA.rate.compareTo(taxRateB.rate);
|
||||
response = taxRateA!.rate.compareTo(taxRateB!.rate);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by .$sortField is not implemented');
|
||||
|
|
@ -115,7 +115,7 @@ abstract class TaxRateEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [name],
|
||||
needle: filter,
|
||||
|
|
@ -123,7 +123,7 @@ abstract class TaxRateEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [name],
|
||||
needle: filter,
|
||||
|
|
@ -131,16 +131,16 @@ abstract class TaxRateEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
|
@ -153,10 +153,10 @@ abstract class TaxRateEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
static Serializer<TaxRateEntity> get serializer => _$taxRateEntitySerializer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$TaxRateListResponseSerializer
|
|||
final String wireName = 'TaxRateListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TaxRateListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -39,21 +39,21 @@ class _$TaxRateListResponseSerializer
|
|||
|
||||
@override
|
||||
TaxRateListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaxRateListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TaxRateEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(TaxRateEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$TaxRateItemResponseSerializer
|
|||
final String wireName = 'TaxRateItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TaxRateItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(TaxRateEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$TaxRateItemResponseSerializer
|
|||
|
||||
@override
|
||||
TaxRateItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaxRateItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(TaxRateEntity)) as TaxRateEntity);
|
||||
specifiedType: const FullType(TaxRateEntity))! as TaxRateEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,9 +115,9 @@ class _$TaxRateEntitySerializer implements StructuredSerializer<TaxRateEntity> {
|
|||
final String wireName = 'TaxRateEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TaxRateEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TaxRateEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'rate',
|
||||
|
|
@ -134,7 +134,7 @@ class _$TaxRateEntitySerializer implements StructuredSerializer<TaxRateEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -168,55 +168,55 @@ class _$TaxRateEntitySerializer implements StructuredSerializer<TaxRateEntity> {
|
|||
|
||||
@override
|
||||
TaxRateEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TaxRateEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'rate':
|
||||
result.rate = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -230,10 +230,10 @@ class _$TaxRateListResponse extends TaxRateListResponse {
|
|||
final BuiltList<TaxRateEntity> data;
|
||||
|
||||
factory _$TaxRateListResponse(
|
||||
[void Function(TaxRateListResponseBuilder) updates]) =>
|
||||
[void Function(TaxRateListResponseBuilder)? updates]) =>
|
||||
(new TaxRateListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TaxRateListResponse._({this.data}) : super._() {
|
||||
_$TaxRateListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'TaxRateListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -252,10 +252,10 @@ class _$TaxRateListResponse extends TaxRateListResponse {
|
|||
return other is TaxRateListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -272,12 +272,12 @@ class _$TaxRateListResponse extends TaxRateListResponse {
|
|||
|
||||
class TaxRateListResponseBuilder
|
||||
implements Builder<TaxRateListResponse, TaxRateListResponseBuilder> {
|
||||
_$TaxRateListResponse _$v;
|
||||
_$TaxRateListResponse? _$v;
|
||||
|
||||
ListBuilder<TaxRateEntity> _data;
|
||||
ListBuilder<TaxRateEntity>? _data;
|
||||
ListBuilder<TaxRateEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<TaxRateEntity>();
|
||||
set data(ListBuilder<TaxRateEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<TaxRateEntity>? data) => _$this._data = data;
|
||||
|
||||
TaxRateListResponseBuilder();
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ class TaxRateListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaxRateListResponseBuilder) updates) {
|
||||
void update(void Function(TaxRateListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ class TaxRateListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TaxRateListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -329,10 +329,10 @@ class _$TaxRateItemResponse extends TaxRateItemResponse {
|
|||
final TaxRateEntity data;
|
||||
|
||||
factory _$TaxRateItemResponse(
|
||||
[void Function(TaxRateItemResponseBuilder) updates]) =>
|
||||
[void Function(TaxRateItemResponseBuilder)? updates]) =>
|
||||
(new TaxRateItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TaxRateItemResponse._({this.data}) : super._() {
|
||||
_$TaxRateItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'TaxRateItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -351,10 +351,10 @@ class _$TaxRateItemResponse extends TaxRateItemResponse {
|
|||
return other is TaxRateItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -371,11 +371,11 @@ class _$TaxRateItemResponse extends TaxRateItemResponse {
|
|||
|
||||
class TaxRateItemResponseBuilder
|
||||
implements Builder<TaxRateItemResponse, TaxRateItemResponseBuilder> {
|
||||
_$TaxRateItemResponse _$v;
|
||||
_$TaxRateItemResponse? _$v;
|
||||
|
||||
TaxRateEntityBuilder _data;
|
||||
TaxRateEntityBuilder? _data;
|
||||
TaxRateEntityBuilder get data => _$this._data ??= new TaxRateEntityBuilder();
|
||||
set data(TaxRateEntityBuilder data) => _$this._data = data;
|
||||
set data(TaxRateEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
TaxRateItemResponseBuilder();
|
||||
|
||||
|
|
@ -395,7 +395,7 @@ class TaxRateItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaxRateItemResponseBuilder) updates) {
|
||||
void update(void Function(TaxRateItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ class TaxRateItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TaxRateItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -428,7 +428,7 @@ class _$TaxRateEntity extends TaxRateEntity {
|
|||
@override
|
||||
final double rate;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -436,28 +436,28 @@ class _$TaxRateEntity extends TaxRateEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$TaxRateEntity([void Function(TaxRateEntityBuilder) updates]) =>
|
||||
factory _$TaxRateEntity([void Function(TaxRateEntityBuilder)? updates]) =>
|
||||
(new TaxRateEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TaxRateEntity._(
|
||||
{this.name,
|
||||
this.rate,
|
||||
{required this.name,
|
||||
required this.rate,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(name, r'TaxRateEntity', 'name');
|
||||
BuiltValueNullFieldError.checkNotNull(rate, r'TaxRateEntity', 'rate');
|
||||
|
|
@ -493,10 +493,10 @@ class _$TaxRateEntity extends TaxRateEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, rate.hashCode);
|
||||
|
|
@ -531,49 +531,49 @@ class _$TaxRateEntity extends TaxRateEntity {
|
|||
|
||||
class TaxRateEntityBuilder
|
||||
implements Builder<TaxRateEntity, TaxRateEntityBuilder> {
|
||||
_$TaxRateEntity _$v;
|
||||
_$TaxRateEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
double _rate;
|
||||
double get rate => _$this._rate;
|
||||
set rate(double rate) => _$this._rate = rate;
|
||||
double? _rate;
|
||||
double? get rate => _$this._rate;
|
||||
set rate(double? rate) => _$this._rate = rate;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
TaxRateEntityBuilder();
|
||||
|
||||
|
|
@ -602,7 +602,7 @@ class TaxRateEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TaxRateEntityBuilder) updates) {
|
||||
void update(void Function(TaxRateEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class TokenFields {
|
|||
abstract class TokenEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<TokenEntity, TokenEntityBuilder> {
|
||||
factory TokenEntity({String id, AppState state}) {
|
||||
factory TokenEntity({String? id, AppState? state}) {
|
||||
return _$TokenEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -97,7 +97,7 @@ abstract class TokenEntity extends Object
|
|||
|
||||
static String obscureToken(String value) => base64Encode(utf8.encode(value));
|
||||
|
||||
static String unobscureToken(String value) {
|
||||
static String? unobscureToken(String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -110,15 +110,15 @@ abstract class TokenEntity extends Object
|
|||
return name;
|
||||
}
|
||||
|
||||
int compareTo(TokenEntity token, String sortField, bool sortAscending) {
|
||||
int compareTo(TokenEntity? token, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final TokenEntity tokenA = sortAscending ? this : token;
|
||||
final TokenEntity tokenB = sortAscending ? token : this;
|
||||
final TokenEntity? tokenA = sortAscending ? this : token;
|
||||
final TokenEntity? tokenB = sortAscending ? token : this;
|
||||
|
||||
switch (sortField) {
|
||||
case TokenFields.name:
|
||||
response =
|
||||
tokenA.name.toLowerCase().compareTo(tokenB.name.toLowerCase());
|
||||
tokenA!.name.toLowerCase().compareTo(tokenB!.name.toLowerCase());
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by token.$sortField is not implemented');
|
||||
|
|
@ -129,7 +129,7 @@ abstract class TokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -139,7 +139,7 @@ abstract class TokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [],
|
||||
needle: filter,
|
||||
|
|
@ -147,20 +147,20 @@ abstract class TokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isMasked && !multiselect) {
|
||||
actions.add(EntityAction.copy);
|
||||
}
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
|
@ -173,10 +173,10 @@ abstract class TokenEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
static Serializer<TokenEntity> get serializer => _$tokenEntitySerializer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ class _$TokenListResponseSerializer
|
|||
final String wireName = 'TokenListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TokenListResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TokenListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -34,21 +34,21 @@ class _$TokenListResponseSerializer
|
|||
|
||||
@override
|
||||
TokenListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TokenListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TokenEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(TokenEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -65,9 +65,9 @@ class _$TokenItemResponseSerializer
|
|||
final String wireName = 'TokenItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TokenItemResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TokenItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(TokenEntity)),
|
||||
|
|
@ -78,19 +78,19 @@ class _$TokenItemResponseSerializer
|
|||
|
||||
@override
|
||||
TokenItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TokenItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(TokenEntity)) as TokenEntity);
|
||||
specifiedType: const FullType(TokenEntity))! as TokenEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -106,9 +106,9 @@ class _$TokenEntitySerializer implements StructuredSerializer<TokenEntity> {
|
|||
final String wireName = 'TokenEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TokenEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TokenEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'is_system',
|
||||
serializers.serialize(object.isSystem,
|
||||
specifiedType: const FullType(bool)),
|
||||
|
|
@ -129,7 +129,7 @@ class _$TokenEntitySerializer implements StructuredSerializer<TokenEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -162,59 +162,59 @@ class _$TokenEntitySerializer implements StructuredSerializer<TokenEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
TokenEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
TokenEntity deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TokenEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'is_system':
|
||||
result.isSystem = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'token':
|
||||
result.token = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -228,10 +228,10 @@ class _$TokenListResponse extends TokenListResponse {
|
|||
final BuiltList<TokenEntity> data;
|
||||
|
||||
factory _$TokenListResponse(
|
||||
[void Function(TokenListResponseBuilder) updates]) =>
|
||||
[void Function(TokenListResponseBuilder)? updates]) =>
|
||||
(new TokenListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TokenListResponse._({this.data}) : super._() {
|
||||
_$TokenListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'TokenListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -249,10 +249,10 @@ class _$TokenListResponse extends TokenListResponse {
|
|||
return other is TokenListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -269,12 +269,12 @@ class _$TokenListResponse extends TokenListResponse {
|
|||
|
||||
class TokenListResponseBuilder
|
||||
implements Builder<TokenListResponse, TokenListResponseBuilder> {
|
||||
_$TokenListResponse _$v;
|
||||
_$TokenListResponse? _$v;
|
||||
|
||||
ListBuilder<TokenEntity> _data;
|
||||
ListBuilder<TokenEntity>? _data;
|
||||
ListBuilder<TokenEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<TokenEntity>();
|
||||
set data(ListBuilder<TokenEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<TokenEntity>? data) => _$this._data = data;
|
||||
|
||||
TokenListResponseBuilder();
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ class TokenListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TokenListResponseBuilder) updates) {
|
||||
void update(void Function(TokenListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -306,7 +306,7 @@ class TokenListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TokenListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -326,10 +326,10 @@ class _$TokenItemResponse extends TokenItemResponse {
|
|||
final TokenEntity data;
|
||||
|
||||
factory _$TokenItemResponse(
|
||||
[void Function(TokenItemResponseBuilder) updates]) =>
|
||||
[void Function(TokenItemResponseBuilder)? updates]) =>
|
||||
(new TokenItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TokenItemResponse._({this.data}) : super._() {
|
||||
_$TokenItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'TokenItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -347,10 +347,10 @@ class _$TokenItemResponse extends TokenItemResponse {
|
|||
return other is TokenItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -367,11 +367,11 @@ class _$TokenItemResponse extends TokenItemResponse {
|
|||
|
||||
class TokenItemResponseBuilder
|
||||
implements Builder<TokenItemResponse, TokenItemResponseBuilder> {
|
||||
_$TokenItemResponse _$v;
|
||||
_$TokenItemResponse? _$v;
|
||||
|
||||
TokenEntityBuilder _data;
|
||||
TokenEntityBuilder? _data;
|
||||
TokenEntityBuilder get data => _$this._data ??= new TokenEntityBuilder();
|
||||
set data(TokenEntityBuilder data) => _$this._data = data;
|
||||
set data(TokenEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
TokenItemResponseBuilder();
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ class TokenItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TokenItemResponseBuilder) updates) {
|
||||
void update(void Function(TokenItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ class TokenItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TokenItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -426,7 +426,7 @@ class _$TokenEntity extends TokenEntity {
|
|||
@override
|
||||
final String name;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -434,29 +434,29 @@ class _$TokenEntity extends TokenEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$TokenEntity([void Function(TokenEntityBuilder) updates]) =>
|
||||
factory _$TokenEntity([void Function(TokenEntityBuilder)? updates]) =>
|
||||
(new TokenEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TokenEntity._(
|
||||
{this.isSystem,
|
||||
this.token,
|
||||
this.name,
|
||||
{required this.isSystem,
|
||||
required this.token,
|
||||
required this.name,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(isSystem, r'TokenEntity', 'isSystem');
|
||||
BuiltValueNullFieldError.checkNotNull(token, r'TokenEntity', 'token');
|
||||
|
|
@ -494,10 +494,10 @@ class _$TokenEntity extends TokenEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, isSystem.hashCode);
|
||||
_$hash = $jc(_$hash, token.hashCode);
|
||||
|
|
@ -533,53 +533,53 @@ class _$TokenEntity extends TokenEntity {
|
|||
}
|
||||
|
||||
class TokenEntityBuilder implements Builder<TokenEntity, TokenEntityBuilder> {
|
||||
_$TokenEntity _$v;
|
||||
_$TokenEntity? _$v;
|
||||
|
||||
bool _isSystem;
|
||||
bool get isSystem => _$this._isSystem;
|
||||
set isSystem(bool isSystem) => _$this._isSystem = isSystem;
|
||||
bool? _isSystem;
|
||||
bool? get isSystem => _$this._isSystem;
|
||||
set isSystem(bool? isSystem) => _$this._isSystem = isSystem;
|
||||
|
||||
String _token;
|
||||
String get token => _$this._token;
|
||||
set token(String token) => _$this._token = token;
|
||||
String? _token;
|
||||
String? get token => _$this._token;
|
||||
set token(String? token) => _$this._token = token;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
TokenEntityBuilder();
|
||||
|
||||
|
|
@ -609,7 +609,7 @@ class TokenEntityBuilder implements Builder<TokenEntity, TokenEntityBuilder> {
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TokenEntityBuilder) updates) {
|
||||
void update(void Function(TokenEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,15 +71,15 @@ class TransactionFields {
|
|||
abstract class TransactionEntity extends Object
|
||||
with BaseEntity
|
||||
implements Built<TransactionEntity, TransactionEntityBuilder> {
|
||||
factory TransactionEntity({String id, AppState state}) {
|
||||
factory TransactionEntity({String? id, AppState? state}) {
|
||||
String bankAccountId = '';
|
||||
if (state != null) {
|
||||
final bankAccounts = state.bankAccountState.list
|
||||
.map((bankAccountId) => state.bankAccountState.map[bankAccountId])
|
||||
.where((bankAccount) => !bankAccount.isDeleted)
|
||||
.where((bankAccount) => !bankAccount!.isDeleted!)
|
||||
.toList();
|
||||
if (bankAccounts.length == 1) {
|
||||
bankAccountId = bankAccounts.first.id;
|
||||
bankAccountId = bankAccounts.first!.id;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -161,17 +161,14 @@ abstract class TransactionEntity extends Object
|
|||
@BuiltValueField(wireName: 'bank_transaction_rule_id')
|
||||
String get transactionRuleId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(serialize: false)
|
||||
String get pendingVendorId;
|
||||
String? get pendingVendorId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(serialize: false)
|
||||
String get pendingCategoryId;
|
||||
String? get pendingCategoryId;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(serialize: false)
|
||||
String get pendingExpenseId;
|
||||
String? get pendingExpenseId;
|
||||
|
||||
@override
|
||||
EntityType get entityType => EntityType.transaction;
|
||||
|
|
@ -189,14 +186,14 @@ abstract class TransactionEntity extends Object
|
|||
bool get isConverted => statusId == kTransactionStatusConverted;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && userCompany!.canEditEntity(this)) {
|
||||
if (!multiselect && includeEdit) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
|
@ -218,14 +215,14 @@ abstract class TransactionEntity extends Object
|
|||
}
|
||||
|
||||
int compareTo(
|
||||
TransactionEntity transaction,
|
||||
TransactionEntity? transaction,
|
||||
String sortField,
|
||||
bool sortAscending,
|
||||
BuiltMap<String, VendorEntity> vendorMap,
|
||||
BuiltMap<String, InvoiceEntity> invoiceMap,
|
||||
BuiltMap<String, ExpenseEntity> expenseMap,
|
||||
BuiltMap<String, ExpenseCategoryEntity> expenseCategoryMap,
|
||||
BuiltMap<String, BankAccountEntity> bankAccountMap,
|
||||
BuiltMap<String?, VendorEntity?> vendorMap,
|
||||
BuiltMap<String?, InvoiceEntity?> invoiceMap,
|
||||
BuiltMap<String?, ExpenseEntity?> expenseMap,
|
||||
BuiltMap<String?, ExpenseCategoryEntity?> expenseCategoryMap,
|
||||
BuiltMap<String?, BankAccountEntity?> bankAccountMap,
|
||||
) {
|
||||
int response = 0;
|
||||
final transactionA = sortAscending ? this : transaction;
|
||||
|
|
@ -233,60 +230,60 @@ abstract class TransactionEntity extends Object
|
|||
|
||||
switch (sortField) {
|
||||
case TransactionFields.description:
|
||||
response = transactionA.description
|
||||
response = transactionA!.description
|
||||
.toLowerCase()
|
||||
.compareTo(transactionB.description.toLowerCase());
|
||||
.compareTo(transactionB!.description.toLowerCase());
|
||||
break;
|
||||
case TransactionFields.deposit:
|
||||
case TransactionFields.withdrawal:
|
||||
case TransactionFields.amount:
|
||||
response = transactionA.amount.compareTo(transactionB.amount);
|
||||
response = transactionA!.amount.compareTo(transactionB!.amount);
|
||||
break;
|
||||
case TransactionFields.status:
|
||||
response = transactionA.statusId.compareTo(transactionB.statusId);
|
||||
response = transactionA!.statusId.compareTo(transactionB!.statusId);
|
||||
break;
|
||||
case TransactionFields.date:
|
||||
response = transactionA.date.compareTo(transactionB.date);
|
||||
response = transactionA!.date.compareTo(transactionB!.date);
|
||||
break;
|
||||
case TransactionFields.defaultCategory:
|
||||
response = transactionA.category
|
||||
response = transactionA!.category
|
||||
.toLowerCase()
|
||||
.compareTo(transactionB.category.toLowerCase());
|
||||
.compareTo(transactionB!.category.toLowerCase());
|
||||
break;
|
||||
case TransactionFields.accountType:
|
||||
final bankAccountA =
|
||||
bankAccountMap[transactionA.bankAccountId] ?? BankAccountEntity();
|
||||
bankAccountMap[transactionA!.bankAccountId] ?? BankAccountEntity();
|
||||
final bankAccountB =
|
||||
bankAccountMap[transactionB.bankAccountId] ?? BankAccountEntity();
|
||||
bankAccountMap[transactionB!.bankAccountId] ?? BankAccountEntity();
|
||||
response = bankAccountA.type.compareTo(bankAccountB.type);
|
||||
break;
|
||||
case TransactionFields.invoices:
|
||||
final invoiceA =
|
||||
invoiceMap[transactionA.firstInvoiceId] ?? InvoiceEntity();
|
||||
invoiceMap[transactionA!.firstInvoiceId] ?? InvoiceEntity();
|
||||
final invoiceB =
|
||||
invoiceMap[transactionB.firstInvoiceId] ?? InvoiceEntity();
|
||||
invoiceMap[transactionB!.firstInvoiceId] ?? InvoiceEntity();
|
||||
response = invoiceA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(invoiceB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case TransactionFields.expense:
|
||||
final expenseA = expenseMap[transactionA.expenseId] ?? ExpenseEntity();
|
||||
final expenseB = expenseMap[transactionB.expenseId] ?? ExpenseEntity();
|
||||
final expenseA = expenseMap[transactionA!.expenseId] ?? ExpenseEntity();
|
||||
final expenseB = expenseMap[transactionB!.expenseId] ?? ExpenseEntity();
|
||||
response = expenseA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(expenseB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case TransactionFields.vendor:
|
||||
final vendorA = vendorMap[transactionA.vendorId] ?? VendorEntity();
|
||||
final vendorB = vendorMap[transactionB.vendorId] ?? VendorEntity();
|
||||
final vendorA = vendorMap[transactionA!.vendorId] ?? VendorEntity();
|
||||
final vendorB = vendorMap[transactionB!.vendorId] ?? VendorEntity();
|
||||
response = vendorA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(vendorB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case TransactionFields.category:
|
||||
final categoryA = expenseCategoryMap[transactionA.categoryId] ??
|
||||
final categoryA = expenseCategoryMap[transactionA!.categoryId] ??
|
||||
ExpenseCategoryEntity();
|
||||
final categoryB = expenseCategoryMap[transactionB.categoryId] ??
|
||||
final categoryB = expenseCategoryMap[transactionB!.categoryId] ??
|
||||
ExpenseCategoryEntity();
|
||||
response = categoryA.listDisplayName
|
||||
.toLowerCase()
|
||||
|
|
@ -294,9 +291,9 @@ abstract class TransactionEntity extends Object
|
|||
break;
|
||||
case TransactionFields.bankAccount:
|
||||
final bankAccountA =
|
||||
bankAccountMap[transactionA.bankAccountId] ?? BankAccountEntity();
|
||||
bankAccountMap[transactionA!.bankAccountId] ?? BankAccountEntity();
|
||||
final bankAccountB =
|
||||
bankAccountMap[transactionB.bankAccountId] ?? BankAccountEntity();
|
||||
bankAccountMap[transactionB!.bankAccountId] ?? BankAccountEntity();
|
||||
response = bankAccountA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(bankAccountB.listDisplayName.toLowerCase());
|
||||
|
|
@ -308,7 +305,7 @@ abstract class TransactionEntity extends Object
|
|||
|
||||
if (response == 0) {
|
||||
// STARTER: sort default - do not remove comment
|
||||
return transactionA.transactionId.compareTo(transactionB.transactionId);
|
||||
return transactionA!.transactionId.compareTo(transactionB!.transactionId);
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
|
|
@ -336,7 +333,7 @@ abstract class TransactionEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
category,
|
||||
|
|
@ -347,7 +344,7 @@ abstract class TransactionEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
category,
|
||||
|
|
@ -357,7 +354,7 @@ abstract class TransactionEntity extends Object
|
|||
);
|
||||
}
|
||||
|
||||
String get firstInvoiceId {
|
||||
String? get firstInvoiceId {
|
||||
if (invoiceIds.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -366,11 +363,11 @@ abstract class TransactionEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String get listDisplayName {
|
||||
String? get listDisplayName {
|
||||
if (description.isNotEmpty) {
|
||||
return description.split('\n').first;
|
||||
} else {
|
||||
return AppLocalization.of(navigatorKey.currentContext).transaction;
|
||||
return AppLocalization.of(navigatorKey.currentContext!)!.transaction;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ class _$TransactionListResponseSerializer
|
|||
final String wireName = 'TransactionListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TransactionListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -41,21 +41,21 @@ class _$TransactionListResponseSerializer
|
|||
|
||||
@override
|
||||
TransactionListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TransactionEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(TransactionEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,10 +75,10 @@ class _$TransactionItemResponseSerializer
|
|||
final String wireName = 'TransactionItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TransactionItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(TransactionEntity)),
|
||||
|
|
@ -89,19 +89,19 @@ class _$TransactionItemResponseSerializer
|
|||
|
||||
@override
|
||||
TransactionItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(TransactionEntity))
|
||||
specifiedType: const FullType(TransactionEntity))!
|
||||
as TransactionEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -119,9 +119,9 @@ class _$TransactionEntitySerializer
|
|||
final String wireName = 'TransactionEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, TransactionEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, TransactionEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'amount',
|
||||
serializers.serialize(object.amount,
|
||||
specifiedType: const FullType(double)),
|
||||
|
|
@ -178,7 +178,7 @@ class _$TransactionEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -212,107 +212,107 @@ class _$TransactionEntitySerializer
|
|||
|
||||
@override
|
||||
TransactionEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'amount':
|
||||
result.amount = serializers.deserialize(value,
|
||||
specifiedType: const FullType(double)) as double;
|
||||
specifiedType: const FullType(double))! as double;
|
||||
break;
|
||||
case 'currency_id':
|
||||
result.currencyId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'category_type':
|
||||
result.category = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'base_type':
|
||||
result.baseType = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'date':
|
||||
result.date = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'bank_integration_id':
|
||||
result.bankAccountId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'description':
|
||||
result.description = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'status_id':
|
||||
result.statusId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'ninja_category_id':
|
||||
result.categoryId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'invoice_ids':
|
||||
result.invoiceIds = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'payment_id':
|
||||
result.paymentId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'expense_id':
|
||||
result.expenseId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'vendor_id':
|
||||
result.vendorId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'transaction_id':
|
||||
result.transactionId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'bank_transaction_rule_id':
|
||||
result.transactionRuleId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -332,10 +332,10 @@ class _$TransactionStatusEntitySerializer
|
|||
final String wireName = 'TransactionStatusEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TransactionStatusEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
'name',
|
||||
|
|
@ -347,23 +347,23 @@ class _$TransactionStatusEntitySerializer
|
|||
|
||||
@override
|
||||
TransactionStatusEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionStatusEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -377,10 +377,10 @@ class _$TransactionListResponse extends TransactionListResponse {
|
|||
final BuiltList<TransactionEntity> data;
|
||||
|
||||
factory _$TransactionListResponse(
|
||||
[void Function(TransactionListResponseBuilder) updates]) =>
|
||||
[void Function(TransactionListResponseBuilder)? updates]) =>
|
||||
(new TransactionListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionListResponse._({this.data}) : super._() {
|
||||
_$TransactionListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TransactionListResponse', 'data');
|
||||
}
|
||||
|
|
@ -400,10 +400,10 @@ class _$TransactionListResponse extends TransactionListResponse {
|
|||
return other is TransactionListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -421,12 +421,12 @@ class _$TransactionListResponse extends TransactionListResponse {
|
|||
class TransactionListResponseBuilder
|
||||
implements
|
||||
Builder<TransactionListResponse, TransactionListResponseBuilder> {
|
||||
_$TransactionListResponse _$v;
|
||||
_$TransactionListResponse? _$v;
|
||||
|
||||
ListBuilder<TransactionEntity> _data;
|
||||
ListBuilder<TransactionEntity>? _data;
|
||||
ListBuilder<TransactionEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<TransactionEntity>();
|
||||
set data(ListBuilder<TransactionEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<TransactionEntity>? data) => _$this._data = data;
|
||||
|
||||
TransactionListResponseBuilder();
|
||||
|
||||
|
|
@ -446,7 +446,7 @@ class TransactionListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionListResponseBuilder) updates) {
|
||||
void update(void Function(TransactionListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ class TransactionListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TransactionListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -478,10 +478,10 @@ class _$TransactionItemResponse extends TransactionItemResponse {
|
|||
final TransactionEntity data;
|
||||
|
||||
factory _$TransactionItemResponse(
|
||||
[void Function(TransactionItemResponseBuilder) updates]) =>
|
||||
[void Function(TransactionItemResponseBuilder)? updates]) =>
|
||||
(new TransactionItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionItemResponse._({this.data}) : super._() {
|
||||
_$TransactionItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TransactionItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -501,10 +501,10 @@ class _$TransactionItemResponse extends TransactionItemResponse {
|
|||
return other is TransactionItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -522,12 +522,12 @@ class _$TransactionItemResponse extends TransactionItemResponse {
|
|||
class TransactionItemResponseBuilder
|
||||
implements
|
||||
Builder<TransactionItemResponse, TransactionItemResponseBuilder> {
|
||||
_$TransactionItemResponse _$v;
|
||||
_$TransactionItemResponse? _$v;
|
||||
|
||||
TransactionEntityBuilder _data;
|
||||
TransactionEntityBuilder? _data;
|
||||
TransactionEntityBuilder get data =>
|
||||
_$this._data ??= new TransactionEntityBuilder();
|
||||
set data(TransactionEntityBuilder data) => _$this._data = data;
|
||||
set data(TransactionEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
TransactionItemResponseBuilder();
|
||||
|
||||
|
|
@ -547,7 +547,7 @@ class TransactionItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionItemResponseBuilder) updates) {
|
||||
void update(void Function(TransactionItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -559,7 +559,7 @@ class TransactionItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TransactionItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -606,13 +606,13 @@ class _$TransactionEntity extends TransactionEntity {
|
|||
@override
|
||||
final String transactionRuleId;
|
||||
@override
|
||||
final String pendingVendorId;
|
||||
final String? pendingVendorId;
|
||||
@override
|
||||
final String pendingCategoryId;
|
||||
final String? pendingCategoryId;
|
||||
@override
|
||||
final String pendingExpenseId;
|
||||
final String? pendingExpenseId;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -620,45 +620,45 @@ class _$TransactionEntity extends TransactionEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$TransactionEntity(
|
||||
[void Function(TransactionEntityBuilder) updates]) =>
|
||||
[void Function(TransactionEntityBuilder)? updates]) =>
|
||||
(new TransactionEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionEntity._(
|
||||
{this.amount,
|
||||
this.currencyId,
|
||||
this.category,
|
||||
this.baseType,
|
||||
this.date,
|
||||
this.bankAccountId,
|
||||
this.description,
|
||||
this.statusId,
|
||||
this.categoryId,
|
||||
this.invoiceIds,
|
||||
this.paymentId,
|
||||
this.expenseId,
|
||||
this.vendorId,
|
||||
this.transactionId,
|
||||
this.transactionRuleId,
|
||||
{required this.amount,
|
||||
required this.currencyId,
|
||||
required this.category,
|
||||
required this.baseType,
|
||||
required this.date,
|
||||
required this.bankAccountId,
|
||||
required this.description,
|
||||
required this.statusId,
|
||||
required this.categoryId,
|
||||
required this.invoiceIds,
|
||||
required this.paymentId,
|
||||
required this.expenseId,
|
||||
required this.vendorId,
|
||||
required this.transactionId,
|
||||
required this.transactionRuleId,
|
||||
this.pendingVendorId,
|
||||
this.pendingCategoryId,
|
||||
this.pendingExpenseId,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
amount, r'TransactionEntity', 'amount');
|
||||
|
|
@ -738,10 +738,10 @@ class _$TransactionEntity extends TransactionEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, amount.hashCode);
|
||||
_$hash = $jc(_$hash, currencyId.hashCode);
|
||||
|
|
@ -808,118 +808,119 @@ class _$TransactionEntity extends TransactionEntity {
|
|||
|
||||
class TransactionEntityBuilder
|
||||
implements Builder<TransactionEntity, TransactionEntityBuilder> {
|
||||
_$TransactionEntity _$v;
|
||||
_$TransactionEntity? _$v;
|
||||
|
||||
double _amount;
|
||||
double get amount => _$this._amount;
|
||||
set amount(double amount) => _$this._amount = amount;
|
||||
double? _amount;
|
||||
double? get amount => _$this._amount;
|
||||
set amount(double? amount) => _$this._amount = amount;
|
||||
|
||||
String _currencyId;
|
||||
String get currencyId => _$this._currencyId;
|
||||
set currencyId(String currencyId) => _$this._currencyId = currencyId;
|
||||
String? _currencyId;
|
||||
String? get currencyId => _$this._currencyId;
|
||||
set currencyId(String? currencyId) => _$this._currencyId = currencyId;
|
||||
|
||||
String _category;
|
||||
String get category => _$this._category;
|
||||
set category(String category) => _$this._category = category;
|
||||
String? _category;
|
||||
String? get category => _$this._category;
|
||||
set category(String? category) => _$this._category = category;
|
||||
|
||||
String _baseType;
|
||||
String get baseType => _$this._baseType;
|
||||
set baseType(String baseType) => _$this._baseType = baseType;
|
||||
String? _baseType;
|
||||
String? get baseType => _$this._baseType;
|
||||
set baseType(String? baseType) => _$this._baseType = baseType;
|
||||
|
||||
String _date;
|
||||
String get date => _$this._date;
|
||||
set date(String date) => _$this._date = date;
|
||||
String? _date;
|
||||
String? get date => _$this._date;
|
||||
set date(String? date) => _$this._date = date;
|
||||
|
||||
String _bankAccountId;
|
||||
String get bankAccountId => _$this._bankAccountId;
|
||||
set bankAccountId(String bankAccountId) =>
|
||||
String? _bankAccountId;
|
||||
String? get bankAccountId => _$this._bankAccountId;
|
||||
set bankAccountId(String? bankAccountId) =>
|
||||
_$this._bankAccountId = bankAccountId;
|
||||
|
||||
String _description;
|
||||
String get description => _$this._description;
|
||||
set description(String description) => _$this._description = description;
|
||||
String? _description;
|
||||
String? get description => _$this._description;
|
||||
set description(String? description) => _$this._description = description;
|
||||
|
||||
String _statusId;
|
||||
String get statusId => _$this._statusId;
|
||||
set statusId(String statusId) => _$this._statusId = statusId;
|
||||
String? _statusId;
|
||||
String? get statusId => _$this._statusId;
|
||||
set statusId(String? statusId) => _$this._statusId = statusId;
|
||||
|
||||
String _categoryId;
|
||||
String get categoryId => _$this._categoryId;
|
||||
set categoryId(String categoryId) => _$this._categoryId = categoryId;
|
||||
String? _categoryId;
|
||||
String? get categoryId => _$this._categoryId;
|
||||
set categoryId(String? categoryId) => _$this._categoryId = categoryId;
|
||||
|
||||
String _invoiceIds;
|
||||
String get invoiceIds => _$this._invoiceIds;
|
||||
set invoiceIds(String invoiceIds) => _$this._invoiceIds = invoiceIds;
|
||||
String? _invoiceIds;
|
||||
String? get invoiceIds => _$this._invoiceIds;
|
||||
set invoiceIds(String? invoiceIds) => _$this._invoiceIds = invoiceIds;
|
||||
|
||||
String _paymentId;
|
||||
String get paymentId => _$this._paymentId;
|
||||
set paymentId(String paymentId) => _$this._paymentId = paymentId;
|
||||
String? _paymentId;
|
||||
String? get paymentId => _$this._paymentId;
|
||||
set paymentId(String? paymentId) => _$this._paymentId = paymentId;
|
||||
|
||||
String _expenseId;
|
||||
String get expenseId => _$this._expenseId;
|
||||
set expenseId(String expenseId) => _$this._expenseId = expenseId;
|
||||
String? _expenseId;
|
||||
String? get expenseId => _$this._expenseId;
|
||||
set expenseId(String? expenseId) => _$this._expenseId = expenseId;
|
||||
|
||||
String _vendorId;
|
||||
String get vendorId => _$this._vendorId;
|
||||
set vendorId(String vendorId) => _$this._vendorId = vendorId;
|
||||
String? _vendorId;
|
||||
String? get vendorId => _$this._vendorId;
|
||||
set vendorId(String? vendorId) => _$this._vendorId = vendorId;
|
||||
|
||||
int _transactionId;
|
||||
int get transactionId => _$this._transactionId;
|
||||
set transactionId(int transactionId) => _$this._transactionId = transactionId;
|
||||
int? _transactionId;
|
||||
int? get transactionId => _$this._transactionId;
|
||||
set transactionId(int? transactionId) =>
|
||||
_$this._transactionId = transactionId;
|
||||
|
||||
String _transactionRuleId;
|
||||
String get transactionRuleId => _$this._transactionRuleId;
|
||||
set transactionRuleId(String transactionRuleId) =>
|
||||
String? _transactionRuleId;
|
||||
String? get transactionRuleId => _$this._transactionRuleId;
|
||||
set transactionRuleId(String? transactionRuleId) =>
|
||||
_$this._transactionRuleId = transactionRuleId;
|
||||
|
||||
String _pendingVendorId;
|
||||
String get pendingVendorId => _$this._pendingVendorId;
|
||||
set pendingVendorId(String pendingVendorId) =>
|
||||
String? _pendingVendorId;
|
||||
String? get pendingVendorId => _$this._pendingVendorId;
|
||||
set pendingVendorId(String? pendingVendorId) =>
|
||||
_$this._pendingVendorId = pendingVendorId;
|
||||
|
||||
String _pendingCategoryId;
|
||||
String get pendingCategoryId => _$this._pendingCategoryId;
|
||||
set pendingCategoryId(String pendingCategoryId) =>
|
||||
String? _pendingCategoryId;
|
||||
String? get pendingCategoryId => _$this._pendingCategoryId;
|
||||
set pendingCategoryId(String? pendingCategoryId) =>
|
||||
_$this._pendingCategoryId = pendingCategoryId;
|
||||
|
||||
String _pendingExpenseId;
|
||||
String get pendingExpenseId => _$this._pendingExpenseId;
|
||||
set pendingExpenseId(String pendingExpenseId) =>
|
||||
String? _pendingExpenseId;
|
||||
String? get pendingExpenseId => _$this._pendingExpenseId;
|
||||
set pendingExpenseId(String? pendingExpenseId) =>
|
||||
_$this._pendingExpenseId = pendingExpenseId;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
TransactionEntityBuilder() {
|
||||
TransactionEntity._initializeBuilder(this);
|
||||
|
|
@ -966,7 +967,7 @@ class TransactionEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionEntityBuilder) updates) {
|
||||
void update(void Function(TransactionEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1023,10 +1024,11 @@ class _$TransactionStatusEntity extends TransactionStatusEntity {
|
|||
final String name;
|
||||
|
||||
factory _$TransactionStatusEntity(
|
||||
[void Function(TransactionStatusEntityBuilder) updates]) =>
|
||||
[void Function(TransactionStatusEntityBuilder)? updates]) =>
|
||||
(new TransactionStatusEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionStatusEntity._({this.id, this.name}) : super._() {
|
||||
_$TransactionStatusEntity._({required this.id, required this.name})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(id, r'TransactionStatusEntity', 'id');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
name, r'TransactionStatusEntity', 'name');
|
||||
|
|
@ -1049,10 +1051,10 @@ class _$TransactionStatusEntity extends TransactionStatusEntity {
|
|||
name == other.name;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
|
|
@ -1072,15 +1074,15 @@ class _$TransactionStatusEntity extends TransactionStatusEntity {
|
|||
class TransactionStatusEntityBuilder
|
||||
implements
|
||||
Builder<TransactionStatusEntity, TransactionStatusEntityBuilder> {
|
||||
_$TransactionStatusEntity _$v;
|
||||
_$TransactionStatusEntity? _$v;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
TransactionStatusEntityBuilder();
|
||||
|
||||
|
|
@ -1101,7 +1103,7 @@ class TransactionStatusEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionStatusEntityBuilder) updates) {
|
||||
void update(void Function(TransactionStatusEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class TransactionRuleFields {
|
|||
abstract class TransactionRuleEntity extends Object
|
||||
with BaseEntity
|
||||
implements Built<TransactionRuleEntity, TransactionRuleEntityBuilder> {
|
||||
factory TransactionRuleEntity({String id, AppState state}) {
|
||||
factory TransactionRuleEntity({String? id, AppState? state}) {
|
||||
return _$TransactionRuleEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -96,23 +96,23 @@ abstract class TransactionRuleEntity extends Object
|
|||
@BuiltValueField(wireName: 'category_id')
|
||||
String get categoryId;
|
||||
|
||||
BuiltList<TransactionRuleCriteriaEntity> get rules;
|
||||
BuiltList<TransactionRuleCriteriaEntity?> get rules;
|
||||
|
||||
@override
|
||||
EntityType get entityType => EntityType.transactionRule;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted &&
|
||||
if (!isDeleted! &&
|
||||
!multiselect &&
|
||||
includeEdit &&
|
||||
userCompany.canEditEntity(this)) {
|
||||
userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ abstract class TransactionRuleEntity extends Object
|
|||
return actions..addAll(super.getActions(userCompany: userCompany));
|
||||
}
|
||||
|
||||
int compareTo(TransactionRuleEntity transactionRule, String sortField,
|
||||
int compareTo(TransactionRuleEntity? transactionRule, String sortField,
|
||||
bool sortAscending) {
|
||||
int response = 0;
|
||||
final transactionRuleA = sortAscending ? this : transactionRule;
|
||||
|
|
@ -132,9 +132,9 @@ abstract class TransactionRuleEntity extends Object
|
|||
switch (sortField) {
|
||||
// STARTER: sort switch - do not remove comment
|
||||
case TransactionRuleFields.name:
|
||||
response = transactionRuleA.name
|
||||
response = transactionRuleA!.name
|
||||
.toLowerCase()
|
||||
.compareTo(transactionRuleB.name.toLowerCase());
|
||||
.compareTo(transactionRuleB!.name.toLowerCase());
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -145,14 +145,14 @@ abstract class TransactionRuleEntity extends Object
|
|||
|
||||
if (response == 0) {
|
||||
// STARTER: sort default - do not remove comment
|
||||
return transactionRuleA.name.compareTo(transactionRuleB.name);
|
||||
return transactionRuleA!.name.compareTo(transactionRuleB!.name);
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
name,
|
||||
|
|
@ -162,7 +162,7 @@ abstract class TransactionRuleEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
//
|
||||
|
|
@ -175,10 +175,10 @@ abstract class TransactionRuleEntity extends Object
|
|||
String get listDisplayName => name;
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
static Serializer<TransactionRuleEntity> get serializer =>
|
||||
_$transactionRuleEntitySerializer;
|
||||
|
|
@ -189,7 +189,7 @@ abstract class TransactionRuleCriteriaEntity
|
|||
Built<TransactionRuleCriteriaEntity,
|
||||
TransactionRuleCriteriaEntityBuilder> {
|
||||
factory TransactionRuleCriteriaEntity(
|
||||
{String searchKey, String operator, String value}) {
|
||||
{String? searchKey, String? operator, String? value}) {
|
||||
return _$TransactionRuleCriteriaEntity._(
|
||||
searchKey: searchKey ?? SEARCH_KEY_DESCRIPTION,
|
||||
operator: operator ?? STRING_OPERATOR_CONTAINS,
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ class _$TransactionRuleListResponseSerializer
|
|||
final String wireName = 'TransactionRuleListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TransactionRuleListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(
|
||||
|
|
@ -44,21 +44,21 @@ class _$TransactionRuleListResponseSerializer
|
|||
|
||||
@override
|
||||
TransactionRuleListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionRuleListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(TransactionRuleEntity)]))
|
||||
as BuiltList<Object>);
|
||||
specifiedType: const FullType(BuiltList, const [
|
||||
const FullType(TransactionRuleEntity)
|
||||
]))! as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -78,10 +78,10 @@ class _$TransactionRuleItemResponseSerializer
|
|||
final String wireName = 'TransactionRuleItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TransactionRuleItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(TransactionRuleEntity)),
|
||||
|
|
@ -92,19 +92,19 @@ class _$TransactionRuleItemResponseSerializer
|
|||
|
||||
@override
|
||||
TransactionRuleItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionRuleItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(TransactionRuleEntity))
|
||||
specifiedType: const FullType(TransactionRuleEntity))!
|
||||
as TransactionRuleEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -125,10 +125,10 @@ class _$TransactionRuleEntitySerializer
|
|||
final String wireName = 'TransactionRuleEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TransactionRuleEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'name',
|
||||
serializers.serialize(object.name, specifiedType: const FullType(String)),
|
||||
'matches_on_all',
|
||||
|
|
@ -149,7 +149,7 @@ class _$TransactionRuleEntitySerializer
|
|||
'rules',
|
||||
serializers.serialize(object.rules,
|
||||
specifiedType: const FullType(BuiltList,
|
||||
const [const FullType(TransactionRuleCriteriaEntity)])),
|
||||
const [const FullType.nullable(TransactionRuleCriteriaEntity)])),
|
||||
'created_at',
|
||||
serializers.serialize(object.createdAt,
|
||||
specifiedType: const FullType(int)),
|
||||
|
|
@ -162,7 +162,7 @@ class _$TransactionRuleEntitySerializer
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -196,77 +196,77 @@ class _$TransactionRuleEntitySerializer
|
|||
|
||||
@override
|
||||
TransactionRuleEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionRuleEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'name':
|
||||
result.name = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'matches_on_all':
|
||||
result.matchesOnAll = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'auto_convert':
|
||||
result.autoConvert = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'applies_to':
|
||||
result.appliesTo = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'vendor_id':
|
||||
result.vendorId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'category_id':
|
||||
result.categoryId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'rules':
|
||||
result.rules.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltList, const [
|
||||
const FullType(TransactionRuleCriteriaEntity)
|
||||
])) as BuiltList<Object>);
|
||||
const FullType.nullable(TransactionRuleCriteriaEntity)
|
||||
]))! as BuiltList<Object?>);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -286,10 +286,10 @@ class _$TransactionRuleCriteriaEntitySerializer
|
|||
final String wireName = 'TransactionRuleCriteriaEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, TransactionRuleCriteriaEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'search_key',
|
||||
serializers.serialize(object.searchKey,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -306,27 +306,27 @@ class _$TransactionRuleCriteriaEntitySerializer
|
|||
|
||||
@override
|
||||
TransactionRuleCriteriaEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new TransactionRuleCriteriaEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'search_key':
|
||||
result.searchKey = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'operator':
|
||||
result.operator = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'value':
|
||||
result.value = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -340,10 +340,10 @@ class _$TransactionRuleListResponse extends TransactionRuleListResponse {
|
|||
final BuiltList<TransactionRuleEntity> data;
|
||||
|
||||
factory _$TransactionRuleListResponse(
|
||||
[void Function(TransactionRuleListResponseBuilder) updates]) =>
|
||||
[void Function(TransactionRuleListResponseBuilder)? updates]) =>
|
||||
(new TransactionRuleListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionRuleListResponse._({this.data}) : super._() {
|
||||
_$TransactionRuleListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TransactionRuleListResponse', 'data');
|
||||
}
|
||||
|
|
@ -363,10 +363,10 @@ class _$TransactionRuleListResponse extends TransactionRuleListResponse {
|
|||
return other is TransactionRuleListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -385,12 +385,12 @@ class TransactionRuleListResponseBuilder
|
|||
implements
|
||||
Builder<TransactionRuleListResponse,
|
||||
TransactionRuleListResponseBuilder> {
|
||||
_$TransactionRuleListResponse _$v;
|
||||
_$TransactionRuleListResponse? _$v;
|
||||
|
||||
ListBuilder<TransactionRuleEntity> _data;
|
||||
ListBuilder<TransactionRuleEntity>? _data;
|
||||
ListBuilder<TransactionRuleEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<TransactionRuleEntity>();
|
||||
set data(ListBuilder<TransactionRuleEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<TransactionRuleEntity>? data) => _$this._data = data;
|
||||
|
||||
TransactionRuleListResponseBuilder();
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ class TransactionRuleListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionRuleListResponseBuilder) updates) {
|
||||
void update(void Function(TransactionRuleListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ class TransactionRuleListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TransactionRuleListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -442,10 +442,10 @@ class _$TransactionRuleItemResponse extends TransactionRuleItemResponse {
|
|||
final TransactionRuleEntity data;
|
||||
|
||||
factory _$TransactionRuleItemResponse(
|
||||
[void Function(TransactionRuleItemResponseBuilder) updates]) =>
|
||||
[void Function(TransactionRuleItemResponseBuilder)? updates]) =>
|
||||
(new TransactionRuleItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionRuleItemResponse._({this.data}) : super._() {
|
||||
_$TransactionRuleItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'TransactionRuleItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -465,10 +465,10 @@ class _$TransactionRuleItemResponse extends TransactionRuleItemResponse {
|
|||
return other is TransactionRuleItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -487,12 +487,12 @@ class TransactionRuleItemResponseBuilder
|
|||
implements
|
||||
Builder<TransactionRuleItemResponse,
|
||||
TransactionRuleItemResponseBuilder> {
|
||||
_$TransactionRuleItemResponse _$v;
|
||||
_$TransactionRuleItemResponse? _$v;
|
||||
|
||||
TransactionRuleEntityBuilder _data;
|
||||
TransactionRuleEntityBuilder? _data;
|
||||
TransactionRuleEntityBuilder get data =>
|
||||
_$this._data ??= new TransactionRuleEntityBuilder();
|
||||
set data(TransactionRuleEntityBuilder data) => _$this._data = data;
|
||||
set data(TransactionRuleEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
TransactionRuleItemResponseBuilder();
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ class TransactionRuleItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionRuleItemResponseBuilder) updates) {
|
||||
void update(void Function(TransactionRuleItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -524,7 +524,7 @@ class TransactionRuleItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$TransactionRuleItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -553,9 +553,9 @@ class _$TransactionRuleEntity extends TransactionRuleEntity {
|
|||
@override
|
||||
final String categoryId;
|
||||
@override
|
||||
final BuiltList<TransactionRuleCriteriaEntity> rules;
|
||||
final BuiltList<TransactionRuleCriteriaEntity?> rules;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -563,34 +563,34 @@ class _$TransactionRuleEntity extends TransactionRuleEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$TransactionRuleEntity(
|
||||
[void Function(TransactionRuleEntityBuilder) updates]) =>
|
||||
[void Function(TransactionRuleEntityBuilder)? updates]) =>
|
||||
(new TransactionRuleEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionRuleEntity._(
|
||||
{this.name,
|
||||
this.matchesOnAll,
|
||||
this.autoConvert,
|
||||
this.appliesTo,
|
||||
this.vendorId,
|
||||
this.categoryId,
|
||||
this.rules,
|
||||
{required this.name,
|
||||
required this.matchesOnAll,
|
||||
required this.autoConvert,
|
||||
required this.appliesTo,
|
||||
required this.vendorId,
|
||||
required this.categoryId,
|
||||
required this.rules,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
name, r'TransactionRuleEntity', 'name');
|
||||
|
|
@ -645,10 +645,10 @@ class _$TransactionRuleEntity extends TransactionRuleEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, name.hashCode);
|
||||
_$hash = $jc(_$hash, matchesOnAll.hashCode);
|
||||
|
|
@ -693,71 +693,71 @@ class _$TransactionRuleEntity extends TransactionRuleEntity {
|
|||
|
||||
class TransactionRuleEntityBuilder
|
||||
implements Builder<TransactionRuleEntity, TransactionRuleEntityBuilder> {
|
||||
_$TransactionRuleEntity _$v;
|
||||
_$TransactionRuleEntity? _$v;
|
||||
|
||||
String _name;
|
||||
String get name => _$this._name;
|
||||
set name(String name) => _$this._name = name;
|
||||
String? _name;
|
||||
String? get name => _$this._name;
|
||||
set name(String? name) => _$this._name = name;
|
||||
|
||||
bool _matchesOnAll;
|
||||
bool get matchesOnAll => _$this._matchesOnAll;
|
||||
set matchesOnAll(bool matchesOnAll) => _$this._matchesOnAll = matchesOnAll;
|
||||
bool? _matchesOnAll;
|
||||
bool? get matchesOnAll => _$this._matchesOnAll;
|
||||
set matchesOnAll(bool? matchesOnAll) => _$this._matchesOnAll = matchesOnAll;
|
||||
|
||||
bool _autoConvert;
|
||||
bool get autoConvert => _$this._autoConvert;
|
||||
set autoConvert(bool autoConvert) => _$this._autoConvert = autoConvert;
|
||||
bool? _autoConvert;
|
||||
bool? get autoConvert => _$this._autoConvert;
|
||||
set autoConvert(bool? autoConvert) => _$this._autoConvert = autoConvert;
|
||||
|
||||
String _appliesTo;
|
||||
String get appliesTo => _$this._appliesTo;
|
||||
set appliesTo(String appliesTo) => _$this._appliesTo = appliesTo;
|
||||
String? _appliesTo;
|
||||
String? get appliesTo => _$this._appliesTo;
|
||||
set appliesTo(String? appliesTo) => _$this._appliesTo = appliesTo;
|
||||
|
||||
String _vendorId;
|
||||
String get vendorId => _$this._vendorId;
|
||||
set vendorId(String vendorId) => _$this._vendorId = vendorId;
|
||||
String? _vendorId;
|
||||
String? get vendorId => _$this._vendorId;
|
||||
set vendorId(String? vendorId) => _$this._vendorId = vendorId;
|
||||
|
||||
String _categoryId;
|
||||
String get categoryId => _$this._categoryId;
|
||||
set categoryId(String categoryId) => _$this._categoryId = categoryId;
|
||||
String? _categoryId;
|
||||
String? get categoryId => _$this._categoryId;
|
||||
set categoryId(String? categoryId) => _$this._categoryId = categoryId;
|
||||
|
||||
ListBuilder<TransactionRuleCriteriaEntity> _rules;
|
||||
ListBuilder<TransactionRuleCriteriaEntity> get rules =>
|
||||
_$this._rules ??= new ListBuilder<TransactionRuleCriteriaEntity>();
|
||||
set rules(ListBuilder<TransactionRuleCriteriaEntity> rules) =>
|
||||
ListBuilder<TransactionRuleCriteriaEntity?>? _rules;
|
||||
ListBuilder<TransactionRuleCriteriaEntity?> get rules =>
|
||||
_$this._rules ??= new ListBuilder<TransactionRuleCriteriaEntity?>();
|
||||
set rules(ListBuilder<TransactionRuleCriteriaEntity?>? rules) =>
|
||||
_$this._rules = rules;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
TransactionRuleEntityBuilder();
|
||||
|
||||
|
|
@ -791,7 +791,7 @@ class TransactionRuleEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionRuleEntityBuilder) updates) {
|
||||
void update(void Function(TransactionRuleEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -827,7 +827,7 @@ class TransactionRuleEntityBuilder
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'TransactionRuleEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'rules';
|
||||
rules.build();
|
||||
|
|
@ -851,10 +851,11 @@ class _$TransactionRuleCriteriaEntity extends TransactionRuleCriteriaEntity {
|
|||
final String value;
|
||||
|
||||
factory _$TransactionRuleCriteriaEntity(
|
||||
[void Function(TransactionRuleCriteriaEntityBuilder) updates]) =>
|
||||
[void Function(TransactionRuleCriteriaEntityBuilder)? updates]) =>
|
||||
(new TransactionRuleCriteriaEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$TransactionRuleCriteriaEntity._({this.searchKey, this.operator, this.value})
|
||||
_$TransactionRuleCriteriaEntity._(
|
||||
{required this.searchKey, required this.operator, required this.value})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
searchKey, r'TransactionRuleCriteriaEntity', 'searchKey');
|
||||
|
|
@ -882,10 +883,10 @@ class _$TransactionRuleCriteriaEntity extends TransactionRuleCriteriaEntity {
|
|||
value == other.value;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, searchKey.hashCode);
|
||||
_$hash = $jc(_$hash, operator.hashCode);
|
||||
|
|
@ -908,19 +909,19 @@ class TransactionRuleCriteriaEntityBuilder
|
|||
implements
|
||||
Builder<TransactionRuleCriteriaEntity,
|
||||
TransactionRuleCriteriaEntityBuilder> {
|
||||
_$TransactionRuleCriteriaEntity _$v;
|
||||
_$TransactionRuleCriteriaEntity? _$v;
|
||||
|
||||
String _searchKey;
|
||||
String get searchKey => _$this._searchKey;
|
||||
set searchKey(String searchKey) => _$this._searchKey = searchKey;
|
||||
String? _searchKey;
|
||||
String? get searchKey => _$this._searchKey;
|
||||
set searchKey(String? searchKey) => _$this._searchKey = searchKey;
|
||||
|
||||
String _operator;
|
||||
String get operator => _$this._operator;
|
||||
set operator(String operator) => _$this._operator = operator;
|
||||
String? _operator;
|
||||
String? get operator => _$this._operator;
|
||||
set operator(String? operator) => _$this._operator = operator;
|
||||
|
||||
String _value;
|
||||
String get value => _$this._value;
|
||||
set value(String value) => _$this._value = value;
|
||||
String? _value;
|
||||
String? get value => _$this._value;
|
||||
set value(String? value) => _$this._value = value;
|
||||
|
||||
TransactionRuleCriteriaEntityBuilder() {
|
||||
TransactionRuleCriteriaEntity._initializeBuilder(this);
|
||||
|
|
@ -944,7 +945,7 @@ class TransactionRuleCriteriaEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(TransactionRuleCriteriaEntityBuilder) updates) {
|
||||
void update(void Function(TransactionRuleCriteriaEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ abstract class UserEntity extends Object
|
|||
with BaseEntity, SelectableEntity
|
||||
implements Built<UserEntity, UserEntityBuilder> {
|
||||
factory UserEntity(
|
||||
{String id, AppState state, UserCompanyEntity userCompany}) {
|
||||
{String? id, AppState? state, UserCompanyEntity? userCompany}) {
|
||||
return _$UserEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -171,9 +171,8 @@ abstract class UserEntity extends Object
|
|||
|
||||
String get password;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'email_verified_at')
|
||||
int get emailVerifiedAt;
|
||||
int? get emailVerifiedAt;
|
||||
|
||||
@BuiltValueField(wireName: 'verified_phone_number')
|
||||
bool get phoneVerified;
|
||||
|
|
@ -202,9 +201,8 @@ abstract class UserEntity extends Object
|
|||
@BuiltValueField(wireName: 'oauth_user_token')
|
||||
String get oauthUserToken;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'company_user')
|
||||
UserCompanyEntity get userCompany;
|
||||
UserCompanyEntity? get userCompany;
|
||||
|
||||
@BuiltValueField(wireName: 'oauth_provider_id')
|
||||
String get oauthProvider;
|
||||
|
|
@ -219,24 +217,24 @@ abstract class UserEntity extends Object
|
|||
return fullName.isNotEmpty ? fullName : email;
|
||||
}
|
||||
|
||||
int compareTo(UserEntity user, String sortField, bool sortAscending) {
|
||||
int compareTo(UserEntity? user, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final UserEntity userA = sortAscending ? this : user;
|
||||
final UserEntity userB = sortAscending ? user : this;
|
||||
final UserEntity? userA = sortAscending ? this : user;
|
||||
final UserEntity? userB = sortAscending ? user : this;
|
||||
|
||||
switch (sortField) {
|
||||
case UserFields.lastName:
|
||||
response = userA.lastName
|
||||
response = userA!.lastName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.lastName.toLowerCase());
|
||||
.compareTo(userB!.lastName.toLowerCase());
|
||||
break;
|
||||
case UserFields.firstName:
|
||||
response = userA.firstName
|
||||
response = userA!.firstName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.firstName.toLowerCase());
|
||||
.compareTo(userB!.firstName.toLowerCase());
|
||||
break;
|
||||
case UserFields.email:
|
||||
response = userA.email.compareTo(userB.email);
|
||||
response = userA!.email.compareTo(userB!.email);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by user.$sortField is not implemented');
|
||||
|
|
@ -247,7 +245,7 @@ abstract class UserEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
firstName,
|
||||
|
|
@ -264,7 +262,7 @@ abstract class UserEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
firstName,
|
||||
|
|
@ -281,22 +279,22 @@ abstract class UserEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
||||
if (userCompany.isAdmin || userCompany.isOwner) {
|
||||
if (!isDeleted && !isEmailVerified) {
|
||||
if (userCompany!.isAdmin || userCompany.isOwner) {
|
||||
if (!isDeleted! && !isEmailVerified) {
|
||||
actions.add(EntityAction.resendInvite);
|
||||
}
|
||||
|
||||
|
|
@ -311,10 +309,10 @@ abstract class UserEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
bool get isConnectedToOAuth => isConnectedToGoogle || isConnectedToMicrosoft;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ class _$UserListResponseSerializer
|
|||
final String wireName = 'UserListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, UserListResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, UserListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -40,21 +40,21 @@ class _$UserListResponseSerializer
|
|||
|
||||
@override
|
||||
UserListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new UserListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(UserEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(UserEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -71,9 +71,9 @@ class _$UserItemResponseSerializer
|
|||
final String wireName = 'UserItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, UserItemResponse object,
|
||||
Iterable<Object?> serialize(Serializers serializers, UserItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(UserEntity)),
|
||||
|
|
@ -84,19 +84,19 @@ class _$UserItemResponseSerializer
|
|||
|
||||
@override
|
||||
UserItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new UserItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(UserEntity)) as UserEntity);
|
||||
specifiedType: const FullType(UserEntity))! as UserEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,10 +116,10 @@ class _$UserTwoFactorResponseSerializer
|
|||
final String wireName = 'UserTwoFactorResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, UserTwoFactorResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(UserTwoFactorData)),
|
||||
|
|
@ -130,19 +130,19 @@ class _$UserTwoFactorResponseSerializer
|
|||
|
||||
@override
|
||||
UserTwoFactorResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new UserTwoFactorResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(UserTwoFactorData))
|
||||
specifiedType: const FullType(UserTwoFactorData))!
|
||||
as UserTwoFactorData);
|
||||
break;
|
||||
}
|
||||
|
|
@ -160,9 +160,9 @@ class _$UserTwoFactorDataSerializer
|
|||
final String wireName = 'UserTwoFactorData';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, UserTwoFactorData object,
|
||||
Iterable<Object?> serialize(Serializers serializers, UserTwoFactorData object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'secret',
|
||||
serializers.serialize(object.secret,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -176,23 +176,23 @@ class _$UserTwoFactorDataSerializer
|
|||
|
||||
@override
|
||||
UserTwoFactorData deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new UserTwoFactorDataBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'secret':
|
||||
result.secret = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'qrCode':
|
||||
result.qrCode = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -212,10 +212,10 @@ class _$UserCompanyItemResponseSerializer
|
|||
final String wireName = 'UserCompanyItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, UserCompanyItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(UserCompanyEntity)),
|
||||
|
|
@ -226,19 +226,19 @@ class _$UserCompanyItemResponseSerializer
|
|||
|
||||
@override
|
||||
UserCompanyItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new UserCompanyItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(UserCompanyEntity))
|
||||
specifiedType: const FullType(UserCompanyEntity))!
|
||||
as UserCompanyEntity);
|
||||
break;
|
||||
}
|
||||
|
|
@ -255,9 +255,9 @@ class _$UserEntitySerializer implements StructuredSerializer<UserEntity> {
|
|||
final String wireName = 'UserEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, UserEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, UserEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'first_name',
|
||||
serializers.serialize(object.firstName,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -315,7 +315,7 @@ class _$UserEntitySerializer implements StructuredSerializer<UserEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.emailVerifiedAt;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -361,116 +361,116 @@ class _$UserEntitySerializer implements StructuredSerializer<UserEntity> {
|
|||
}
|
||||
|
||||
@override
|
||||
UserEntity deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||
UserEntity deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new UserEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'first_name':
|
||||
result.firstName = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'last_name':
|
||||
result.lastName = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'email':
|
||||
result.email = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'phone':
|
||||
result.phone = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'password':
|
||||
result.password = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'email_verified_at':
|
||||
result.emailVerifiedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int)) as int?;
|
||||
break;
|
||||
case 'verified_phone_number':
|
||||
result.phoneVerified = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'custom_value1':
|
||||
result.customValue1 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value2':
|
||||
result.customValue2 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value3':
|
||||
result.customValue3 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'custom_value4':
|
||||
result.customValue4 = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'google_2fa_secret':
|
||||
result.isTwoFactorEnabled = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'has_password':
|
||||
result.hasPassword = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool))! as bool;
|
||||
break;
|
||||
case 'last_confirmed_email_address':
|
||||
result.lastEmailAddress = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'oauth_user_token':
|
||||
result.oauthUserToken = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'company_user':
|
||||
result.userCompany.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(UserCompanyEntity))
|
||||
specifiedType: const FullType(UserCompanyEntity))!
|
||||
as UserCompanyEntity);
|
||||
break;
|
||||
case 'oauth_provider_id':
|
||||
result.oauthProvider = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -484,10 +484,10 @@ class _$UserListResponse extends UserListResponse {
|
|||
final BuiltList<UserEntity> data;
|
||||
|
||||
factory _$UserListResponse(
|
||||
[void Function(UserListResponseBuilder) updates]) =>
|
||||
[void Function(UserListResponseBuilder)? updates]) =>
|
||||
(new UserListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$UserListResponse._({this.data}) : super._() {
|
||||
_$UserListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'UserListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -505,10 +505,10 @@ class _$UserListResponse extends UserListResponse {
|
|||
return other is UserListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -524,12 +524,12 @@ class _$UserListResponse extends UserListResponse {
|
|||
|
||||
class UserListResponseBuilder
|
||||
implements Builder<UserListResponse, UserListResponseBuilder> {
|
||||
_$UserListResponse _$v;
|
||||
_$UserListResponse? _$v;
|
||||
|
||||
ListBuilder<UserEntity> _data;
|
||||
ListBuilder<UserEntity>? _data;
|
||||
ListBuilder<UserEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<UserEntity>();
|
||||
set data(ListBuilder<UserEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<UserEntity>? data) => _$this._data = data;
|
||||
|
||||
UserListResponseBuilder();
|
||||
|
||||
|
|
@ -549,7 +549,7 @@ class UserListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(UserListResponseBuilder) updates) {
|
||||
void update(void Function(UserListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -561,7 +561,7 @@ class UserListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$UserListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -581,10 +581,10 @@ class _$UserItemResponse extends UserItemResponse {
|
|||
final UserEntity data;
|
||||
|
||||
factory _$UserItemResponse(
|
||||
[void Function(UserItemResponseBuilder) updates]) =>
|
||||
[void Function(UserItemResponseBuilder)? updates]) =>
|
||||
(new UserItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$UserItemResponse._({this.data}) : super._() {
|
||||
_$UserItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'UserItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -602,10 +602,10 @@ class _$UserItemResponse extends UserItemResponse {
|
|||
return other is UserItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -621,11 +621,11 @@ class _$UserItemResponse extends UserItemResponse {
|
|||
|
||||
class UserItemResponseBuilder
|
||||
implements Builder<UserItemResponse, UserItemResponseBuilder> {
|
||||
_$UserItemResponse _$v;
|
||||
_$UserItemResponse? _$v;
|
||||
|
||||
UserEntityBuilder _data;
|
||||
UserEntityBuilder? _data;
|
||||
UserEntityBuilder get data => _$this._data ??= new UserEntityBuilder();
|
||||
set data(UserEntityBuilder data) => _$this._data = data;
|
||||
set data(UserEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
UserItemResponseBuilder();
|
||||
|
||||
|
|
@ -645,7 +645,7 @@ class UserItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(UserItemResponseBuilder) updates) {
|
||||
void update(void Function(UserItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -657,7 +657,7 @@ class UserItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$UserItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -677,10 +677,10 @@ class _$UserTwoFactorResponse extends UserTwoFactorResponse {
|
|||
final UserTwoFactorData data;
|
||||
|
||||
factory _$UserTwoFactorResponse(
|
||||
[void Function(UserTwoFactorResponseBuilder) updates]) =>
|
||||
[void Function(UserTwoFactorResponseBuilder)? updates]) =>
|
||||
(new UserTwoFactorResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$UserTwoFactorResponse._({this.data}) : super._() {
|
||||
_$UserTwoFactorResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'UserTwoFactorResponse', 'data');
|
||||
}
|
||||
|
|
@ -700,10 +700,10 @@ class _$UserTwoFactorResponse extends UserTwoFactorResponse {
|
|||
return other is UserTwoFactorResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -720,12 +720,12 @@ class _$UserTwoFactorResponse extends UserTwoFactorResponse {
|
|||
|
||||
class UserTwoFactorResponseBuilder
|
||||
implements Builder<UserTwoFactorResponse, UserTwoFactorResponseBuilder> {
|
||||
_$UserTwoFactorResponse _$v;
|
||||
_$UserTwoFactorResponse? _$v;
|
||||
|
||||
UserTwoFactorDataBuilder _data;
|
||||
UserTwoFactorDataBuilder? _data;
|
||||
UserTwoFactorDataBuilder get data =>
|
||||
_$this._data ??= new UserTwoFactorDataBuilder();
|
||||
set data(UserTwoFactorDataBuilder data) => _$this._data = data;
|
||||
set data(UserTwoFactorDataBuilder? data) => _$this._data = data;
|
||||
|
||||
UserTwoFactorResponseBuilder();
|
||||
|
||||
|
|
@ -745,7 +745,7 @@ class UserTwoFactorResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(UserTwoFactorResponseBuilder) updates) {
|
||||
void update(void Function(UserTwoFactorResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -757,7 +757,7 @@ class UserTwoFactorResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$UserTwoFactorResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -779,10 +779,11 @@ class _$UserTwoFactorData extends UserTwoFactorData {
|
|||
final String qrCode;
|
||||
|
||||
factory _$UserTwoFactorData(
|
||||
[void Function(UserTwoFactorDataBuilder) updates]) =>
|
||||
[void Function(UserTwoFactorDataBuilder)? updates]) =>
|
||||
(new UserTwoFactorDataBuilder()..update(updates))._build();
|
||||
|
||||
_$UserTwoFactorData._({this.secret, this.qrCode}) : super._() {
|
||||
_$UserTwoFactorData._({required this.secret, required this.qrCode})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
secret, r'UserTwoFactorData', 'secret');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -805,10 +806,10 @@ class _$UserTwoFactorData extends UserTwoFactorData {
|
|||
qrCode == other.qrCode;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, secret.hashCode);
|
||||
_$hash = $jc(_$hash, qrCode.hashCode);
|
||||
|
|
@ -827,15 +828,15 @@ class _$UserTwoFactorData extends UserTwoFactorData {
|
|||
|
||||
class UserTwoFactorDataBuilder
|
||||
implements Builder<UserTwoFactorData, UserTwoFactorDataBuilder> {
|
||||
_$UserTwoFactorData _$v;
|
||||
_$UserTwoFactorData? _$v;
|
||||
|
||||
String _secret;
|
||||
String get secret => _$this._secret;
|
||||
set secret(String secret) => _$this._secret = secret;
|
||||
String? _secret;
|
||||
String? get secret => _$this._secret;
|
||||
set secret(String? secret) => _$this._secret = secret;
|
||||
|
||||
String _qrCode;
|
||||
String get qrCode => _$this._qrCode;
|
||||
set qrCode(String qrCode) => _$this._qrCode = qrCode;
|
||||
String? _qrCode;
|
||||
String? get qrCode => _$this._qrCode;
|
||||
set qrCode(String? qrCode) => _$this._qrCode = qrCode;
|
||||
|
||||
UserTwoFactorDataBuilder();
|
||||
|
||||
|
|
@ -856,7 +857,7 @@ class UserTwoFactorDataBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(UserTwoFactorDataBuilder) updates) {
|
||||
void update(void Function(UserTwoFactorDataBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -880,10 +881,10 @@ class _$UserCompanyItemResponse extends UserCompanyItemResponse {
|
|||
final UserCompanyEntity data;
|
||||
|
||||
factory _$UserCompanyItemResponse(
|
||||
[void Function(UserCompanyItemResponseBuilder) updates]) =>
|
||||
[void Function(UserCompanyItemResponseBuilder)? updates]) =>
|
||||
(new UserCompanyItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$UserCompanyItemResponse._({this.data}) : super._() {
|
||||
_$UserCompanyItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
data, r'UserCompanyItemResponse', 'data');
|
||||
}
|
||||
|
|
@ -903,10 +904,10 @@ class _$UserCompanyItemResponse extends UserCompanyItemResponse {
|
|||
return other is UserCompanyItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -924,12 +925,12 @@ class _$UserCompanyItemResponse extends UserCompanyItemResponse {
|
|||
class UserCompanyItemResponseBuilder
|
||||
implements
|
||||
Builder<UserCompanyItemResponse, UserCompanyItemResponseBuilder> {
|
||||
_$UserCompanyItemResponse _$v;
|
||||
_$UserCompanyItemResponse? _$v;
|
||||
|
||||
UserCompanyEntityBuilder _data;
|
||||
UserCompanyEntityBuilder? _data;
|
||||
UserCompanyEntityBuilder get data =>
|
||||
_$this._data ??= new UserCompanyEntityBuilder();
|
||||
set data(UserCompanyEntityBuilder data) => _$this._data = data;
|
||||
set data(UserCompanyEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
UserCompanyItemResponseBuilder();
|
||||
|
||||
|
|
@ -949,7 +950,7 @@ class UserCompanyItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(UserCompanyItemResponseBuilder) updates) {
|
||||
void update(void Function(UserCompanyItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -961,7 +962,7 @@ class UserCompanyItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$UserCompanyItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -988,7 +989,7 @@ class _$UserEntity extends UserEntity {
|
|||
@override
|
||||
final String password;
|
||||
@override
|
||||
final int emailVerifiedAt;
|
||||
final int? emailVerifiedAt;
|
||||
@override
|
||||
final bool phoneVerified;
|
||||
@override
|
||||
|
|
@ -1008,11 +1009,11 @@ class _$UserEntity extends UserEntity {
|
|||
@override
|
||||
final String oauthUserToken;
|
||||
@override
|
||||
final UserCompanyEntity userCompany;
|
||||
final UserCompanyEntity? userCompany;
|
||||
@override
|
||||
final String oauthProvider;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -1020,43 +1021,43 @@ class _$UserEntity extends UserEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$UserEntity([void Function(UserEntityBuilder) updates]) =>
|
||||
factory _$UserEntity([void Function(UserEntityBuilder)? updates]) =>
|
||||
(new UserEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$UserEntity._(
|
||||
{this.firstName,
|
||||
this.lastName,
|
||||
this.email,
|
||||
this.phone,
|
||||
this.password,
|
||||
{required this.firstName,
|
||||
required this.lastName,
|
||||
required this.email,
|
||||
required this.phone,
|
||||
required this.password,
|
||||
this.emailVerifiedAt,
|
||||
this.phoneVerified,
|
||||
this.customValue1,
|
||||
this.customValue2,
|
||||
this.customValue3,
|
||||
this.customValue4,
|
||||
this.isTwoFactorEnabled,
|
||||
this.hasPassword,
|
||||
this.lastEmailAddress,
|
||||
this.oauthUserToken,
|
||||
required this.phoneVerified,
|
||||
required this.customValue1,
|
||||
required this.customValue2,
|
||||
required this.customValue3,
|
||||
required this.customValue4,
|
||||
required this.isTwoFactorEnabled,
|
||||
required this.hasPassword,
|
||||
required this.lastEmailAddress,
|
||||
required this.oauthUserToken,
|
||||
this.userCompany,
|
||||
this.oauthProvider,
|
||||
required this.oauthProvider,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
firstName, r'UserEntity', 'firstName');
|
||||
|
|
@ -1131,10 +1132,10 @@ class _$UserEntity extends UserEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, firstName.hashCode);
|
||||
_$hash = $jc(_$hash, lastName.hashCode);
|
||||
|
|
@ -1198,117 +1199,117 @@ class _$UserEntity extends UserEntity {
|
|||
}
|
||||
|
||||
class UserEntityBuilder implements Builder<UserEntity, UserEntityBuilder> {
|
||||
_$UserEntity _$v;
|
||||
_$UserEntity? _$v;
|
||||
|
||||
String _firstName;
|
||||
String get firstName => _$this._firstName;
|
||||
set firstName(String firstName) => _$this._firstName = firstName;
|
||||
String? _firstName;
|
||||
String? get firstName => _$this._firstName;
|
||||
set firstName(String? firstName) => _$this._firstName = firstName;
|
||||
|
||||
String _lastName;
|
||||
String get lastName => _$this._lastName;
|
||||
set lastName(String lastName) => _$this._lastName = lastName;
|
||||
String? _lastName;
|
||||
String? get lastName => _$this._lastName;
|
||||
set lastName(String? lastName) => _$this._lastName = lastName;
|
||||
|
||||
String _email;
|
||||
String get email => _$this._email;
|
||||
set email(String email) => _$this._email = email;
|
||||
String? _email;
|
||||
String? get email => _$this._email;
|
||||
set email(String? email) => _$this._email = email;
|
||||
|
||||
String _phone;
|
||||
String get phone => _$this._phone;
|
||||
set phone(String phone) => _$this._phone = phone;
|
||||
String? _phone;
|
||||
String? get phone => _$this._phone;
|
||||
set phone(String? phone) => _$this._phone = phone;
|
||||
|
||||
String _password;
|
||||
String get password => _$this._password;
|
||||
set password(String password) => _$this._password = password;
|
||||
String? _password;
|
||||
String? get password => _$this._password;
|
||||
set password(String? password) => _$this._password = password;
|
||||
|
||||
int _emailVerifiedAt;
|
||||
int get emailVerifiedAt => _$this._emailVerifiedAt;
|
||||
set emailVerifiedAt(int emailVerifiedAt) =>
|
||||
int? _emailVerifiedAt;
|
||||
int? get emailVerifiedAt => _$this._emailVerifiedAt;
|
||||
set emailVerifiedAt(int? emailVerifiedAt) =>
|
||||
_$this._emailVerifiedAt = emailVerifiedAt;
|
||||
|
||||
bool _phoneVerified;
|
||||
bool get phoneVerified => _$this._phoneVerified;
|
||||
set phoneVerified(bool phoneVerified) =>
|
||||
bool? _phoneVerified;
|
||||
bool? get phoneVerified => _$this._phoneVerified;
|
||||
set phoneVerified(bool? phoneVerified) =>
|
||||
_$this._phoneVerified = phoneVerified;
|
||||
|
||||
String _customValue1;
|
||||
String get customValue1 => _$this._customValue1;
|
||||
set customValue1(String customValue1) => _$this._customValue1 = customValue1;
|
||||
String? _customValue1;
|
||||
String? get customValue1 => _$this._customValue1;
|
||||
set customValue1(String? customValue1) => _$this._customValue1 = customValue1;
|
||||
|
||||
String _customValue2;
|
||||
String get customValue2 => _$this._customValue2;
|
||||
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
|
||||
String? _customValue2;
|
||||
String? get customValue2 => _$this._customValue2;
|
||||
set customValue2(String? customValue2) => _$this._customValue2 = customValue2;
|
||||
|
||||
String _customValue3;
|
||||
String get customValue3 => _$this._customValue3;
|
||||
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
|
||||
String? _customValue3;
|
||||
String? get customValue3 => _$this._customValue3;
|
||||
set customValue3(String? customValue3) => _$this._customValue3 = customValue3;
|
||||
|
||||
String _customValue4;
|
||||
String get customValue4 => _$this._customValue4;
|
||||
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
|
||||
String? _customValue4;
|
||||
String? get customValue4 => _$this._customValue4;
|
||||
set customValue4(String? customValue4) => _$this._customValue4 = customValue4;
|
||||
|
||||
bool _isTwoFactorEnabled;
|
||||
bool get isTwoFactorEnabled => _$this._isTwoFactorEnabled;
|
||||
set isTwoFactorEnabled(bool isTwoFactorEnabled) =>
|
||||
bool? _isTwoFactorEnabled;
|
||||
bool? get isTwoFactorEnabled => _$this._isTwoFactorEnabled;
|
||||
set isTwoFactorEnabled(bool? isTwoFactorEnabled) =>
|
||||
_$this._isTwoFactorEnabled = isTwoFactorEnabled;
|
||||
|
||||
bool _hasPassword;
|
||||
bool get hasPassword => _$this._hasPassword;
|
||||
set hasPassword(bool hasPassword) => _$this._hasPassword = hasPassword;
|
||||
bool? _hasPassword;
|
||||
bool? get hasPassword => _$this._hasPassword;
|
||||
set hasPassword(bool? hasPassword) => _$this._hasPassword = hasPassword;
|
||||
|
||||
String _lastEmailAddress;
|
||||
String get lastEmailAddress => _$this._lastEmailAddress;
|
||||
set lastEmailAddress(String lastEmailAddress) =>
|
||||
String? _lastEmailAddress;
|
||||
String? get lastEmailAddress => _$this._lastEmailAddress;
|
||||
set lastEmailAddress(String? lastEmailAddress) =>
|
||||
_$this._lastEmailAddress = lastEmailAddress;
|
||||
|
||||
String _oauthUserToken;
|
||||
String get oauthUserToken => _$this._oauthUserToken;
|
||||
set oauthUserToken(String oauthUserToken) =>
|
||||
String? _oauthUserToken;
|
||||
String? get oauthUserToken => _$this._oauthUserToken;
|
||||
set oauthUserToken(String? oauthUserToken) =>
|
||||
_$this._oauthUserToken = oauthUserToken;
|
||||
|
||||
UserCompanyEntityBuilder _userCompany;
|
||||
UserCompanyEntityBuilder? _userCompany;
|
||||
UserCompanyEntityBuilder get userCompany =>
|
||||
_$this._userCompany ??= new UserCompanyEntityBuilder();
|
||||
set userCompany(UserCompanyEntityBuilder userCompany) =>
|
||||
set userCompany(UserCompanyEntityBuilder? userCompany) =>
|
||||
_$this._userCompany = userCompany;
|
||||
|
||||
String _oauthProvider;
|
||||
String get oauthProvider => _$this._oauthProvider;
|
||||
set oauthProvider(String oauthProvider) =>
|
||||
String? _oauthProvider;
|
||||
String? get oauthProvider => _$this._oauthProvider;
|
||||
set oauthProvider(String? oauthProvider) =>
|
||||
_$this._oauthProvider = oauthProvider;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
UserEntityBuilder() {
|
||||
UserEntity._initializeBuilder(this);
|
||||
|
|
@ -1354,7 +1355,7 @@ class UserEntityBuilder implements Builder<UserEntity, UserEntityBuilder> {
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(UserEntityBuilder) updates) {
|
||||
void update(void Function(UserEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -1402,7 +1403,7 @@ class UserEntityBuilder implements Builder<UserEntity, UserEntityBuilder> {
|
|||
assignedUserId: assignedUserId,
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'UserEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'userCompany';
|
||||
_userCompany?.build();
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class VendorFields {
|
|||
abstract class VendorEntity extends Object
|
||||
with BaseEntity, SelectableEntity, HasActivities
|
||||
implements Built<VendorEntity, VendorEntityBuilder> {
|
||||
factory VendorEntity({String id, AppState state, UserEntity user}) {
|
||||
factory VendorEntity({String? id, AppState? state, UserEntity? user}) {
|
||||
return _$VendorEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
number: '',
|
||||
|
|
@ -143,18 +143,17 @@ abstract class VendorEntity extends Object
|
|||
..isChanged = false
|
||||
..isDeleted = false);
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(compare: false)
|
||||
int get loadedAt;
|
||||
int? get loadedAt;
|
||||
|
||||
bool get isLoaded => loadedAt != null && loadedAt > 0;
|
||||
bool get isLoaded => loadedAt != null && loadedAt! > 0;
|
||||
|
||||
bool get isStale {
|
||||
if (!isLoaded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt >
|
||||
return DateTime.now().millisecondsSinceEpoch - loadedAt! >
|
||||
kMillisecondsToRefreshActivities;
|
||||
}
|
||||
|
||||
|
|
@ -221,7 +220,7 @@ abstract class VendorEntity extends Object
|
|||
|
||||
String get classification;
|
||||
|
||||
BuiltList<VendorContactEntity> get contacts;
|
||||
BuiltList<VendorContactEntity?> get contacts;
|
||||
|
||||
@override
|
||||
BuiltList<ActivityEntity> get activities;
|
||||
|
|
@ -229,22 +228,22 @@ abstract class VendorEntity extends Object
|
|||
BuiltList<DocumentEntity> get documents;
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
actions.add(EntityAction.vendorPortal);
|
||||
|
||||
if (userCompany.canCreate(EntityType.purchaseOrder)) {
|
||||
if (userCompany!.canCreate(EntityType.purchaseOrder)) {
|
||||
actions.add(EntityAction.newPurchaseOrder);
|
||||
}
|
||||
|
||||
|
|
@ -257,7 +256,7 @@ abstract class VendorEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (!isDeleted && multiselect) {
|
||||
if (!isDeleted! && multiselect) {
|
||||
actions.add(EntityAction.documents);
|
||||
}
|
||||
|
||||
|
|
@ -268,115 +267,115 @@ abstract class VendorEntity extends Object
|
|||
return actions..addAll(super.getActions(userCompany: userCompany));
|
||||
}
|
||||
|
||||
int compareTo(VendorEntity vendor, String sortField, bool sortAscending,
|
||||
BuiltMap<String, UserEntity> userMap, StaticState staticState) {
|
||||
int compareTo(VendorEntity? vendor, String sortField, bool sortAscending,
|
||||
BuiltMap<String?, UserEntity?> userMap, StaticState staticState) {
|
||||
int response = 0;
|
||||
final VendorEntity vendorA = sortAscending ? this : vendor;
|
||||
final VendorEntity vendorB = sortAscending ? vendor : this;
|
||||
final VendorEntity? vendorA = sortAscending ? this : vendor;
|
||||
final VendorEntity? vendorB = sortAscending ? vendor : this;
|
||||
|
||||
switch (sortField) {
|
||||
case VendorFields.name:
|
||||
response = removeDiacritics(vendorA.name)
|
||||
response = removeDiacritics(vendorA!.name)
|
||||
.toLowerCase()
|
||||
.compareTo(removeDiacritics(vendorB.name).toLowerCase());
|
||||
.compareTo(removeDiacritics(vendorB!.name).toLowerCase());
|
||||
break;
|
||||
case VendorFields.city:
|
||||
response =
|
||||
vendorA.city.toLowerCase().compareTo(vendorB.city.toLowerCase());
|
||||
vendorA!.city.toLowerCase().compareTo(vendorB!.city.toLowerCase());
|
||||
break;
|
||||
case VendorFields.phone:
|
||||
response =
|
||||
vendorA.phone.toLowerCase().compareTo(vendorB.phone.toLowerCase());
|
||||
response = vendorA!.phone
|
||||
.toLowerCase()
|
||||
.compareTo(vendorB!.phone.toLowerCase());
|
||||
break;
|
||||
case EntityFields.state:
|
||||
case VendorFields.state:
|
||||
final stateA =
|
||||
EntityState.valueOf(vendorA.entityState) ?? EntityState.active;
|
||||
final stateB =
|
||||
EntityState.valueOf(vendorB.entityState) ?? EntityState.active;
|
||||
final stateA = EntityState.valueOf(vendorA!.entityState);
|
||||
final stateB = EntityState.valueOf(vendorB!.entityState);
|
||||
response =
|
||||
stateA.name.toLowerCase().compareTo(stateB.name.toLowerCase());
|
||||
break;
|
||||
case EntityFields.assignedTo:
|
||||
final userA = userMap[vendorA.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[vendorB.assignedUserId] ?? UserEntity();
|
||||
final userA = userMap[vendorA!.assignedUserId] ?? UserEntity();
|
||||
final userB = userMap[vendorB!.assignedUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdBy:
|
||||
final userA = userMap[vendorA.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[vendorB.createdUserId] ?? UserEntity();
|
||||
final userA = userMap[vendorA!.createdUserId] ?? UserEntity();
|
||||
final userB = userMap[vendorB!.createdUserId] ?? UserEntity();
|
||||
response = userA.listDisplayName
|
||||
.toLowerCase()
|
||||
.compareTo(userB.listDisplayName.toLowerCase());
|
||||
break;
|
||||
case EntityFields.createdAt:
|
||||
response = vendorA.createdAt.compareTo(vendorB.createdAt);
|
||||
response = vendorA!.createdAt.compareTo(vendorB!.createdAt);
|
||||
break;
|
||||
case VendorFields.archivedAt:
|
||||
response = vendorA.archivedAt.compareTo(vendorB.archivedAt);
|
||||
response = vendorA!.archivedAt.compareTo(vendorB!.archivedAt);
|
||||
break;
|
||||
case VendorFields.updatedAt:
|
||||
response = vendorA.updatedAt.compareTo(vendorB.updatedAt);
|
||||
response = vendorA!.updatedAt.compareTo(vendorB!.updatedAt);
|
||||
break;
|
||||
case VendorFields.documents:
|
||||
response = vendorA.documents.length.compareTo(vendorB.documents.length);
|
||||
response =
|
||||
vendorA!.documents.length.compareTo(vendorB!.documents.length);
|
||||
break;
|
||||
case VendorFields.number:
|
||||
response = compareNatural(
|
||||
vendorA.number.toLowerCase(), vendorB.number.toLowerCase());
|
||||
vendorA!.number.toLowerCase(), vendorB!.number.toLowerCase());
|
||||
break;
|
||||
case VendorFields.address1:
|
||||
response = vendorA.address1.compareTo(vendorB.address1);
|
||||
response = vendorA!.address1.compareTo(vendorB!.address1);
|
||||
break;
|
||||
case VendorFields.address2:
|
||||
response = vendorA.address2.compareTo(vendorB.address2);
|
||||
response = vendorA!.address2.compareTo(vendorB!.address2);
|
||||
break;
|
||||
case VendorFields.postalCode:
|
||||
response = vendorA.postalCode.compareTo(vendorB.postalCode);
|
||||
response = vendorA!.postalCode.compareTo(vendorB!.postalCode);
|
||||
break;
|
||||
case VendorFields.countryId:
|
||||
response = vendorA.countryId.compareTo(vendorB.countryId);
|
||||
response = vendorA!.countryId.compareTo(vendorB!.countryId);
|
||||
break;
|
||||
case VendorFields.languageId:
|
||||
response = vendorA.languageId.compareTo(vendorB.languageId);
|
||||
response = vendorA!.languageId.compareTo(vendorB!.languageId);
|
||||
break;
|
||||
case VendorFields.privateNotes:
|
||||
response = vendorA.privateNotes.compareTo(vendorB.privateNotes);
|
||||
response = vendorA!.privateNotes.compareTo(vendorB!.privateNotes);
|
||||
break;
|
||||
case VendorFields.publicNotes:
|
||||
response = vendorA.publicNotes.compareTo(vendorB.publicNotes);
|
||||
response = vendorA!.publicNotes.compareTo(vendorB!.publicNotes);
|
||||
break;
|
||||
case VendorFields.website:
|
||||
response = vendorA.website.compareTo(vendorB.website);
|
||||
response = vendorA!.website.compareTo(vendorB!.website);
|
||||
break;
|
||||
case VendorFields.vatNumber:
|
||||
response = vendorA.vatNumber.compareTo(vendorB.vatNumber);
|
||||
response = vendorA!.vatNumber.compareTo(vendorB!.vatNumber);
|
||||
break;
|
||||
case VendorFields.idNumber:
|
||||
response = vendorA.idNumber.compareTo(vendorB.idNumber);
|
||||
response = vendorA!.idNumber.compareTo(vendorB!.idNumber);
|
||||
break;
|
||||
case VendorFields.currencyId:
|
||||
final currencyMap = staticState.currencyMap;
|
||||
response = currencyMap[vendorA.currencyId]
|
||||
response = currencyMap[vendorA!.currencyId]!
|
||||
.listDisplayName
|
||||
.compareTo(currencyMap[vendorB.currencyId].listDisplayName);
|
||||
.compareTo(currencyMap[vendorB!.currencyId]!.listDisplayName);
|
||||
break;
|
||||
case VendorFields.customValue1:
|
||||
response = vendorA.customValue1.compareTo(vendorB.customValue1);
|
||||
response = vendorA!.customValue1.compareTo(vendorB!.customValue1);
|
||||
break;
|
||||
case VendorFields.customValue2:
|
||||
response = vendorA.customValue2.compareTo(vendorB.customValue2);
|
||||
response = vendorA!.customValue2.compareTo(vendorB!.customValue2);
|
||||
break;
|
||||
case VendorFields.customValue3:
|
||||
response = vendorA.customValue3.compareTo(vendorB.customValue3);
|
||||
response = vendorA!.customValue3.compareTo(vendorB!.customValue3);
|
||||
break;
|
||||
case VendorFields.customValue4:
|
||||
response = vendorA.customValue4.compareTo(vendorB.customValue4);
|
||||
response = vendorA!.customValue4.compareTo(vendorB!.customValue4);
|
||||
break;
|
||||
case VendorFields.classification:
|
||||
response = vendorA.classification.compareTo(vendorB.classification);
|
||||
response = vendorA!.classification.compareTo(vendorB!.classification);
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by vendor.$sortField is not implemented');
|
||||
|
|
@ -384,19 +383,19 @@ abstract class VendorEntity extends Object
|
|||
}
|
||||
|
||||
if (response == 0) {
|
||||
response = vendor.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
response = vendor!.number.toLowerCase().compareTo(number.toLowerCase());
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
bool matchesNameOrEmail(String filter) {
|
||||
bool matchesNameOrEmail(String? filter) {
|
||||
if (matchesString(haystack: name, needle: filter)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (var i = 0; i < contacts.length; i++) {
|
||||
final contact = contacts[i];
|
||||
final contact = contacts[i]!;
|
||||
if (matchesString(haystack: contact.fullName, needle: filter)) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -410,9 +409,9 @@ abstract class VendorEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
for (final contact in contacts) {
|
||||
if (contact.matchesFilter(filter)) {
|
||||
if (contact!.matchesFilter(filter)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -439,9 +438,9 @@ abstract class VendorEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
for (final contact in contacts) {
|
||||
final value = contact.matchesFilterValue(filter);
|
||||
final value = contact!.matchesFilterValue(filter);
|
||||
if (value != null) {
|
||||
return value;
|
||||
}
|
||||
|
|
@ -474,7 +473,7 @@ abstract class VendorEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
@ -483,38 +482,38 @@ abstract class VendorEntity extends Object
|
|||
if (name.isNotEmpty) {
|
||||
return name;
|
||||
} else {
|
||||
return primaryContact.fullNameOrEmail;
|
||||
return primaryContact!.fullNameOrEmail;
|
||||
}
|
||||
}
|
||||
|
||||
List<VendorContactEntity> get emailContacts {
|
||||
final list = contacts.where((contact) => contact.sendEmail).toList();
|
||||
List<VendorContactEntity?> get emailContacts {
|
||||
final list = contacts.where((contact) => contact!.sendEmail).toList();
|
||||
|
||||
return list.isEmpty ? [primaryContact] : list;
|
||||
}
|
||||
|
||||
VendorContactEntity get primaryContact =>
|
||||
contacts.firstWhere((contact) => contact.isPrimary,
|
||||
VendorContactEntity? get primaryContact =>
|
||||
contacts.firstWhere((contact) => contact!.isPrimary,
|
||||
orElse: () => VendorContactEntity());
|
||||
|
||||
bool get hasCurrency => currencyId != null && currencyId.isNotEmpty;
|
||||
bool get hasCurrency => currencyId.isNotEmpty;
|
||||
|
||||
bool get hasLanguage => languageId != null && languageId.isNotEmpty;
|
||||
bool get hasLanguage => languageId.isNotEmpty;
|
||||
|
||||
bool get hasUser => assignedUserId != null && assignedUserId.isNotEmpty;
|
||||
bool get hasUser => assignedUserId != null && assignedUserId!.isNotEmpty;
|
||||
|
||||
bool get hasEmailAddress =>
|
||||
contacts.where((contact) => contact.email?.isNotEmpty).isNotEmpty;
|
||||
contacts.where((contact) => contact!.email.isNotEmpty).isNotEmpty;
|
||||
|
||||
bool get hasNameSet {
|
||||
final contact = contacts.first;
|
||||
return name.isNotEmpty ||
|
||||
contact.fullName.isNotEmpty ||
|
||||
contact!.fullName.isNotEmpty ||
|
||||
contact.email.isNotEmpty;
|
||||
}
|
||||
|
||||
VendorContactEntity getContact(String contactId) => contacts
|
||||
.firstWhere((contact) => contact.id == contactId, orElse: () => null);
|
||||
VendorContactEntity? getContact(String? contactId) => contacts
|
||||
.firstWhere((contact) => contact!.id == contactId, orElse: () => null);
|
||||
|
||||
static void _initializeBuilder(VendorEntityBuilder builder) => builder
|
||||
..activities.replace(BuiltList<ActivityEntity>())
|
||||
|
|
@ -622,7 +621,7 @@ abstract class VendorContactEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
'$firstName $lastName',
|
||||
|
|
@ -634,7 +633,7 @@ abstract class VendorContactEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
'$firstName $lastName',
|
||||
|
|
@ -651,7 +650,7 @@ abstract class VendorContactEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => FormatNumberType.money;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -53,7 +53,7 @@ class WebhookFields {
|
|||
abstract class WebhookEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
implements Built<WebhookEntity, WebhookEntityBuilder> {
|
||||
factory WebhookEntity({String id, AppState state}) {
|
||||
factory WebhookEntity({String? id, AppState? state}) {
|
||||
return _$WebhookEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
|
|
@ -230,18 +230,18 @@ abstract class WebhookEntity extends Object
|
|||
return targetUrl;
|
||||
}
|
||||
|
||||
String get eventType => EVENT_MAP[eventId];
|
||||
String? get eventType => EVENT_MAP[eventId];
|
||||
|
||||
int compareTo(WebhookEntity webhook, String sortField, bool sortAscending) {
|
||||
int compareTo(WebhookEntity? webhook, String sortField, bool sortAscending) {
|
||||
int response = 0;
|
||||
final WebhookEntity webhookA = sortAscending ? this : webhook;
|
||||
final WebhookEntity webhookB = sortAscending ? webhook : this;
|
||||
final WebhookEntity? webhookA = sortAscending ? this : webhook;
|
||||
final WebhookEntity? webhookB = sortAscending ? webhook : this;
|
||||
|
||||
switch (sortField) {
|
||||
case WebhookFields.targetUrl:
|
||||
response = webhookA.targetUrl
|
||||
response = webhookA!.targetUrl
|
||||
.toLowerCase()
|
||||
.compareTo(webhookB.targetUrl.toLowerCase());
|
||||
.compareTo(webhookB!.targetUrl.toLowerCase());
|
||||
break;
|
||||
default:
|
||||
print('## ERROR: sort by webhook.$sortField is not implemented');
|
||||
|
|
@ -252,7 +252,7 @@ abstract class WebhookEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
bool matchesFilter(String filter) {
|
||||
bool matchesFilter(String? filter) {
|
||||
return matchesStrings(
|
||||
haystacks: [
|
||||
targetUrl,
|
||||
|
|
@ -262,7 +262,7 @@ abstract class WebhookEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
String matchesFilterValue(String filter) {
|
||||
String? matchesFilterValue(String? filter) {
|
||||
return matchesStringsValue(
|
||||
haystacks: [
|
||||
targetUrl,
|
||||
|
|
@ -272,16 +272,16 @@ abstract class WebhookEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
List<EntityAction> getActions(
|
||||
{UserCompanyEntity userCompany,
|
||||
ClientEntity client,
|
||||
List<EntityAction?> getActions(
|
||||
{UserCompanyEntity? userCompany,
|
||||
ClientEntity? client,
|
||||
bool includeEdit = false,
|
||||
bool includePreview = false,
|
||||
bool multiselect = false}) {
|
||||
final actions = <EntityAction>[];
|
||||
final actions = <EntityAction?>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
if (!isDeleted! && !multiselect) {
|
||||
if (includeEdit && userCompany!.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
}
|
||||
|
|
@ -294,10 +294,10 @@ abstract class WebhookEntity extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
double get listDisplayAmount => null;
|
||||
double? get listDisplayAmount => null;
|
||||
|
||||
@override
|
||||
FormatNumberType get listDisplayAmountType => null;
|
||||
FormatNumberType? get listDisplayAmountType => null;
|
||||
|
||||
// ignore: unused_element
|
||||
static void _initializeBuilder(WebhookEntityBuilder builder) => builder
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class _$WebhookListResponseSerializer
|
|||
final String wireName = 'WebhookListResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, WebhookListResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType:
|
||||
|
|
@ -39,21 +39,21 @@ class _$WebhookListResponseSerializer
|
|||
|
||||
@override
|
||||
WebhookListResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new WebhookListResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(WebhookEntity)]))
|
||||
as BuiltList<Object>);
|
||||
BuiltList, const [const FullType(WebhookEntity)]))!
|
||||
as BuiltList<Object?>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ class _$WebhookItemResponseSerializer
|
|||
final String wireName = 'WebhookItemResponse';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(
|
||||
Iterable<Object?> serialize(
|
||||
Serializers serializers, WebhookItemResponse object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'data',
|
||||
serializers.serialize(object.data,
|
||||
specifiedType: const FullType(WebhookEntity)),
|
||||
|
|
@ -87,19 +87,19 @@ class _$WebhookItemResponseSerializer
|
|||
|
||||
@override
|
||||
WebhookItemResponse deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new WebhookItemResponseBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'data':
|
||||
result.data.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(WebhookEntity)) as WebhookEntity);
|
||||
specifiedType: const FullType(WebhookEntity))! as WebhookEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,9 +115,9 @@ class _$WebhookEntitySerializer implements StructuredSerializer<WebhookEntity> {
|
|||
final String wireName = 'WebhookEntity';
|
||||
|
||||
@override
|
||||
Iterable<Object> serialize(Serializers serializers, WebhookEntity object,
|
||||
Iterable<Object?> serialize(Serializers serializers, WebhookEntity object,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
final result = <Object?>[
|
||||
'event_id',
|
||||
serializers.serialize(object.eventId,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -146,7 +146,7 @@ class _$WebhookEntitySerializer implements StructuredSerializer<WebhookEntity> {
|
|||
'id',
|
||||
serializers.serialize(object.id, specifiedType: const FullType(String)),
|
||||
];
|
||||
Object value;
|
||||
Object? value;
|
||||
value = object.isChanged;
|
||||
if (value != null) {
|
||||
result
|
||||
|
|
@ -180,68 +180,68 @@ class _$WebhookEntitySerializer implements StructuredSerializer<WebhookEntity> {
|
|||
|
||||
@override
|
||||
WebhookEntity deserialize(
|
||||
Serializers serializers, Iterable<Object> serialized,
|
||||
Serializers serializers, Iterable<Object?> serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final result = new WebhookEntityBuilder();
|
||||
|
||||
final iterator = serialized.iterator;
|
||||
while (iterator.moveNext()) {
|
||||
final key = iterator.current as String;
|
||||
final key = iterator.current! as String;
|
||||
iterator.moveNext();
|
||||
final Object value = iterator.current;
|
||||
final Object? value = iterator.current;
|
||||
switch (key) {
|
||||
case 'event_id':
|
||||
result.eventId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'target_url':
|
||||
result.targetUrl = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'format':
|
||||
result.format = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'rest_method':
|
||||
result.restMethod = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
case 'headers':
|
||||
result.headers.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(BuiltMap,
|
||||
const [const FullType(String), const FullType(String)])));
|
||||
const [const FullType(String), const FullType(String)]))!);
|
||||
break;
|
||||
case 'isChanged':
|
||||
result.isChanged = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'created_at':
|
||||
result.createdAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'updated_at':
|
||||
result.updatedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'archived_at':
|
||||
result.archivedAt = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
specifiedType: const FullType(int))! as int;
|
||||
break;
|
||||
case 'is_deleted':
|
||||
result.isDeleted = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
specifiedType: const FullType(bool)) as bool?;
|
||||
break;
|
||||
case 'user_id':
|
||||
result.createdUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'assigned_user_id':
|
||||
result.assignedUserId = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String)) as String?;
|
||||
break;
|
||||
case 'id':
|
||||
result.id = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
specifiedType: const FullType(String))! as String;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -255,10 +255,10 @@ class _$WebhookListResponse extends WebhookListResponse {
|
|||
final BuiltList<WebhookEntity> data;
|
||||
|
||||
factory _$WebhookListResponse(
|
||||
[void Function(WebhookListResponseBuilder) updates]) =>
|
||||
[void Function(WebhookListResponseBuilder)? updates]) =>
|
||||
(new WebhookListResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$WebhookListResponse._({this.data}) : super._() {
|
||||
_$WebhookListResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'WebhookListResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -277,10 +277,10 @@ class _$WebhookListResponse extends WebhookListResponse {
|
|||
return other is WebhookListResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -297,12 +297,12 @@ class _$WebhookListResponse extends WebhookListResponse {
|
|||
|
||||
class WebhookListResponseBuilder
|
||||
implements Builder<WebhookListResponse, WebhookListResponseBuilder> {
|
||||
_$WebhookListResponse _$v;
|
||||
_$WebhookListResponse? _$v;
|
||||
|
||||
ListBuilder<WebhookEntity> _data;
|
||||
ListBuilder<WebhookEntity>? _data;
|
||||
ListBuilder<WebhookEntity> get data =>
|
||||
_$this._data ??= new ListBuilder<WebhookEntity>();
|
||||
set data(ListBuilder<WebhookEntity> data) => _$this._data = data;
|
||||
set data(ListBuilder<WebhookEntity>? data) => _$this._data = data;
|
||||
|
||||
WebhookListResponseBuilder();
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ class WebhookListResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(WebhookListResponseBuilder) updates) {
|
||||
void update(void Function(WebhookListResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ class WebhookListResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$WebhookListResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -354,10 +354,10 @@ class _$WebhookItemResponse extends WebhookItemResponse {
|
|||
final WebhookEntity data;
|
||||
|
||||
factory _$WebhookItemResponse(
|
||||
[void Function(WebhookItemResponseBuilder) updates]) =>
|
||||
[void Function(WebhookItemResponseBuilder)? updates]) =>
|
||||
(new WebhookItemResponseBuilder()..update(updates))._build();
|
||||
|
||||
_$WebhookItemResponse._({this.data}) : super._() {
|
||||
_$WebhookItemResponse._({required this.data}) : super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(data, r'WebhookItemResponse', 'data');
|
||||
}
|
||||
|
||||
|
|
@ -376,10 +376,10 @@ class _$WebhookItemResponse extends WebhookItemResponse {
|
|||
return other is WebhookItemResponse && data == other.data;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, data.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
|
|
@ -396,11 +396,11 @@ class _$WebhookItemResponse extends WebhookItemResponse {
|
|||
|
||||
class WebhookItemResponseBuilder
|
||||
implements Builder<WebhookItemResponse, WebhookItemResponseBuilder> {
|
||||
_$WebhookItemResponse _$v;
|
||||
_$WebhookItemResponse? _$v;
|
||||
|
||||
WebhookEntityBuilder _data;
|
||||
WebhookEntityBuilder? _data;
|
||||
WebhookEntityBuilder get data => _$this._data ??= new WebhookEntityBuilder();
|
||||
set data(WebhookEntityBuilder data) => _$this._data = data;
|
||||
set data(WebhookEntityBuilder? data) => _$this._data = data;
|
||||
|
||||
WebhookItemResponseBuilder();
|
||||
|
||||
|
|
@ -420,7 +420,7 @@ class WebhookItemResponseBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(WebhookItemResponseBuilder) updates) {
|
||||
void update(void Function(WebhookItemResponseBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -432,7 +432,7 @@ class WebhookItemResponseBuilder
|
|||
try {
|
||||
_$result = _$v ?? new _$WebhookItemResponse._(data: data.build());
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'data';
|
||||
data.build();
|
||||
|
|
@ -459,7 +459,7 @@ class _$WebhookEntity extends WebhookEntity {
|
|||
@override
|
||||
final BuiltMap<String, String> headers;
|
||||
@override
|
||||
final bool isChanged;
|
||||
final bool? isChanged;
|
||||
@override
|
||||
final int createdAt;
|
||||
@override
|
||||
|
|
@ -467,31 +467,31 @@ class _$WebhookEntity extends WebhookEntity {
|
|||
@override
|
||||
final int archivedAt;
|
||||
@override
|
||||
final bool isDeleted;
|
||||
final bool? isDeleted;
|
||||
@override
|
||||
final String createdUserId;
|
||||
final String? createdUserId;
|
||||
@override
|
||||
final String assignedUserId;
|
||||
final String? assignedUserId;
|
||||
@override
|
||||
final String id;
|
||||
|
||||
factory _$WebhookEntity([void Function(WebhookEntityBuilder) updates]) =>
|
||||
factory _$WebhookEntity([void Function(WebhookEntityBuilder)? updates]) =>
|
||||
(new WebhookEntityBuilder()..update(updates))._build();
|
||||
|
||||
_$WebhookEntity._(
|
||||
{this.eventId,
|
||||
this.targetUrl,
|
||||
this.format,
|
||||
this.restMethod,
|
||||
this.headers,
|
||||
{required this.eventId,
|
||||
required this.targetUrl,
|
||||
required this.format,
|
||||
required this.restMethod,
|
||||
required this.headers,
|
||||
this.isChanged,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.archivedAt,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.archivedAt,
|
||||
this.isDeleted,
|
||||
this.createdUserId,
|
||||
this.assignedUserId,
|
||||
this.id})
|
||||
required this.id})
|
||||
: super._() {
|
||||
BuiltValueNullFieldError.checkNotNull(eventId, r'WebhookEntity', 'eventId');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -535,10 +535,10 @@ class _$WebhookEntity extends WebhookEntity {
|
|||
id == other.id;
|
||||
}
|
||||
|
||||
int __hashCode;
|
||||
int? __hashCode;
|
||||
@override
|
||||
int get hashCode {
|
||||
if (__hashCode != null) return __hashCode;
|
||||
if (__hashCode != null) return __hashCode!;
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, eventId.hashCode);
|
||||
_$hash = $jc(_$hash, targetUrl.hashCode);
|
||||
|
|
@ -579,62 +579,62 @@ class _$WebhookEntity extends WebhookEntity {
|
|||
|
||||
class WebhookEntityBuilder
|
||||
implements Builder<WebhookEntity, WebhookEntityBuilder> {
|
||||
_$WebhookEntity _$v;
|
||||
_$WebhookEntity? _$v;
|
||||
|
||||
String _eventId;
|
||||
String get eventId => _$this._eventId;
|
||||
set eventId(String eventId) => _$this._eventId = eventId;
|
||||
String? _eventId;
|
||||
String? get eventId => _$this._eventId;
|
||||
set eventId(String? eventId) => _$this._eventId = eventId;
|
||||
|
||||
String _targetUrl;
|
||||
String get targetUrl => _$this._targetUrl;
|
||||
set targetUrl(String targetUrl) => _$this._targetUrl = targetUrl;
|
||||
String? _targetUrl;
|
||||
String? get targetUrl => _$this._targetUrl;
|
||||
set targetUrl(String? targetUrl) => _$this._targetUrl = targetUrl;
|
||||
|
||||
String _format;
|
||||
String get format => _$this._format;
|
||||
set format(String format) => _$this._format = format;
|
||||
String? _format;
|
||||
String? get format => _$this._format;
|
||||
set format(String? format) => _$this._format = format;
|
||||
|
||||
String _restMethod;
|
||||
String get restMethod => _$this._restMethod;
|
||||
set restMethod(String restMethod) => _$this._restMethod = restMethod;
|
||||
String? _restMethod;
|
||||
String? get restMethod => _$this._restMethod;
|
||||
set restMethod(String? restMethod) => _$this._restMethod = restMethod;
|
||||
|
||||
MapBuilder<String, String> _headers;
|
||||
MapBuilder<String, String>? _headers;
|
||||
MapBuilder<String, String> get headers =>
|
||||
_$this._headers ??= new MapBuilder<String, String>();
|
||||
set headers(MapBuilder<String, String> headers) => _$this._headers = headers;
|
||||
set headers(MapBuilder<String, String>? headers) => _$this._headers = headers;
|
||||
|
||||
bool _isChanged;
|
||||
bool get isChanged => _$this._isChanged;
|
||||
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
|
||||
bool? _isChanged;
|
||||
bool? get isChanged => _$this._isChanged;
|
||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||
|
||||
int _createdAt;
|
||||
int get createdAt => _$this._createdAt;
|
||||
set createdAt(int createdAt) => _$this._createdAt = createdAt;
|
||||
int? _createdAt;
|
||||
int? get createdAt => _$this._createdAt;
|
||||
set createdAt(int? createdAt) => _$this._createdAt = createdAt;
|
||||
|
||||
int _updatedAt;
|
||||
int get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt;
|
||||
int? _updatedAt;
|
||||
int? get updatedAt => _$this._updatedAt;
|
||||
set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt;
|
||||
|
||||
int _archivedAt;
|
||||
int get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt;
|
||||
int? _archivedAt;
|
||||
int? get archivedAt => _$this._archivedAt;
|
||||
set archivedAt(int? archivedAt) => _$this._archivedAt = archivedAt;
|
||||
|
||||
bool _isDeleted;
|
||||
bool get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted;
|
||||
bool? _isDeleted;
|
||||
bool? get isDeleted => _$this._isDeleted;
|
||||
set isDeleted(bool? isDeleted) => _$this._isDeleted = isDeleted;
|
||||
|
||||
String _createdUserId;
|
||||
String get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String createdUserId) =>
|
||||
String? _createdUserId;
|
||||
String? get createdUserId => _$this._createdUserId;
|
||||
set createdUserId(String? createdUserId) =>
|
||||
_$this._createdUserId = createdUserId;
|
||||
|
||||
String _assignedUserId;
|
||||
String get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String assignedUserId) =>
|
||||
String? _assignedUserId;
|
||||
String? get assignedUserId => _$this._assignedUserId;
|
||||
set assignedUserId(String? assignedUserId) =>
|
||||
_$this._assignedUserId = assignedUserId;
|
||||
|
||||
String _id;
|
||||
String get id => _$this._id;
|
||||
set id(String id) => _$this._id = id;
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
WebhookEntityBuilder() {
|
||||
WebhookEntity._initializeBuilder(this);
|
||||
|
|
@ -668,7 +668,7 @@ class WebhookEntityBuilder
|
|||
}
|
||||
|
||||
@override
|
||||
void update(void Function(WebhookEntityBuilder) updates) {
|
||||
void update(void Function(WebhookEntityBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
|
|
@ -702,7 +702,7 @@ class WebhookEntityBuilder
|
|||
id: BuiltValueNullFieldError.checkNotNull(
|
||||
id, r'WebhookEntity', 'id'));
|
||||
} catch (_) {
|
||||
String _$failedField;
|
||||
late String _$failedField;
|
||||
try {
|
||||
_$failedField = 'headers';
|
||||
headers.build();
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@ class WidgetData {
|
|||
this.dashboardFields,
|
||||
});
|
||||
|
||||
WidgetData.fromState(AppState state, AppLocalization localization)
|
||||
WidgetData.fromState(AppState state, AppLocalization? localization)
|
||||
: url = formatApiUrl(state.authState.url),
|
||||
companyId = state.account.defaultCompanyId,
|
||||
companyId = state.account!.defaultCompanyId,
|
||||
companies = {
|
||||
for (var userCompany in state.userCompanyStates
|
||||
.where((state) => state.company.hasName))
|
||||
userCompany.company.id: WidgetCompany.fromUserCompany(
|
||||
.where((state) => state.company!.hasName))
|
||||
userCompany.company!.id: WidgetCompany.fromUserCompany(
|
||||
userCompanyState: userCompany,
|
||||
staticState: state.staticState,
|
||||
)
|
||||
|
|
@ -36,11 +36,11 @@ class WidgetData {
|
|||
DashboardUISettings.FIELD_COMPLETED_PAYMENTS,
|
||||
],
|
||||
key: (dynamic item) => item,
|
||||
value: (dynamic item) => localization.lookup('$item')),
|
||||
value: (dynamic item) => localization!.lookup('$item')),
|
||||
dateRanges = Map.fromIterable(
|
||||
DateRange.values.where((value) => value != DateRange.custom),
|
||||
key: (dynamic item) => toSnakeCase('$item'),
|
||||
value: (dynamic item) => localization.lookup(toSnakeCase('$item')));
|
||||
value: (dynamic item) => localization!.lookup(toSnakeCase('$item')));
|
||||
|
||||
WidgetData.fromJson(Map<String, dynamic> json)
|
||||
: url = json['url'],
|
||||
|
|
@ -57,11 +57,11 @@ class WidgetData {
|
|||
'dashboard_fields': dashboardFields,
|
||||
};
|
||||
|
||||
final String url;
|
||||
final String companyId;
|
||||
final Map<String, WidgetCompany> companies;
|
||||
final Map<String, String> dateRanges;
|
||||
final Map<String, String> dashboardFields;
|
||||
final String? url;
|
||||
final String? companyId;
|
||||
final Map<String, WidgetCompany>? companies;
|
||||
final Map<String, String?>? dateRanges;
|
||||
final Map<String?, String?>? dashboardFields;
|
||||
}
|
||||
|
||||
class WidgetCompany {
|
||||
|
|
@ -75,23 +75,23 @@ class WidgetCompany {
|
|||
this.currencies});
|
||||
|
||||
WidgetCompany.fromUserCompany(
|
||||
{UserCompanyState userCompanyState, StaticState staticState})
|
||||
: id = userCompanyState.userCompany.company.id,
|
||||
name = userCompanyState.userCompany.company.displayName,
|
||||
token = userCompanyState.userCompany.token.token,
|
||||
{required UserCompanyState userCompanyState, StaticState? staticState})
|
||||
: id = userCompanyState.userCompany!.company!.id,
|
||||
name = userCompanyState.userCompany!.company!.displayName,
|
||||
token = userCompanyState.userCompany!.token!.token,
|
||||
accentColor =
|
||||
userCompanyState.userCompany.settings.validatedAccentColor,
|
||||
userCompanyState.userCompany!.settings!.validatedAccentColor,
|
||||
firstMonthOfYear =
|
||||
parseInt(userCompanyState.userCompany.company.firstMonthOfYear),
|
||||
currencyId = userCompanyState.userCompany.company.currencyId,
|
||||
parseInt(userCompanyState.userCompany!.company!.firstMonthOfYear),
|
||||
currencyId = userCompanyState.userCompany!.company!.currencyId,
|
||||
currencies = {
|
||||
for (var currencyId in getCurrencyIds(
|
||||
userCompanyState.userCompany.company,
|
||||
userCompanyState.userCompany!.company!,
|
||||
userCompanyState.clientState.map,
|
||||
userCompanyState.groupState.map,
|
||||
).where((currencyId) => currencyId != kCurrencyAll))
|
||||
currencyId: WidgetCurrency.fromCurrency(
|
||||
staticState.currencyMap[currencyId],
|
||||
staticState!.currencyMap[currencyId]!,
|
||||
)
|
||||
};
|
||||
|
||||
|
|
@ -114,13 +114,13 @@ class WidgetCompany {
|
|||
'first_month_of_year': firstMonthOfYear,
|
||||
};
|
||||
|
||||
final String id;
|
||||
final String name;
|
||||
final String token;
|
||||
final String accentColor;
|
||||
final String currencyId;
|
||||
final int firstMonthOfYear;
|
||||
final Map<String, WidgetCurrency> currencies;
|
||||
final String? id;
|
||||
final String? name;
|
||||
final String? token;
|
||||
final String? accentColor;
|
||||
final String? currencyId;
|
||||
final int? firstMonthOfYear;
|
||||
final Map<String, WidgetCurrency>? currencies;
|
||||
}
|
||||
|
||||
class WidgetCurrency {
|
||||
|
|
@ -150,8 +150,8 @@ class WidgetCurrency {
|
|||
'exchange_rate': exchangeRate,
|
||||
};
|
||||
|
||||
final String id;
|
||||
final String name;
|
||||
final String code;
|
||||
final double exchangeRate;
|
||||
final String? id;
|
||||
final String? name;
|
||||
final String? code;
|
||||
final double? exchangeRate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Dart imports:
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:core';
|
||||
import 'dart:io';
|
||||
|
|
@ -25,11 +26,11 @@ class AuthRepository {
|
|||
final WebClient webClient;
|
||||
|
||||
Future<LoginResponse> signUp({
|
||||
String url,
|
||||
String secret,
|
||||
@required String email,
|
||||
@required String password,
|
||||
@required String referralCode,
|
||||
String? url,
|
||||
String? secret,
|
||||
required String email,
|
||||
required String password,
|
||||
required String referralCode,
|
||||
}) async {
|
||||
final credentials = {
|
||||
'email': email,
|
||||
|
|
@ -51,13 +52,13 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<LoginResponse> oauthSignUp({
|
||||
@required String url,
|
||||
@required String idToken,
|
||||
@required String accessToken,
|
||||
@required String referralCode,
|
||||
@required String provider,
|
||||
String firstName = '',
|
||||
String lastName = '',
|
||||
required String url,
|
||||
required String? idToken,
|
||||
required String? accessToken,
|
||||
required String referralCode,
|
||||
required String provider,
|
||||
String? firstName = '',
|
||||
String? lastName = '',
|
||||
}) async {
|
||||
final credentials = {
|
||||
'terms_of_service': true,
|
||||
|
|
@ -78,12 +79,12 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<LoginResponse> login(
|
||||
{String email,
|
||||
String password,
|
||||
String url,
|
||||
String secret,
|
||||
String platform,
|
||||
String oneTimePassword}) async {
|
||||
{String? email,
|
||||
String? password,
|
||||
String? url,
|
||||
String? secret,
|
||||
String? platform,
|
||||
String? oneTimePassword}) async {
|
||||
final credentials = {
|
||||
'email': email,
|
||||
'password': password,
|
||||
|
|
@ -95,7 +96,7 @@ class AuthRepository {
|
|||
return sendRequest(url: url, data: credentials, secret: secret);
|
||||
}
|
||||
|
||||
Future<dynamic> logout({@required Credentials credentials}) async {
|
||||
Future<dynamic> logout({required Credentials credentials}) async {
|
||||
return webClient.post(
|
||||
'${credentials.url}/logout',
|
||||
credentials.token,
|
||||
|
|
@ -103,14 +104,14 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<LoginResponse> oauthLogin({
|
||||
@required String idToken,
|
||||
@required String accessToken,
|
||||
@required String url,
|
||||
@required String secret,
|
||||
@required String platform,
|
||||
@required String provider,
|
||||
@required String email,
|
||||
@required String authCode,
|
||||
required String? idToken,
|
||||
required String? accessToken,
|
||||
required String url,
|
||||
required String secret,
|
||||
required String platform,
|
||||
required String provider,
|
||||
required String? email,
|
||||
required String? authCode,
|
||||
}) async {
|
||||
final credentials = {
|
||||
'id_token': idToken,
|
||||
|
|
@ -125,11 +126,11 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<LoginResponse> refresh({
|
||||
@required String url,
|
||||
@required String token,
|
||||
@required int updatedAt,
|
||||
@required bool currentCompany,
|
||||
@required bool includeStatic,
|
||||
required String url,
|
||||
required String token,
|
||||
required int updatedAt,
|
||||
required bool currentCompany,
|
||||
required bool includeStatic,
|
||||
}) async {
|
||||
url = formatApiUrl(url) + '/refresh?';
|
||||
|
||||
|
|
@ -150,7 +151,7 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<LoginResponse> recoverPassword(
|
||||
{String email, String url, String secret, String platform}) async {
|
||||
{String? email, String? url, String? secret, String? platform}) async {
|
||||
final credentials = {
|
||||
'email': email,
|
||||
};
|
||||
|
|
@ -160,15 +161,15 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<void> setDefaultCompany({
|
||||
@required Credentials credentials,
|
||||
@required String companyId,
|
||||
required Credentials credentials,
|
||||
required String companyId,
|
||||
}) async {
|
||||
final url = '${credentials.url}/companies/$companyId/default';
|
||||
return webClient.post(url, credentials.token);
|
||||
}
|
||||
|
||||
Future<dynamic> addCompany({
|
||||
@required Credentials credentials,
|
||||
required Credentials credentials,
|
||||
}) async {
|
||||
final url = '${credentials.url}/companies';
|
||||
final data = {
|
||||
|
|
@ -179,10 +180,10 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<dynamic> deleteCompany({
|
||||
@required Credentials credentials,
|
||||
@required String companyId,
|
||||
@required String password,
|
||||
@required String reason,
|
||||
required Credentials credentials,
|
||||
required String companyId,
|
||||
required String password,
|
||||
required String reason,
|
||||
}) async {
|
||||
final url = '${credentials.url}/companies/$companyId';
|
||||
return webClient.delete(
|
||||
|
|
@ -196,10 +197,10 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<dynamic> purgeData({
|
||||
@required Credentials credentials,
|
||||
@required String companyId,
|
||||
@required String password,
|
||||
@required String idToken,
|
||||
required Credentials credentials,
|
||||
required String companyId,
|
||||
required String password,
|
||||
required String idToken,
|
||||
}) async {
|
||||
return webClient.post(
|
||||
'${credentials.url}/companies/purge_save_settings/$companyId',
|
||||
|
|
@ -210,7 +211,7 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<dynamic> resendConfirmation(
|
||||
{@required Credentials credentials, @required String userId}) async {
|
||||
{required Credentials credentials, required String userId}) async {
|
||||
return webClient.post(
|
||||
'${credentials.url}/user/$userId/reconfirm',
|
||||
credentials.token,
|
||||
|
|
@ -218,10 +219,10 @@ class AuthRepository {
|
|||
}
|
||||
|
||||
Future<LoginResponse> sendRequest({
|
||||
String url,
|
||||
required String url,
|
||||
dynamic data,
|
||||
String token,
|
||||
String secret,
|
||||
String? token,
|
||||
String? secret,
|
||||
bool includeStatic = true,
|
||||
}) async {
|
||||
if (url.contains('?')) {
|
||||
|
|
@ -245,8 +246,9 @@ class AuthRepository {
|
|||
secret: secret, data: json.encode(data));
|
||||
}
|
||||
|
||||
return await compute<dynamic, dynamic>(SerializationUtils.deserializeWith,
|
||||
<dynamic>[LoginResponse.serializer, response]);
|
||||
return await (compute<dynamic, dynamic>(SerializationUtils.deserializeWith,
|
||||
<dynamic>[LoginResponse.serializer, response])
|
||||
as FutureOr<LoginResponse>);
|
||||
}
|
||||
|
||||
String get _tokenName => kIsWeb
|
||||
|
|
|
|||
|
|
@ -15,22 +15,22 @@ class BankAccountRepository {
|
|||
final WebClient webClient;
|
||||
|
||||
Future<BankAccountEntity> loadItem(
|
||||
Credentials credentials, String entityId) async {
|
||||
Credentials credentials, String? entityId) async {
|
||||
final dynamic response = await webClient.get(
|
||||
'${credentials.url}/bank_integrations/$entityId', credentials.token);
|
||||
|
||||
final BankAccountItemResponse bankAccountResponse = serializers
|
||||
.deserializeWith(BankAccountItemResponse.serializer, response);
|
||||
.deserializeWith(BankAccountItemResponse.serializer, response)!;
|
||||
|
||||
return bankAccountResponse.data;
|
||||
}
|
||||
|
||||
Future<BuiltList<BankAccountEntity>> loadList(Credentials credentials) async {
|
||||
final String url = credentials.url + '/bank_integrations?';
|
||||
final String url = credentials.url! + '/bank_integrations?';
|
||||
final dynamic response = await webClient.get(url, credentials.token);
|
||||
|
||||
final BankAccountListResponse bankAccountResponse = serializers
|
||||
.deserializeWith(BankAccountListResponse.serializer, response);
|
||||
.deserializeWith(BankAccountListResponse.serializer, response)!;
|
||||
|
||||
return bankAccountResponse.data;
|
||||
}
|
||||
|
|
@ -41,13 +41,13 @@ class BankAccountRepository {
|
|||
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
|
||||
}
|
||||
|
||||
final url = credentials.url +
|
||||
final url = credentials.url! +
|
||||
'/bank_integrations/bulk?per_page=$kMaxEntitiesPerBulkAction';
|
||||
final dynamic response = await webClient.post(url, credentials.token,
|
||||
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
|
||||
|
||||
final BankAccountListResponse bankAccountResponse = serializers
|
||||
.deserializeWith(BankAccountListResponse.serializer, response);
|
||||
.deserializeWith(BankAccountListResponse.serializer, response)!;
|
||||
|
||||
return bankAccountResponse.data.toList();
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ class BankAccountRepository {
|
|||
|
||||
if (bankAccount.isNew) {
|
||||
response = await webClient.post(
|
||||
credentials.url + '/bank_integrations', credentials.token,
|
||||
credentials.url! + '/bank_integrations', credentials.token,
|
||||
data: json.encode(data));
|
||||
} else {
|
||||
final url = '${credentials.url}/bank_integrations/${bankAccount.id}';
|
||||
|
|
@ -69,7 +69,7 @@ class BankAccountRepository {
|
|||
}
|
||||
|
||||
final BankAccountItemResponse bankAccountResponse = serializers
|
||||
.deserializeWith(BankAccountItemResponse.serializer, response);
|
||||
.deserializeWith(BankAccountItemResponse.serializer, response)!;
|
||||
|
||||
return bankAccountResponse.data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Dart imports:
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:core';
|
||||
|
||||
|
|
@ -25,15 +26,16 @@ class ClientRepository {
|
|||
final WebClient webClient;
|
||||
|
||||
Future<ClientEntity> loadItem(
|
||||
Credentials credentials, String entityId) async {
|
||||
Credentials credentials, String? entityId) async {
|
||||
final String url =
|
||||
'${credentials.url}/clients/$entityId?include=gateway_tokens,activities,ledger,system_logs,documents';
|
||||
|
||||
final dynamic response = await webClient.get(url, credentials.token);
|
||||
|
||||
final ClientItemResponse clientResponse = await compute<dynamic, dynamic>(
|
||||
SerializationUtils.deserializeWith,
|
||||
<dynamic>[ClientItemResponse.serializer, response]);
|
||||
final ClientItemResponse clientResponse = await (compute<dynamic, dynamic>(
|
||||
SerializationUtils.deserializeWith,
|
||||
<dynamic>[ClientItemResponse.serializer, response])
|
||||
as FutureOr<ClientItemResponse>);
|
||||
|
||||
return clientResponse.data;
|
||||
}
|
||||
|
|
@ -41,15 +43,16 @@ class ClientRepository {
|
|||
Future<BuiltList<ClientEntity>> loadList(
|
||||
Credentials credentials, int page) async {
|
||||
final String url =
|
||||
credentials.url + '/clients?per_page=$kMaxRecordsPerPage&page=$page';
|
||||
credentials.url! + '/clients?per_page=$kMaxRecordsPerPage&page=$page';
|
||||
|
||||
final dynamic response = await webClient.get(url, credentials.token);
|
||||
|
||||
//debugPrint('## CLIENTS: $response');
|
||||
|
||||
final ClientListResponse clientResponse = await compute<dynamic, dynamic>(
|
||||
SerializationUtils.deserializeWith,
|
||||
<dynamic>[ClientListResponse.serializer, response]);
|
||||
final ClientListResponse clientResponse = await (compute<dynamic, dynamic>(
|
||||
SerializationUtils.deserializeWith,
|
||||
<dynamic>[ClientListResponse.serializer, response])
|
||||
as FutureOr<ClientListResponse>);
|
||||
|
||||
return clientResponse.data;
|
||||
}
|
||||
|
|
@ -60,24 +63,24 @@ class ClientRepository {
|
|||
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
|
||||
}
|
||||
|
||||
final url = credentials.url +
|
||||
final url = credentials.url! +
|
||||
'/clients/bulk?per_page=$kMaxEntitiesPerBulkAction&include=gateway_tokens,activities,ledger,system_logs,documents';
|
||||
final dynamic response = await webClient.post(url, credentials.token,
|
||||
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
|
||||
|
||||
final ClientListResponse clientResponse =
|
||||
serializers.deserializeWith(ClientListResponse.serializer, response);
|
||||
serializers.deserializeWith(ClientListResponse.serializer, response)!;
|
||||
|
||||
return clientResponse.data.toList();
|
||||
}
|
||||
|
||||
Future<bool> purge({
|
||||
@required Credentials credentials,
|
||||
@required String clientId,
|
||||
@required String password,
|
||||
@required String idToken,
|
||||
required Credentials credentials,
|
||||
required String clientId,
|
||||
required String? password,
|
||||
required String? idToken,
|
||||
}) async {
|
||||
final url = credentials.url + '/clients/$clientId/purge';
|
||||
final url = credentials.url! + '/clients/$clientId/purge';
|
||||
|
||||
await webClient.post(url, credentials.token,
|
||||
password: password, idToken: idToken);
|
||||
|
|
@ -86,19 +89,20 @@ class ClientRepository {
|
|||
}
|
||||
|
||||
Future<ClientEntity> merge({
|
||||
@required Credentials credentials,
|
||||
@required String clientId,
|
||||
@required String mergeIntoClientId,
|
||||
@required String password,
|
||||
@required String idToken,
|
||||
required Credentials credentials,
|
||||
required String? clientId,
|
||||
required String? mergeIntoClientId,
|
||||
required String? password,
|
||||
required String? idToken,
|
||||
}) async {
|
||||
final url = credentials.url + '/clients/$mergeIntoClientId/$clientId/merge';
|
||||
final url =
|
||||
credentials.url! + '/clients/$mergeIntoClientId/$clientId/merge';
|
||||
|
||||
final dynamic response = await webClient.post(url, credentials.token,
|
||||
password: password, idToken: idToken);
|
||||
|
||||
final ClientItemResponse clientResponse =
|
||||
serializers.deserializeWith(ClientItemResponse.serializer, response);
|
||||
serializers.deserializeWith(ClientItemResponse.serializer, response)!;
|
||||
|
||||
return clientResponse.data;
|
||||
}
|
||||
|
|
@ -111,19 +115,19 @@ class ClientRepository {
|
|||
|
||||
if (client.isNew) {
|
||||
response = await webClient.post(
|
||||
credentials.url +
|
||||
credentials.url! +
|
||||
'/clients?include=gateway_tokens,activities,ledger,system_logs,documents',
|
||||
credentials.token,
|
||||
data: json.encode(data));
|
||||
} else {
|
||||
final url = credentials.url +
|
||||
final url = credentials.url! +
|
||||
'/clients/${client.id}?include=gateway_tokens,activities,ledger,system_logs,documents';
|
||||
response =
|
||||
await webClient.put(url, credentials.token, data: json.encode(data));
|
||||
}
|
||||
|
||||
final ClientItemResponse clientResponse =
|
||||
serializers.deserializeWith(ClientItemResponse.serializer, response);
|
||||
serializers.deserializeWith(ClientItemResponse.serializer, response)!;
|
||||
|
||||
return clientResponse.data;
|
||||
}
|
||||
|
|
@ -145,7 +149,7 @@ class ClientRepository {
|
|||
multipartFiles: multipartFile);
|
||||
|
||||
final ClientItemResponse clientResponse =
|
||||
serializers.deserializeWith(ClientItemResponse.serializer, response);
|
||||
serializers.deserializeWith(ClientItemResponse.serializer, response)!;
|
||||
|
||||
return clientResponse.data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,25 +22,25 @@ class CompanyGatewayRepository {
|
|||
|
||||
// TODO remove includes in this file
|
||||
Future<CompanyGatewayEntity> loadItem(
|
||||
Credentials credentials, String entityId) async {
|
||||
Credentials credentials, String? entityId) async {
|
||||
final dynamic response = await webClient.get(
|
||||
'${credentials.url}/company_gateways/$entityId?include=system_logs',
|
||||
credentials.token);
|
||||
|
||||
final CompanyGatewayItemResponse companyGatewayResponse = serializers
|
||||
.deserializeWith(CompanyGatewayItemResponse.serializer, response);
|
||||
.deserializeWith(CompanyGatewayItemResponse.serializer, response)!;
|
||||
|
||||
return companyGatewayResponse.data;
|
||||
}
|
||||
|
||||
Future<BuiltList<CompanyGatewayEntity>> loadList(
|
||||
Credentials credentials) async {
|
||||
final url = credentials.url + '/company_gateways';
|
||||
final url = credentials.url! + '/company_gateways';
|
||||
|
||||
final dynamic response = await webClient.get(url, credentials.token);
|
||||
|
||||
final CompanyGatewayListResponse companyGatewayResponse = serializers
|
||||
.deserializeWith(CompanyGatewayListResponse.serializer, response);
|
||||
.deserializeWith(CompanyGatewayListResponse.serializer, response)!;
|
||||
|
||||
return companyGatewayResponse.data;
|
||||
}
|
||||
|
|
@ -51,20 +51,20 @@ class CompanyGatewayRepository {
|
|||
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
|
||||
}
|
||||
|
||||
final url = credentials.url +
|
||||
final url = credentials.url! +
|
||||
'/company_gateways/bulk?per_page=$kMaxEntitiesPerBulkAction';
|
||||
final dynamic response = await webClient.post(url, credentials.token,
|
||||
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
|
||||
|
||||
final CompanyGatewayListResponse companyGatewayResponse = serializers
|
||||
.deserializeWith(CompanyGatewayListResponse.serializer, response);
|
||||
.deserializeWith(CompanyGatewayListResponse.serializer, response)!;
|
||||
|
||||
return companyGatewayResponse.data.toList();
|
||||
}
|
||||
|
||||
Future<void> disconnect(Credentials credentials, String id, String password,
|
||||
String idToken) async {
|
||||
final url = credentials.url + '/stripe/disconnect/$id';
|
||||
Future<void> disconnect(Credentials credentials, String id, String? password,
|
||||
String? idToken) async {
|
||||
final url = credentials.url! + '/stripe/disconnect/$id';
|
||||
await webClient.post(
|
||||
url,
|
||||
credentials.token,
|
||||
|
|
@ -81,16 +81,16 @@ class CompanyGatewayRepository {
|
|||
|
||||
if (companyGateway.isNew) {
|
||||
response = await webClient.post(
|
||||
credentials.url + '/company_gateways', credentials.token,
|
||||
credentials.url! + '/company_gateways', credentials.token,
|
||||
data: json.encode(data));
|
||||
} else {
|
||||
final url = credentials.url + '/company_gateways/${companyGateway.id}';
|
||||
final url = credentials.url! + '/company_gateways/${companyGateway.id}';
|
||||
response =
|
||||
await webClient.put(url, credentials.token, data: json.encode(data));
|
||||
}
|
||||
|
||||
final CompanyGatewayItemResponse companyGatewayResponse = serializers
|
||||
.deserializeWith(CompanyGatewayItemResponse.serializer, response);
|
||||
.deserializeWith(CompanyGatewayItemResponse.serializer, response)!;
|
||||
|
||||
return companyGatewayResponse.data;
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue