Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parses DateTime throws error. #21

Open
marcusedu opened this issue Sep 14, 2021 · 1 comment · May be fixed by #22
Open

Parses DateTime throws error. #21

marcusedu opened this issue Sep 14, 2021 · 1 comment · May be fixed by #22

Comments

@marcusedu
Copy link

The plugin does not handle DateTime parser correctly

class Person{
  String? name;
  DateTime? birthday;
  // Constructos and other relevant code.
  factory Person.fromMap(Map<String, dynamic> map){
    return Person(
        name: map['name'] as String?,
        birthday: DateTime.tryParse(map['birthday']), // Use this instead of map['birthday'] as DateTime
      );
  }
}
@marcusedu marcusedu linked a pull request Sep 14, 2021 that will close this issue
@nomoruyi
Copy link

nomoruyi commented Feb 2, 2024

Is anyone still working on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants