Created
December 29, 2020 19:33
-
-
Save timsneath/4cda7e8abacbcf015f332a9c77248623 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Colors { red, black } | |
class Tajwid { | |
String text; | |
Colors color; | |
Tajwid({this.text, this.color}); | |
} | |
String arabicText = "يَهْدِيْكُمُ اللَّهُ وَيُصْلِحُ بَالَكُمُ"; | |
List<Tajwid> listTajwid = new List<Tajwid>(); | |
void main() { | |
Tajwid tajwid1 = new Tajwid(); | |
tajwid1.text = arabicText.substring(0, 5); | |
tajwid1.color = Colors.black; | |
listTajwid.add(tajwid1); | |
Tajwid tajwid2 = new Tajwid(); | |
tajwid2.text = arabicText.substring(5, 15); | |
tajwid2.color = Colors.red; | |
listTajwid.add(tajwid2); | |
Tajwid tajwid3 = new Tajwid(); | |
tajwid3.text = arabicText.substring(15, arabicText.length); | |
tajwid3.color = Colors.black; | |
listTajwid.add(tajwid3); | |
print(arabicText.length); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment