Starting out with Flutter Docs

Dear Forum,

starting out, I wonder if there is a way to transform the integrated dartpad´s code examples (from Flutter Docs) into Visual Studio Code projects? It´s not meant to just copy paste the code into main.dart in a newly created VSC project, as I would understand it.

The Write your First Flutter App (Codelab) youtube tutorial starts out exchanging code from the default project and replacing it with code from flutter docs.

What are the precautions to keep in mind here?

The beginner tutorials are well done as well as the documentation. Could you bridge my gap for me here?
Visual Studio code is setup and running for flutter though.

Thank you!

No precautions needed. The dartpad examples can be copied as-is, replacing the entire main.dart of the sample app. The only complication is if it imports some of the permitted packages, in which case you’ll need to add those to your pubspec.yaml. (You’d notice this if the import failed at the top of the file.)

1 Like

It works fine by now.
Thank you for the quick help!

1 Like