skip to Main Content

— 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


  1. Chosen as BEST ANSWER

    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.


  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search