Hey Darting Developers, I want to Seek help. I am Currently Making a Emoji Translator, here i am Getting a Problem that,
List emojis = [
["Happy", "Smile", "Wink", "Tickle"],
["Silent", "Depressed", "Cry", "Sad"],
["lichi", "apple", "kiwi", "Banana"]];
How to Get Three Items and then Get out of loop and Get inside the another List. and so on. This Question is Bit hard to Understand, but I need to Seek help.
An option is to map over the emojis 2D list and take the first 3 elements.
final emojis = [
["Happy", "Smile", "Wink", "Tickle"],
["Silent", "Depressed", "Cry", "Sad"],
["lichi", "apple", "kiwi", "Banana"]
];
final transformedList = emojis.map((sublist) => sublist.take(3).toList());