This is a quick note for me. It took me about 5 minutes to find a way to get the character at an index in a String. I didn’t know that String has [ ] operator. So I decided to write it here.
void main() {
final String coflutter = 'Coflutter';
print(coflutter[0]);
print(coflutter[coflutter.length - 1]);
}
// Output
C
r
Creator of Coflutter.
Founder & CTO at Bumbii Technology
Founder at Bumbii K12
Follow him on Twitter, Github, StackOverflow, LinkedIn, Upwork.