— i need to add change language option to change language in dynamic.
— not a create particular language json file to change language.
— change language in all app using flutter
— i need to change application language in our app in dynamically
— i am trying to create this extention to change language but it can been change properly
AutoLocalBuilder translates({
TextAlign? textAlign,
TextStyle? style,
int? maxLines,
TextOverflow? overflow,
}) {
return AutoLocalBuilder(
text: [this],
builder: (tw) {
return Text(
tw.get(this),
overflow: overflow,
maxLines: maxLines,
style: style,
textAlign: textAlign,
);
});
}
}`
2
Answers
If you still face issues, consider using an alternative package for sharing in Flutter. There are several packages available, such as url_launcher or flutter_share. Make sure to follow the documentation and installation instructions for the chosen package.
It looks like you’re trying to create an extension method in Flutter for dynamically changing the language of your app. To achieve this, you can use the Localizations class along with Locale to dynamically change the language.