0

I am using translator library in flutter import 'package:translator/translator.dart';

I'm trying to add this translation in my widget

child: ListTile(
                    title: Text(
                      translator.translate('Help', to :"it"),
                      style: TextStyle(fontSize: 15),
                    ),

But i get the convertion error i searched through several articles but could not find a fix fo it

The future is inside the text and it cant be converted

Codemania
  • 1
  • 2
  • Wrap the `Text ` widget into `FutureBuilder` – dm_tr Feb 26 '21 at 09:36
  • 1
    Does this answer your question? [What is a Future and how do I use it?](https://stackoverflow.com/questions/63017280/what-is-a-future-and-how-do-i-use-it) – nvoigt Feb 26 '21 at 10:11
  • @dm_tr `child: ListTile( title: FutureBuilder( Text( translator.translate('Help', to: Language.inUseLang.toString() ), style: TextStyle(fontSize: 15), ), ),` i wrapped it but still the same – Codemania Feb 26 '21 at 11:24

0 Answers0