Skip to content

Wrong country_code in parse result #94

@tchouaffe

Description

@tchouaffe

Here the documentation of the parse method as of version 2.5.1:

/// Parse a single string and return a map in the format below. Throws an error if the
  /// number is not a valid e164 phone number.
  ///
  /// Given a passed [phone] like '+4930123123123', the response will be:
  /// ```
  /// {
  ///   country_code: 49,
  ///   e164: '+4930123123123',
  ///   national: '030 123 123 123',
  ///   type: 'mobile',
  ///   international: '+49 30 123 123 123',
  ///   national_number: '030123123123',
  /// }
  /// ```
  Future<Map<String, dynamic>> parse(
    final String phone, {
    final String? region,
  }) async {
    throw UnimplementedError('parse() has not been implemented.');
  }

As you can see, the country_code is 49 instead of DE. 49 is the phone_code.
Hopefully you will have the time to correct this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions