Skip to content

Intl.withLocale('pt_BR' ignored by flutterflow #6840

@henrisouzarj

Description

@henrisouzarj

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

Hi, created a Custom Action in FlutterFlow to parse DateTime with specific locale using this simple and basic code:

Intl.withLocale('pt_BR', () {
print(DateFormat('dd/MM/yyyy HH:mm', 'pt_BR').parse('26/01/2026 00:00').toUtc());
});

This code works OK in dartpad.dev and is ignored when added in a custom action.
Response in flutterflow=I/flutter (12633): 2026-01-26 00:00:00.000Z
Response in dartpad.dev=2026-01-26 03:00:00.000Z (that´s the correct response!)}}

I also tried using await initializeDateFormatting('pt_BR', null) and not works. The flutterflow stay fixed in Android Emulator Timezone. That violates mu business rules because this string conversion to datetime needs ever to consider the region from the product localization / timezone.

Expected Behavior

The correct response considering the pt_BR informed is 2026-01-26 03:00:00.000Z.
Works Ok in dartpad.dev. And not Ok in flutterflow.

Steps to Reproduce

  1. Run the code shown in this issue both in FlutterFlow and on dartpad.dev. You will see the difference.
    Or execute the app test that I prepared. Its here: ProjectLink Test for ISSUE: https://app.flutterflow.io/project/locale-issue-spsq41?tab=uiBuilder&page=HomePage

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

IT4ojMmAx5dOsdhE1aX2Y8dVmSQWQkg1aoEsmspOGDsdF4iuPOxzac77TFVvONTgTW9DKEWL+UME3M3IhtrDA/YVEAWBbJh+yId1FhbjUji/aoSVDqmObWt9EftVCB2E0KSJux5DHPJZWkFh3Tv3P+mvUgrrNrn7Zwh9f6PHaOI=

Visual documentation

Image

Environment

- FlutterFlow version: 
- Platform:
- Browser name and version:
- Operating system and version affected:

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions