Skip to content

Instantly share code, notes, and snippets.

@rashmi1821
Created July 7, 2023 09:21
Show Gist options
  • Save rashmi1821/45928ec707be26c8030c12eeb98d4ecd to your computer and use it in GitHub Desktop.
Save rashmi1821/45928ec707be26c8030c12eeb98d4ecd to your computer and use it in GitHub Desktop.
glorious-oak-4373
// void main() {
// greetName(name: 'ras', message: 'hello');
// }
// void greetName({String name, String message}) {
// print('$name, $message');
// }
var name = 'rashmi';
int age = 12;
var arr = [10, 15, 20,25,25] ;
void main(){
print(name);
print(age);// array(list)
print(arr);
arr.add(30);//adding the 30 to the original list
print(arr);
arr[2]=60; // replaceing the 60 value in the 2 index
print(arr);
arr.insertAll(0,[1,2,3]); // adding 123 to the index 0 in the original list
print(arr);
arr.insert(3,4);// replace the value 10 to 4 using the index value 3 to the original list
print(arr);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment