Skip to content

Flutter 3.35 + @Preview function is not working with EasyLocalization #774

@sejun2

Description

@sejun2
@Preview(name: 'Disconnected Device Screen', size: Size(800, 500))
Widget disconnectedDeviceScreenPreview() {
  return MaterialApp(
    home: EasyLocalization(
      supportedLocales: const [Locale('en', 'US'), Locale('ko', 'KR')],
      path: 'assets/translations',
      fallbackLocale: const Locale('ko', 'KR'),
      child: const DisconnectedDeviceScreen(),
    ),
  );
}
Image

It shows that LateInitializationError ( _deviceLocale has nat been initilaized.)

Any updates for this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions