Skip to content

Commit

Permalink
feat: null-safety for 3.5.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Sep 8, 2021
1 parent e5f42b2 commit 892054e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
18 changes: 10 additions & 8 deletions lib/src/classes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ part 'classes.g.dart';
Color _$ColorFromJson(Map<String, dynamic> json) => Color.fromRGBO(
json['red'] as int, json['green'] as int, json['blue'] as int, 1.0);

Map<String, dynamic> _$ColorToJson(Color instance) => <String, dynamic>{
'red': instance.red,
'green': instance.green,
'blue': instance.blue,
};
Map<String, dynamic>? _$ColorToJson(Color? instance) => instance != null
? <String, dynamic>{
'red': instance.red,
'green': instance.green,
'blue': instance.blue,
}
: null;

/// The UserInfo class.
@JsonSerializable(explicitToJson: true)
Expand Down Expand Up @@ -1597,14 +1599,14 @@ class AudioRecordingConfiguration {
@JsonSerializable(explicitToJson: true)
class VirtualBackgroundSource {
@JsonKey(includeIfNull: false)
VirtualBackgroundSourceType backgroundSourceType;
VirtualBackgroundSourceType? backgroundSourceType;

@JsonKey(
includeIfNull: false, fromJson: _$ColorFromJson, toJson: _$ColorToJson)
Color color;
Color? color;

@JsonKey(includeIfNull: false)
String source;
String? source;

/// Constructs a [VirtualBackgroundSource]
VirtualBackgroundSource({this.backgroundSourceType, this.color, this.source});
Expand Down
2 changes: 1 addition & 1 deletion lib/src/classes.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions lib/src/enum_converter.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,10 @@ class RtcEngineEventHandler {
UploadLogResultCallback? uploadLogResult;

/// TODO:(doc)
EmptyCallback airPlayIsConnected;
EmptyCallback? airPlayIsConnected;

/// TODO:(doc)
VirtualBackgroundSourceEnabledCallback virtualBackgroundSourceEnabled;
VirtualBackgroundSourceEnabledCallback? virtualBackgroundSourceEnabled;

/// Constructs a [RtcEngineEventHandler]
RtcEngineEventHandler({
Expand Down

0 comments on commit 892054e

Please sign in to comment.