0

Can we know at runtime if the code is running in a browser or on a server ?

By browser, I mean GUI, either javascript generated by dart2js or dartium. By server, I mean CLI.

LaGoutte
  • 418
  • 4
  • 13

1 Answers1

1

A pub package has been made for this case : is_client

you can look the code to help you if you don't want to use the package.

Vink
  • 1,267
  • 9
  • 13