Skip to content

Commit c3d90db

Browse files
committed
chore: Remove comments.
1 parent 62c5168 commit c3d90db

File tree

1 file changed

+1
-57
lines changed

1 file changed

+1
-57
lines changed

lib/main.dart

+1-57
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,11 @@ void main() {
99
class MyApp extends StatelessWidget {
1010
const MyApp({super.key});
1111

12-
// This widget is the root of your application.
1312
@override
1413
Widget build(BuildContext context) {
1514
return MaterialApp(
1615
title: 'Flutter Demo',
1716
theme: ThemeData(
18-
// This is the theme of your application.
19-
//
20-
// TRY THIS: Try running your application with "flutter run". You'll see
21-
// the application has a blue toolbar. Then, without quitting the app,
22-
// try changing the seedColor in the colorScheme below to Colors.green
23-
// and then invoke "hot reload" (save your changes or press the "hot
24-
// reload" button in a Flutter-supported IDE, or press "r" if you used
25-
// the command line to start the app).
26-
//
27-
// Notice that the counter didn't reset back to zero; the application
28-
// state is not lost during the reload. To reset the state, use hot
29-
// restart instead.
30-
//
31-
// This works for code too, not just values: Most code changes can be
32-
// tested with just a hot reload.
3317
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
3418
useMaterial3: true,
3519
),
@@ -41,15 +25,6 @@ class MyApp extends StatelessWidget {
4125
class MyHomePage extends StatefulWidget {
4226
const MyHomePage({super.key, required this.title});
4327

44-
// This widget is the home page of your application. It is stateful, meaning
45-
// that it has a State object (defined below) that contains fields that affect
46-
// how it looks.
47-
48-
// This class is the configuration for the state. It holds the values (in this
49-
// case the title) provided by the parent (in this case the App widget) and
50-
// used by the build method of the State. Fields in a Widget subclass are
51-
// always marked "final".
52-
5328
final String title;
5429

5530
@override
@@ -61,50 +36,19 @@ class _MyHomePageState extends State<MyHomePage> {
6136

6237
void _incrementCounter() {
6338
setState(() {
64-
// This call to setState tells the Flutter framework that something has
65-
// changed in this State, which causes it to rerun the build method below
66-
// so that the display can reflect the updated values. If we changed
67-
// _counter without calling setState(), then the build method would not be
68-
// called again, and so nothing would appear to happen.
6939
_counter++;
7040
});
7141
}
7242

7343
@override
7444
Widget build(BuildContext context) {
75-
// This method is rerun every time setState is called, for instance as done
76-
// by the _incrementCounter method above.
77-
//
78-
// The Flutter framework has been optimized to make rerunning build methods
79-
// fast, so that you can just rebuild anything that needs updating rather
80-
// than having to individually change instances of widgets.
8145
return Scaffold(
8246
appBar: AppBar(
83-
// TRY THIS: Try changing the color here to a specific color (to
84-
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
85-
// change color while the other colors stay the same.
8647
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
87-
// Here we take the value from the MyHomePage object that was created by
88-
// the App.build method, and use it to set our appbar title.
8948
title: Text(widget.title),
9049
),
9150
body: Center(
92-
// Center is a layout widget. It takes a single child and positions it
93-
// in the middle of the parent.
9451
child: Column(
95-
// Column is also a layout widget. It takes a list of children and
96-
// arranges them vertically. By default, it sizes itself to fit its
97-
// children horizontally, and tries to be as tall as its parent.
98-
//
99-
// Column has various properties to control how it sizes itself and
100-
// how it positions its children. Here we use mainAxisAlignment to
101-
// center the children vertically; the main axis here is the vertical
102-
// axis because Columns are vertical (the cross axis would be
103-
// horizontal).
104-
//
105-
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
106-
// action in the IDE, or press "p" in the console), to see the
107-
// wireframe for each widget.
10852
mainAxisAlignment: MainAxisAlignment.center,
10953
children: <Widget>[
11054
const Text(
@@ -121,7 +65,7 @@ class _MyHomePageState extends State<MyHomePage> {
12165
onPressed: _incrementCounter,
12266
tooltip: 'Increment',
12367
child: const Icon(Icons.add),
124-
), // This trailing comma makes auto-formatting nicer for build methods.
68+
),
12569
);
12670
}
12771
}

0 commit comments

Comments
 (0)