Skip to content

Commit

Permalink
Make device enumeration an internal API
Browse files Browse the repository at this point in the history
  • Loading branch information
amake committed Aug 11, 2023
1 parent 36ee096 commit 64b3f50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flutter.el
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ args."
args
(display-buffer buffer)))

(defun flutter-devices ()
(defun flutter--devices ()
"Return an alist of devices in (name . ID) format."
(let* ((output (shell-command-to-string "flutter devices --machine"))
(vec (json-read-from-string output)))
Expand All @@ -274,7 +274,7 @@ args."
(defun flutter-run-device (device-id)
"Start `flutter run` with DEVICE-ID."
(interactive
(list (let* ((collection (flutter-devices))
(list (let* ((collection (flutter--devices))
(choice (completing-read "Device: " collection)))
(cdr (assoc choice collection)))))
(flutter-run (format "-d %s" device-id)))
Expand Down

0 comments on commit 64b3f50

Please sign in to comment.