1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] How do you pass arguments from command line to main in Flutter/Dart?

Discussão em 'Mobile' iniciado por Stack, Outubro 2, 2024 às 07:22.

  1. Stack

    Stack Membro Participativo

    How would you run a command and pass some custom arguments with Flutter/Dart so they can then be accessed in the main() call such as:

    flutter run -device [my custom arg]


    So then I can access it with:

    void main(List<String> args) {
    print(args.toString());
    }


    Thank you.

    Continue reading...

Compartilhe esta Página