Skip to content

Commit 4a1fd38

Browse files
authored
Add documentation to embedder locale callback (flutter#25437)
The FlutterComputePlatformResolvedLocaleCallback does not pass the standard user_data baton. This was an unintentional omission in the original patch. Add documentation to that effect and link to the bug report: flutter#79826
1 parent d338154 commit 4a1fd38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

shell/platform/embedder/embedder.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,14 @@ typedef struct {
11211121
const char* variant_code;
11221122
} FlutterLocale;
11231123

1124+
/// Callback that returns the system locale.
1125+
///
1126+
/// Embedders that implement this callback should return the `FlutterLocale`
1127+
/// from the `supported_locales` list that most closely matches the
1128+
/// user/device's preferred locale.
1129+
///
1130+
/// This callback does not currently provide the user_data baton.
1131+
/// https://github.com/flutter/flutter/issues/79826
11241132
typedef const FlutterLocale* (*FlutterComputePlatformResolvedLocaleCallback)(
11251133
const FlutterLocale** /* supported_locales*/,
11261134
size_t /* Number of locales*/);

0 commit comments

Comments
 (0)