<address id="r9vd9"><address id="r9vd9"><listing id="r9vd9"></listing></address></address>

      歡迎您光臨深圳塔燈網絡科技有限公司!
      電話圖標 余先生:13699882642

      網站百科

      為您解碼網站建設的點點滴滴

      flutter初體驗:環境配置

      發表日期:2018-12 文章編輯:小燈 瀏覽次數:2379

      前言

      Flutter是谷歌的移動UI框架,可以快速在iOS和Android上構建高質量的原生用戶界面。 Flutter可以與現有的代碼一起工作。在全世界,Flutter正在被越來越多的開發者和組織使用,并且Flutter是完全免費、開源的。

      • 快速開發
        • 毫秒級的熱重載,修改后,您的應用界面會立即更新。使用豐富的、完全可定制的widget在幾分鐘內構建原生界面。
      • 富有表現力和靈活的UI
        • 快速發布聚焦于原生體驗的功能。分層的架構允許您完全自定義,從而實現難以置信的快速渲染和富有表現力、靈活的設計。
      • 原生性能
        • Flutter包含了許多核心的widget,如滾動、導航、圖標和字體等,這些都可以在iOS和Android上達到原生應用一樣的性能。

      官方說的這么牛x,能不了解一下嗎!本系列為本人學習flutter的學習筆記,重在記錄學習中遇到的問題。

      環境配置

      Flutter 1.0.0
      Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
      Xcode Version 10.1 (10B61)
      IntelliJ IDEA 2018.3.2 (Ultimate Edition)
      VS Code 1.30.1 (1.30.1)

      安裝與環境搭建

      參考flutter中文網或者自行Google,前人之述備矣,此處不再贅述。

      配置編輯器

      本人為iOS開發,未安裝過Android Studio,所以不具備安卓開發環境。
      為了親自體驗一下不同編輯器,所以安裝了IntelliJ IDEA 和 VS Code體驗flutter開發。VS Code的配置參考官方教程。IntelliJ IDEA的配置參考官方教程。IntelliJ IDEA需要安裝flutter和dart插件,在IntelliJ IDEA安裝插件需要翻墻,也可以去官方插件庫搜索插件從磁盤安裝。從磁盤安裝插件極有可能重啟應用后報錯閃退,修復方法是在應用目錄下~/Library/Application Support/<PRODUCT><VERSION>中把安裝的插件刪除即可。推薦翻墻從應用內搜索插件安裝插件。

      [圖片上傳中...(WX20181228-112812@2x.png-e23a9d-1545968380976-0)]

      常用命令

      • flutter doctor: 堅持flutter開發環境信息.
      • flutter create: 創建一個新的flutter項目.
      • flutter run: 在已運行的設備上運行flutter應用.

      更多命令直接運行flutter進行查看。

      Global options: -h, --helpPrint this usage information. -v, --verbose Noisy logging, including all shell commands executed. If used with --help, shows hidden options.-d, --device-id Target device id or name (prefixes allowed). --version Reports the version of this tool. --suppress-analyticsSuppress analytics reporting when this command runs. --bug-reportCaptures a bug report file to submit to the Flutter team. Contains local paths, device identifiers, and log snippets.--packagesPath to your ".packages" file. (required, since the current directory does not contain a ".packages" file)Available commands: analyzeAnalyze the project's Dart code. attach Attach to a running application. bash-completionOutput command line shell completion setup scripts. buildFlutter build commands. channelList or switch flutter channels. cleanDelete the build/ directory. config Configure Flutter settings. create Create a new Flutter project. devicesList all connected devices. doctor Show information about the installed tooling. driveRuns Flutter Driver tests for the current project. emulatorsList, launch and create emulators. format Format one or more dart files. help Display help information for flutter. installInstall a Flutter app on an attached device. logs Show log output for running Flutter apps. make-host-app-editable Moves host apps from generated directories tonon-generated directories so that they can be editedby developers. packages Commands for managing Flutter packages. precache Populates the Flutter tool's cache of binaryartifacts. runRun your Flutter app on an attached device. screenshot Take a screenshot from a connected device. stop Stop your Flutter app on an attached device. test Run Flutter unit tests for the current project. traceStart and stop tracing for a running Flutter app. upgradeUpgrade your copy of Flutter.

      快速開始

      終端

      終端在適合的目錄下運行flutter create flutter_app創建一個名為flutter_app的應用。

      IntelliJ IDEA

      從Flutter入門應用程序模板創建一個新的Flutter IntelliJ項目:

      1. 在IntelliJ中,在 ‘Welcome’ 窗口點擊 Create New Project
      2. 或者在主界面 File>New>Project…
      3. 在菜單中選擇 Flutter , 然后點擊 Next.
      4. 輸入Project name 和 Project location,點擊 Finish.

      VS Code

      從Flutter入門應用程序模板創建一個新的Flutter項目:

      1. 打開 Command Palette (Ctrl+Shift+P (Cmd+Shift+P on macOS)).
      2. 選擇 Flutter: New Project命令并回車。
      3. 輸入Project name 和 Project location

      開發工具簡單應用教程

      在IDE中開發Flutter應用

      英文還可以的同學參考官方的英文教程,官方提供了Android Studio / IntelliJ和VS Code的簡單開發教學。

      IntelliJ中直接在頂部工具欄就可以操做,VS Code按F5運行項目并顯示工具欄。


      相關參考

      flutter中文網
      在IDE中開發Flutter應用


      本頁內容由塔燈網絡科技有限公司通過網絡收集編輯所得,所有資料僅供用戶學習參考,本站不擁有所有權,如您認為本網頁中由涉嫌抄襲的內容,請及時與我們聯系,并提供相關證據,工作人員會在5工作日內聯系您,一經查實,本站立刻刪除侵權內容。本文鏈接:http://www.webpost.com.cn/18167.html
      上一篇:flutter安裝 下一篇:Mac Flutter 環境安裝
      相關APP開發
       八年  行業經驗

      多一份參考,總有益處

      聯系深圳網站公司塔燈網絡,免費獲得網站建設方案及報價

      咨詢相關問題或預約面談,可以通過以下方式與我們聯系

      業務熱線:余經理:13699882642

      Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.    

      国产成人精品综合在线观看