flutter_sheet_localization icon indicating copy to clipboard operation
flutter_sheet_localization copied to clipboard

The getter 'localizations' isn't defined for the type 'BuildContext'.

Open kayson91 opened this issue 3 years ago • 2 comments

@override
  Widget build(BuildContext context) {
    final labels = context.localizations;
    return Scaffold(
      appBar: AppBar(
        title: Text('HomeScreen'),
        centerTitle: true,
      ),
      body: Text('HomeScreen'),
}

kayson91 avatar May 06 '21 12:05 kayson91

same here

ngockhanhbl avatar Jun 30 '21 07:06 ngockhanhbl

final labels = Localizations.of<AppLocalizationsData>(context, AppLocalizationsData);

You can try the above

azharul-islam avatar Jul 13 '21 12:07 azharul-islam