First way to create dynamic variable is using 'dymaic' keywrod:
dynamic a = 123; a = '123';
Second way is using 'var' but unassign any value:
void main() { var a; a = '123'; }