Search code examples
flutterdartpadleft

Why is no padLeft function in my flutter?


My dart is Dart SDK version: 2.10.4 (stable) (Wed Nov 11 13:35:58 2020 +0100) on "windows_x64", but I can't use padLeft(), does anyone tell me why? what can I do next?

enter image description here


Solution

  • I have no experience in Dart but isn’t toString supposed to be a method? If so, you have to add parenthesis after its name like this: id.toString().