
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
안녕하세요
다음과 같은 에러 메세지가 나오면서 에뮬레이터 연결이 끊겼다고 하는데요. xcode 를 다시 실행하려고 해도 안되네요. MaterialApp ( 매치되는 곳이 어딘지 모르겠어요. 몇 군데 닫아보았는데 여전히 안되고요.
에러 메세지 2개
: Error: Can't find ')' to match '('.
lib/main.dart:12
return MaterialApp(
^
Restarted application in 6,276ms.
Lost connection to device.
Exited
: Error: Can't find ')' to match '('.
lib/main.dart:12
return MaterialApp(
^
Restarted application in 6,276ms.
Lost connection to device.
Exited
작성한 코드
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(),
body: Column(
children: [
Text(
"hello flutter",
style: TextStyle(fontSize: 30, color: Colors.blue
),
),
TextField(),
],
),
);
}
}
이렇게도 해봤는데 같은 에러 메세지가 나오고요
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(),
body: Column(
children: [
Text(
"hello flutter",
style: TextStyle(fontSize: 30, color: Colors.blue),
),
TextField(),
],
),
),
),
}
}
작성한 코드 및 에러 메세지
