Declare Variables with Dynamic Keyword in Dart

void main() {
	dynamic myVariable = 20;
	print("my variable: $myVariable");

	myVariable = 4.5;
	print("my variable: $myVariable");

	myVariable = true;
	print("my variable: $myVariable");

	myVariable = "acc1";
	print("my variable: $myVariable");

	myVariable = [1, 2, -4, 9];
	print("my variable: $myVariable");

	myVariable = ["Name 1", "Name 2", "Name 3"];
	print("my variable: $myVariable");

	myVariable = new DateTime(2024, 11, 20);
	print("my variable: $myVariable");
}  		  
my variable: 20
my variable: 4.5
my variable: true
my variable: acc1
my variable: [1, 2, -4, 9]
my variable: [Name 1, Name 2, Name 3]
my variable: 2024-11-20 00:00:00.000