728x90
새 플러터 프로젝트 생성
or
명령어
flutter create 프로젝트이름
프로젝트 생성 후
lib >main.dart 에 있는 기존 코드들은 다 지우고 아래의 코드로 붙여넣어줍니다.
// Copyright 2018 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Welcome to Flutter',
home: Scaffold(
appBar: AppBar(
title: const Text('Welcome to Flutter'),
),
body: const Center(
child: Text('Hello world'),
),
),
);
}
}
Flutter 실행(run)
코드 상단의 Run 클릭
명령어
flutter run
Emulator 실행
mac일 경우 참고
728x90
반응형
'Develop > Flutter' 카테고리의 다른 글
[Flutter #4] Firebase연동하기2- firestore cloud (0) | 2021.07.16 |
---|---|
[Flutter #3] Firebase 연동하기(android) 1 (0) | 2021.07.16 |
[Flutter ❌] Null safety관련 error해결! (2) | 2021.07.08 |
[Flutter #1] SDK설치 부터 환경설정까지(windows) (0) | 2021.06.28 |
[Flutter #0] Hello Flutter👋 (2) | 2021.06.27 |
댓글