Open Davoodeh opened 4 years ago
Thanks for the kind words.
I don't see flutter create
as a priority because it's a one-time event in the lifecycle of a project, and could add significant maintenance burden (following upstream changes to the interface).
PRs are always welcome, though.
Thanks a lot! I leave this open in case somebody gets inspired to write it (or myself if I ever learn enough xD)
What about flutter pub run build_runner build
, which is quite common in generate JSON serialization code etc?
Or perhaps better, provide some hook point so we can customize commands for running before flutter run
(perhaps using project root as working directory)?
Thanks for the awesome package!
What about
flutter pub run build_runner build
, which is quite common in generate JSON serialization code etc?Or perhaps better, provide some hook point so we can customize commands for running before
flutter run
(perhaps using project root as working directory)?Thanks for the awesome package!
For those who have the same needs, my flutter package config is:
(defun my-flutter-build-run-watch ()
"Run `flutter pub run build_runner watch`."
(interactive)
(flutter--from-project-root
(let* ((buffer-name "*Flutter-build-runner-watch*")
(buffer (flutter--get-buffer-create buffer-name))
(alive (comint-check-proc buffer-name)))
(unless alive
(progn (apply #'make-comint-in-buffer "Flutter-build-runner-watch" buffer (flutter-build-command) nil '("pub" "run" "build_runner" "watch"))
(display-buffer buffer))))))
(defun my-flutter-run-or-hot-reload ()
"Run 'flutter run' or perform a hot reload, and open the *Flutter* buffer."
(interactive)
(my-flutter-build-run-watch)
(flutter-run-or-hot-reload)
(switch-to-buffer-other-window "*Flutter*"))
This opens a process buffer calling flutter pub run build_runner watch
in the first time flutter runs, and stays background watching file changes and generating code.
Hi, thanks for the incredible job here! Been using the package for a couple of days now. Just saw the package lacking some essential commands (in order to keep us in the Emacs only xD) (and since I'm a noob in writin Lisp thought I just come here and say what I think instead of making a Pull request).
Just the absence of a functions like: flutter-create is a big deal. (and pub) It would be nice to implement such commands in here too.