diff --git a/packages/core/lib/event.dart b/packages/core/lib/event.dart index a94cf47..b8454ee 100644 --- a/packages/core/lib/event.dart +++ b/packages/core/lib/event.dart @@ -495,6 +495,7 @@ class ContextOS extends JSONExtendableImpl { class ContextNetwork extends JSONExtendableImpl { bool cellular; bool wifi; + @JsonKey(defaultValue: false) bool bluetooth; ContextNetwork(this.cellular, this.wifi, this.bluetooth, {super.custom}); diff --git a/packages/core/lib/event.g.dart b/packages/core/lib/event.g.dart index 63c67ad..f9f9461 100644 --- a/packages/core/lib/event.g.dart +++ b/packages/core/lib/event.g.dart @@ -459,7 +459,7 @@ ContextNetwork _$ContextNetworkFromJson(Map json) => ContextNetwork( json['cellular'] as bool, json['wifi'] as bool, - json['bluetooth'] as bool, + json['bluetooth'] as bool? ?? false, custom: json['custom'] as Map?, );