Try   HackMD

Flutter 基本介紹

tags: 技術分享 Flutter

撰寫dart原始碼會及時產生android檔案與ios檔案在各自資料夾

Framework框架(Dart):

平台:

  1. Marerial(android)
  2. Cupertino(ios)

元件(widgets):

  1. Stateless 無狀態(圖片、文字)
  2. stateful 有狀態(動畫、動作)

炫染

  1. Rendering(炫染)

動作

  1. Arimation(動畫)
  2. Painting(繪畫)
  3. Gestures(事件):長按、觸摸、放大等動作

Class

FloatingActionButton

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,        //按下後所做的動作
        tooltip: 'Increment',                //工具提示
        child: Icon(Icons.add),              //設定Icons
),

StatefulWidget(有狀態)與StatelessWidget(無狀態)

透過複寫createState()來創建狀態對象

//創建RandomWordsState實例
@override
RandomWordsState createState() => RandomWordsState(); 

RandomWordsState 實作 Widget(大部分程式碼都在這裡實作)