You can do this by getting the first element of the String (indicated by index 0):
'${mystring[0]}'
example:
String mystring = 'Hello World';
print('${mystring[0]}');
in this case you will get as an output:
H
You can do this by getting the first element of the String (indicated by index 0):
'${mystring[0]}'
example:
String mystring = 'Hello World';
print('${mystring[0]}');
in this case you will get as an output:
H