App displays list on desktop web but not on physical device.

Widgets & Design

App works perfectly in test mode and from web publishing to the desktop to display a list from a custom action return variable, but the list does not show on the iPhone or iPad from Safari or Chrome. The action code is from flutter_tts to display a list of voices from a getVoices method.

getVoices Code:

import 'package:flutter_tts/flutter_tts.dart';

Future<List<String>> getVoices() async {

// Add your function code here!


FlutterTts flutterTts = FlutterTts();

List<dynamic> voices = await FlutterTts().getVoices;

List<String> voiceNames = [];

for (var voice in voices) {

if (voice['name'].contains("United States")) {

voiceNames.add(voice['name'].substring(10));

}

}

return voiceNames;

}

What have you tried so far?

If I make a static list in a Page State variable and generate the listview children from that list, it works perfectly on desktop and iPhone. If I tie the list view to the action return variable directly, I get a Builder Error, but the list shows on the desktop when I call the action but does not show on the physical devices. If I use the action return to update the Page State, then generate the listview children from the Page State, that eliminates the Builder Error and again works perfectly on the desk web, but not on the devices. Using a text field for the list items.

Did you check FlutterFlow's Documentation for this topic?
Yes
2
3 replies