Skip to content

[Request]: make toMap() json compatible #949

@iapicca

Description

@iapicca

Plugin

device_info_plus

Use case

renaming toMap() as toJson would improve compatibility with dart:convert
see referece at https://api.dart.dev/be/175791/dart-convert/jsonEncode.html

If toEncodable is omitted, it defaults to a function that returns the result of calling .toJson() on the unencodable object.

Proposal

rename BaseDeviceInfo method toMap() as toJson() and to all overrides across the package

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions