1. 程式人生 > 其它 >AndroidStudio開發Flutter使用技巧

AndroidStudio開發Flutter使用技巧

  1. 快速建立Widget:在dart檔案中輸入stf或stl出現提示後按回車即可
  2. 快速修復:command + 1
  3. 自動生成建構函式:選中 final 引數,快捷鍵:option + 回車
  4. 新增父元件、變為子元件、刪除子元件:option+回車
  5. 萬能的搜尋:雙擊shift
  6. 檢視最近開啟的檔案:command + E
  7. 重新命名:fn+shift+f6
  8. 檢視當前類結構:command + fn + f12
  9. 檢視原始碼:將游標放到要檢視原始碼的類名或方法名上,長按command 然後的點選
  10. 檢視類的子類:選中要檢視的類,然後:command + B 或 option + command + B
  11. 將程式碼更新到模擬器上:選中模擬器然後 command + R
  12. 匯入類的快捷鍵:將游標放在要匯入類的上面,然後按 option + enter
  13. 前進後退:當跟蹤程式碼的時候,經常跳轉到其他類,後退快捷鍵:option+command+方向左鍵,前進快捷鍵:option+command+方向右鍵
  14. 全域性搜尋:command + shift + F
  15. 全域性替換:command + shift + R
  16. 查詢引用: option + shift + F7

備註:以上快捷鍵是AndroidStudio在MacOS的keymap,如果是windows系統,將command換成Ctrl,option換成Alt。