-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor: Add toMap
and fromMap
functions in app_info_extractor.dart
#245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's stay consistent with naming for the fromJson
and toJson
:)
@@ -23,4 +23,18 @@ class AppInfo { | |||
final String packageName; | |||
final String version; | |||
final String buildNumber; | |||
|
|||
AppInfo fromMap(Map<String, dynamic> json) => AppInfo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppInfo fromMap(Map<String, dynamic> json) => AppInfo( | |
AppInfo fromJson(Map<String, dynamic> json) => AppInfo( |
version: json['version'] as String? ?? '', | ||
); | ||
|
||
Map<String, dynamic> toMap() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map<String, dynamic> toMap() => { | |
Map<String, dynamic> toJson() => { |
Added these functions so that we can save some app version information to plain data storage