Please enable Developer Mode in your system settings. flutter code example
Example: flutter desktop support
$ flutter channel dev
$ flutter upgrade
$ flutter config --enable-<platform>-desktop
$ flutter channel dev
$ flutter upgrade
$ flutter config --enable-<platform>-desktop