安裝 Flutter 以及使用 VS Code

setup

  • flutter
    • 跟著官方下載
    • terminal執行以下指令
      cd ~/development
      unzip ~/Downloads/flutter_macos_arm64_3.3.2-stable.zip
      export PATH="$PATH:`pwd`/flutter/bin"
  • VS code
import 'package:flutter/material.dart'

void main(){
var appTitle = Text('my first Flutter App');

var hiFlutter = Text('Hi, Flutter.', style: TextStyle(fontSize: 30));

var appBody = Center(child: hiFlutter,);

var appBar = AppBar(title: appTitle, );

var app = MaterialApp(
home: Scaffold(
appBar: appBar,
body: appBody,
),
);

runApp(app);

}