// GENERATED CODE - DO NOT MODIFY BY HAND part of 'pref_state.dart'; // ************************************************************************** // BuiltValueGenerator // ************************************************************************** const AppLayout _$mobile = const AppLayout._('mobile'); const AppLayout _$tablet = const AppLayout._('tablet'); const AppLayout _$desktop = const AppLayout._('desktop'); AppLayout _$valueOf(String name) { switch (name) { case 'mobile': return _$mobile; case 'tablet': return _$tablet; case 'desktop': return _$desktop; default: throw new ArgumentError(name); } } final BuiltSet _$values = new BuiltSet(const [ _$mobile, _$tablet, _$desktop, ]); const AppSidebar _$menu = const AppSidebar._('menu'); const AppSidebar _$history = const AppSidebar._('history'); AppSidebar _$valueOfSidebar(String name) { switch (name) { case 'menu': return _$menu; case 'history': return _$history; default: throw new ArgumentError(name); } } final BuiltSet _$valuesSidebar = new BuiltSet(const [ _$menu, _$history, ]); const AppSidebarMode _$float = const AppSidebarMode._('float'); const AppSidebarMode _$visible = const AppSidebarMode._('visible'); const AppSidebarMode _$collapse = const AppSidebarMode._('collapse'); AppSidebarMode _$valueOfSidebarMode(String name) { switch (name) { case 'float': return _$float; case 'visible': return _$visible; case 'collapse': return _$collapse; default: throw new ArgumentError(name); } } final BuiltSet _$valuesSidebarMode = new BuiltSet(const [ _$float, _$visible, _$collapse, ]); Serializer _$prefStateSerializer = new _$PrefStateSerializer(); Serializer _$companyPrefStateSerializer = new _$CompanyPrefStateSerializer(); Serializer _$appLayoutSerializer = new _$AppLayoutSerializer(); Serializer _$appSidebarSerializer = new _$AppSidebarSerializer(); Serializer _$appSidebarModeSerializer = new _$AppSidebarModeSerializer(); Serializer _$historyRecordSerializer = new _$HistoryRecordSerializer(); class _$PrefStateSerializer implements StructuredSerializer { @override final Iterable types = const [PrefState, _$PrefState]; @override final String wireName = 'PrefState'; @override Iterable serialize(Serializers serializers, PrefState object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'layout', serializers.serialize(object.layout, specifiedType: const FullType(AppLayout)), 'menuSidebarMode', serializers.serialize(object.menuSidebarMode, specifiedType: const FullType(AppSidebarMode)), 'historySidebarMode', serializers.serialize(object.historySidebarMode, specifiedType: const FullType(AppSidebarMode)), 'isMenuVisible', serializers.serialize(object.isMenuVisible, specifiedType: const FullType(bool)), 'isHistoryVisible', serializers.serialize(object.isHistoryVisible, specifiedType: const FullType(bool)), 'enableDarkMode', serializers.serialize(object.enableDarkMode, specifiedType: const FullType(bool)), 'longPressSelectionIsDefault', serializers.serialize(object.longPressSelectionIsDefault, specifiedType: const FullType(bool)), 'requireAuthentication', serializers.serialize(object.requireAuthentication, specifiedType: const FullType(bool)), 'emailPayment', serializers.serialize(object.emailPayment, specifiedType: const FullType(bool)), 'autoStartTasks', serializers.serialize(object.autoStartTasks, specifiedType: const FullType(bool)), 'addDocumentsToInvoice', serializers.serialize(object.addDocumentsToInvoice, specifiedType: const FullType(bool)), 'companyPrefs', serializers.serialize(object.companyPrefs, specifiedType: const FullType( BuiltList, const [const FullType(CompanyPrefState)])), ]; return result; } @override PrefState deserialize(Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { final result = new PrefStateBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); final dynamic value = iterator.current; switch (key) { case 'layout': result.layout = serializers.deserialize(value, specifiedType: const FullType(AppLayout)) as AppLayout; break; case 'menuSidebarMode': result.menuSidebarMode = serializers.deserialize(value, specifiedType: const FullType(AppSidebarMode)) as AppSidebarMode; break; case 'historySidebarMode': result.historySidebarMode = serializers.deserialize(value, specifiedType: const FullType(AppSidebarMode)) as AppSidebarMode; break; case 'isMenuVisible': result.isMenuVisible = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'isHistoryVisible': result.isHistoryVisible = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'enableDarkMode': result.enableDarkMode = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'longPressSelectionIsDefault': result.longPressSelectionIsDefault = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'requireAuthentication': result.requireAuthentication = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'emailPayment': result.emailPayment = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'autoStartTasks': result.autoStartTasks = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'addDocumentsToInvoice': result.addDocumentsToInvoice = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'companyPrefs': result.companyPrefs.replace(serializers.deserialize(value, specifiedType: const FullType( BuiltList, const [const FullType(CompanyPrefState)])) as BuiltList); break; } } return result.build(); } } class _$CompanyPrefStateSerializer implements StructuredSerializer { @override final Iterable types = const [CompanyPrefState, _$CompanyPrefState]; @override final String wireName = 'CompanyPrefState'; @override Iterable serialize(Serializers serializers, CompanyPrefState object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'accentColor', serializers.serialize(object.accentColor, specifiedType: const FullType(String)), 'historyList', serializers.serialize(object.historyList, specifiedType: const FullType(BuiltList, const [const FullType(HistoryRecord)])), ]; return result; } @override CompanyPrefState deserialize( Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { final result = new CompanyPrefStateBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); final dynamic value = iterator.current; switch (key) { case 'accentColor': result.accentColor = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'historyList': result.historyList.replace(serializers.deserialize(value, specifiedType: const FullType( BuiltList, const [const FullType(HistoryRecord)])) as BuiltList); break; } } return result.build(); } } class _$AppLayoutSerializer implements PrimitiveSerializer { @override final Iterable types = const [AppLayout]; @override final String wireName = 'AppLayout'; @override Object serialize(Serializers serializers, AppLayout object, {FullType specifiedType = FullType.unspecified}) => object.name; @override AppLayout deserialize(Serializers serializers, Object serialized, {FullType specifiedType = FullType.unspecified}) => AppLayout.valueOf(serialized as String); } class _$AppSidebarSerializer implements PrimitiveSerializer { @override final Iterable types = const [AppSidebar]; @override final String wireName = 'AppSidebar'; @override Object serialize(Serializers serializers, AppSidebar object, {FullType specifiedType = FullType.unspecified}) => object.name; @override AppSidebar deserialize(Serializers serializers, Object serialized, {FullType specifiedType = FullType.unspecified}) => AppSidebar.valueOf(serialized as String); } class _$AppSidebarModeSerializer implements PrimitiveSerializer { @override final Iterable types = const [AppSidebarMode]; @override final String wireName = 'AppSidebarMode'; @override Object serialize(Serializers serializers, AppSidebarMode object, {FullType specifiedType = FullType.unspecified}) => object.name; @override AppSidebarMode deserialize(Serializers serializers, Object serialized, {FullType specifiedType = FullType.unspecified}) => AppSidebarMode.valueOf(serialized as String); } class _$HistoryRecordSerializer implements StructuredSerializer { @override final Iterable types = const [HistoryRecord, _$HistoryRecord]; @override final String wireName = 'HistoryRecord'; @override Iterable serialize(Serializers serializers, HistoryRecord object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'id', serializers.serialize(object.id, specifiedType: const FullType(String)), 'entityType', serializers.serialize(object.entityType, specifiedType: const FullType(EntityType)), 'timestamp', serializers.serialize(object.timestamp, specifiedType: const FullType(int)), ]; return result; } @override HistoryRecord deserialize( Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { final result = new HistoryRecordBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); final dynamic value = iterator.current; switch (key) { case 'id': result.id = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'entityType': result.entityType = serializers.deserialize(value, specifiedType: const FullType(EntityType)) as EntityType; break; case 'timestamp': result.timestamp = serializers.deserialize(value, specifiedType: const FullType(int)) as int; break; } } return result.build(); } } class _$PrefState extends PrefState { @override final AppLayout layout; @override final AppSidebarMode menuSidebarMode; @override final AppSidebarMode historySidebarMode; @override final bool isMenuVisible; @override final bool isHistoryVisible; @override final bool enableDarkMode; @override final bool longPressSelectionIsDefault; @override final bool requireAuthentication; @override final bool emailPayment; @override final bool autoStartTasks; @override final bool addDocumentsToInvoice; @override final BuiltList companyPrefs; factory _$PrefState([void Function(PrefStateBuilder) updates]) => (new PrefStateBuilder()..update(updates)).build(); _$PrefState._( {this.layout, this.menuSidebarMode, this.historySidebarMode, this.isMenuVisible, this.isHistoryVisible, this.enableDarkMode, this.longPressSelectionIsDefault, this.requireAuthentication, this.emailPayment, this.autoStartTasks, this.addDocumentsToInvoice, this.companyPrefs}) : super._() { if (layout == null) { throw new BuiltValueNullFieldError('PrefState', 'layout'); } if (menuSidebarMode == null) { throw new BuiltValueNullFieldError('PrefState', 'menuSidebarMode'); } if (historySidebarMode == null) { throw new BuiltValueNullFieldError('PrefState', 'historySidebarMode'); } if (isMenuVisible == null) { throw new BuiltValueNullFieldError('PrefState', 'isMenuVisible'); } if (isHistoryVisible == null) { throw new BuiltValueNullFieldError('PrefState', 'isHistoryVisible'); } if (enableDarkMode == null) { throw new BuiltValueNullFieldError('PrefState', 'enableDarkMode'); } if (longPressSelectionIsDefault == null) { throw new BuiltValueNullFieldError( 'PrefState', 'longPressSelectionIsDefault'); } if (requireAuthentication == null) { throw new BuiltValueNullFieldError('PrefState', 'requireAuthentication'); } if (emailPayment == null) { throw new BuiltValueNullFieldError('PrefState', 'emailPayment'); } if (autoStartTasks == null) { throw new BuiltValueNullFieldError('PrefState', 'autoStartTasks'); } if (addDocumentsToInvoice == null) { throw new BuiltValueNullFieldError('PrefState', 'addDocumentsToInvoice'); } if (companyPrefs == null) { throw new BuiltValueNullFieldError('PrefState', 'companyPrefs'); } } @override PrefState rebuild(void Function(PrefStateBuilder) updates) => (toBuilder()..update(updates)).build(); @override PrefStateBuilder toBuilder() => new PrefStateBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; return other is PrefState && layout == other.layout && menuSidebarMode == other.menuSidebarMode && historySidebarMode == other.historySidebarMode && isMenuVisible == other.isMenuVisible && isHistoryVisible == other.isHistoryVisible && enableDarkMode == other.enableDarkMode && longPressSelectionIsDefault == other.longPressSelectionIsDefault && requireAuthentication == other.requireAuthentication && emailPayment == other.emailPayment && autoStartTasks == other.autoStartTasks && addDocumentsToInvoice == other.addDocumentsToInvoice && companyPrefs == other.companyPrefs; } @override int get hashCode { return $jf($jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc($jc(0, layout.hashCode), menuSidebarMode.hashCode), historySidebarMode.hashCode), isMenuVisible.hashCode), isHistoryVisible.hashCode), enableDarkMode.hashCode), longPressSelectionIsDefault.hashCode), requireAuthentication.hashCode), emailPayment.hashCode), autoStartTasks.hashCode), addDocumentsToInvoice.hashCode), companyPrefs.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('PrefState') ..add('layout', layout) ..add('menuSidebarMode', menuSidebarMode) ..add('historySidebarMode', historySidebarMode) ..add('isMenuVisible', isMenuVisible) ..add('isHistoryVisible', isHistoryVisible) ..add('enableDarkMode', enableDarkMode) ..add('longPressSelectionIsDefault', longPressSelectionIsDefault) ..add('requireAuthentication', requireAuthentication) ..add('emailPayment', emailPayment) ..add('autoStartTasks', autoStartTasks) ..add('addDocumentsToInvoice', addDocumentsToInvoice) ..add('companyPrefs', companyPrefs)) .toString(); } } class PrefStateBuilder implements Builder { _$PrefState _$v; AppLayout _layout; AppLayout get layout => _$this._layout; set layout(AppLayout layout) => _$this._layout = layout; AppSidebarMode _menuSidebarMode; AppSidebarMode get menuSidebarMode => _$this._menuSidebarMode; set menuSidebarMode(AppSidebarMode menuSidebarMode) => _$this._menuSidebarMode = menuSidebarMode; AppSidebarMode _historySidebarMode; AppSidebarMode get historySidebarMode => _$this._historySidebarMode; set historySidebarMode(AppSidebarMode historySidebarMode) => _$this._historySidebarMode = historySidebarMode; bool _isMenuVisible; bool get isMenuVisible => _$this._isMenuVisible; set isMenuVisible(bool isMenuVisible) => _$this._isMenuVisible = isMenuVisible; bool _isHistoryVisible; bool get isHistoryVisible => _$this._isHistoryVisible; set isHistoryVisible(bool isHistoryVisible) => _$this._isHistoryVisible = isHistoryVisible; bool _enableDarkMode; bool get enableDarkMode => _$this._enableDarkMode; set enableDarkMode(bool enableDarkMode) => _$this._enableDarkMode = enableDarkMode; bool _longPressSelectionIsDefault; bool get longPressSelectionIsDefault => _$this._longPressSelectionIsDefault; set longPressSelectionIsDefault(bool longPressSelectionIsDefault) => _$this._longPressSelectionIsDefault = longPressSelectionIsDefault; bool _requireAuthentication; bool get requireAuthentication => _$this._requireAuthentication; set requireAuthentication(bool requireAuthentication) => _$this._requireAuthentication = requireAuthentication; bool _emailPayment; bool get emailPayment => _$this._emailPayment; set emailPayment(bool emailPayment) => _$this._emailPayment = emailPayment; bool _autoStartTasks; bool get autoStartTasks => _$this._autoStartTasks; set autoStartTasks(bool autoStartTasks) => _$this._autoStartTasks = autoStartTasks; bool _addDocumentsToInvoice; bool get addDocumentsToInvoice => _$this._addDocumentsToInvoice; set addDocumentsToInvoice(bool addDocumentsToInvoice) => _$this._addDocumentsToInvoice = addDocumentsToInvoice; ListBuilder _companyPrefs; ListBuilder get companyPrefs => _$this._companyPrefs ??= new ListBuilder(); set companyPrefs(ListBuilder companyPrefs) => _$this._companyPrefs = companyPrefs; PrefStateBuilder(); PrefStateBuilder get _$this { if (_$v != null) { _layout = _$v.layout; _menuSidebarMode = _$v.menuSidebarMode; _historySidebarMode = _$v.historySidebarMode; _isMenuVisible = _$v.isMenuVisible; _isHistoryVisible = _$v.isHistoryVisible; _enableDarkMode = _$v.enableDarkMode; _longPressSelectionIsDefault = _$v.longPressSelectionIsDefault; _requireAuthentication = _$v.requireAuthentication; _emailPayment = _$v.emailPayment; _autoStartTasks = _$v.autoStartTasks; _addDocumentsToInvoice = _$v.addDocumentsToInvoice; _companyPrefs = _$v.companyPrefs?.toBuilder(); _$v = null; } return this; } @override void replace(PrefState other) { if (other == null) { throw new ArgumentError.notNull('other'); } _$v = other as _$PrefState; } @override void update(void Function(PrefStateBuilder) updates) { if (updates != null) updates(this); } @override _$PrefState build() { _$PrefState _$result; try { _$result = _$v ?? new _$PrefState._( layout: layout, menuSidebarMode: menuSidebarMode, historySidebarMode: historySidebarMode, isMenuVisible: isMenuVisible, isHistoryVisible: isHistoryVisible, enableDarkMode: enableDarkMode, longPressSelectionIsDefault: longPressSelectionIsDefault, requireAuthentication: requireAuthentication, emailPayment: emailPayment, autoStartTasks: autoStartTasks, addDocumentsToInvoice: addDocumentsToInvoice, companyPrefs: companyPrefs.build()); } catch (_) { String _$failedField; try { _$failedField = 'companyPrefs'; companyPrefs.build(); } catch (e) { throw new BuiltValueNestedFieldError( 'PrefState', _$failedField, e.toString()); } rethrow; } replace(_$result); return _$result; } } class _$CompanyPrefState extends CompanyPrefState { @override final String accentColor; @override final BuiltList historyList; factory _$CompanyPrefState( [void Function(CompanyPrefStateBuilder) updates]) => (new CompanyPrefStateBuilder()..update(updates)).build(); _$CompanyPrefState._({this.accentColor, this.historyList}) : super._() { if (accentColor == null) { throw new BuiltValueNullFieldError('CompanyPrefState', 'accentColor'); } if (historyList == null) { throw new BuiltValueNullFieldError('CompanyPrefState', 'historyList'); } } @override CompanyPrefState rebuild(void Function(CompanyPrefStateBuilder) updates) => (toBuilder()..update(updates)).build(); @override CompanyPrefStateBuilder toBuilder() => new CompanyPrefStateBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; return other is CompanyPrefState && accentColor == other.accentColor && historyList == other.historyList; } @override int get hashCode { return $jf($jc($jc(0, accentColor.hashCode), historyList.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('CompanyPrefState') ..add('accentColor', accentColor) ..add('historyList', historyList)) .toString(); } } class CompanyPrefStateBuilder implements Builder { _$CompanyPrefState _$v; String _accentColor; String get accentColor => _$this._accentColor; set accentColor(String accentColor) => _$this._accentColor = accentColor; ListBuilder _historyList; ListBuilder get historyList => _$this._historyList ??= new ListBuilder(); set historyList(ListBuilder historyList) => _$this._historyList = historyList; CompanyPrefStateBuilder(); CompanyPrefStateBuilder get _$this { if (_$v != null) { _accentColor = _$v.accentColor; _historyList = _$v.historyList?.toBuilder(); _$v = null; } return this; } @override void replace(CompanyPrefState other) { if (other == null) { throw new ArgumentError.notNull('other'); } _$v = other as _$CompanyPrefState; } @override void update(void Function(CompanyPrefStateBuilder) updates) { if (updates != null) updates(this); } @override _$CompanyPrefState build() { _$CompanyPrefState _$result; try { _$result = _$v ?? new _$CompanyPrefState._( accentColor: accentColor, historyList: historyList.build()); } catch (_) { String _$failedField; try { _$failedField = 'historyList'; historyList.build(); } catch (e) { throw new BuiltValueNestedFieldError( 'CompanyPrefState', _$failedField, e.toString()); } rethrow; } replace(_$result); return _$result; } } class _$HistoryRecord extends HistoryRecord { @override final String id; @override final EntityType entityType; @override final int timestamp; factory _$HistoryRecord([void Function(HistoryRecordBuilder) updates]) => (new HistoryRecordBuilder()..update(updates)).build(); _$HistoryRecord._({this.id, this.entityType, this.timestamp}) : super._() { if (id == null) { throw new BuiltValueNullFieldError('HistoryRecord', 'id'); } if (entityType == null) { throw new BuiltValueNullFieldError('HistoryRecord', 'entityType'); } if (timestamp == null) { throw new BuiltValueNullFieldError('HistoryRecord', 'timestamp'); } } @override HistoryRecord rebuild(void Function(HistoryRecordBuilder) updates) => (toBuilder()..update(updates)).build(); @override HistoryRecordBuilder toBuilder() => new HistoryRecordBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; return other is HistoryRecord && id == other.id && entityType == other.entityType && timestamp == other.timestamp; } @override int get hashCode { return $jf( $jc($jc($jc(0, id.hashCode), entityType.hashCode), timestamp.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('HistoryRecord') ..add('id', id) ..add('entityType', entityType) ..add('timestamp', timestamp)) .toString(); } } class HistoryRecordBuilder implements Builder { _$HistoryRecord _$v; String _id; String get id => _$this._id; set id(String id) => _$this._id = id; EntityType _entityType; EntityType get entityType => _$this._entityType; set entityType(EntityType entityType) => _$this._entityType = entityType; int _timestamp; int get timestamp => _$this._timestamp; set timestamp(int timestamp) => _$this._timestamp = timestamp; HistoryRecordBuilder(); HistoryRecordBuilder get _$this { if (_$v != null) { _id = _$v.id; _entityType = _$v.entityType; _timestamp = _$v.timestamp; _$v = null; } return this; } @override void replace(HistoryRecord other) { if (other == null) { throw new ArgumentError.notNull('other'); } _$v = other as _$HistoryRecord; } @override void update(void Function(HistoryRecordBuilder) updates) { if (updates != null) updates(this); } @override _$HistoryRecord build() { final _$result = _$v ?? new _$HistoryRecord._( id: id, entityType: entityType, timestamp: timestamp); replace(_$result); return _$result; } } // ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new