I am trying to place a FAQ in my flutter app and tried to run through the docs but is unsure how to use the "Platform.isAndroid" and "Platform.isiOS" to display different flutter texts for different platform.
Source: https://docs.flutter.dev/resources/platform-adaptations
ListTile(
title: Text('1. What is a question?'),
subtitle: Text('This is the first answer to Android. || This is the second answer to iOS.'),
),
Any guidance?
2
Answers
After a few mingling around, I found this solution.
Why not just declare a text variable, and use Platform, with an if/else block (or switch/case block) to assign it’s value?