insert():
- to add element in a list
void main() {
var one = [1, 2, 3, 4, 5, 6];
one.insert(2, 3);
print(one);
}
[1, 2, 3, 3, 4, 5, 6]
Exited.
void main() {
var one = [1, 2, 3, 4, 5, 6];
one.insert(2, 3);
print(one);
}
[1, 2, 3, 3, 4, 5, 6]
Exited.