MaterialApp안에 다넣어
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp()); /* 앱 구동 시켜주세요 MyApp()에 메인메이지 넣어주면됨 */
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
/* 실제 내용은 여기 안에 */
return MaterialApp(
/* 위젯은 보통 대문자로 시작하고 뒤에 소괄호 */
home: Scaffold(
appBar: AppBar(), /* 상단 위젯 */
body: Container(), /* 중간 위젯 */
bottomNavigationBar: BottomAppBar( child: Text('test')), /* 하단 위젯 */
)
);
}
}