Skip to content

Commit 82612b9

Browse files
authored
Merge pull request #1 from harchani-ritik/master
First flutter contribution
2 parents 0c97a5a + 5041e11 commit 82612b9

File tree

1 file changed

+52
-45
lines changed

1 file changed

+52
-45
lines changed

0-First-Project/lib/main.dart

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,65 @@ import 'package:flutter/material.dart';
33
void main() => runApp(MyApp());
44

55
class MyApp extends StatelessWidget {
6-
@override
7-
Widget build(BuildContext context) {
8-
return MaterialApp(
9-
title: 'Flutter Demo',
10-
theme: ThemeData( primarySwatch: Colors.blue ),
11-
home: MyHomePage(title: 'Flutter Demo Home Page'),
12-
);
13-
}
6+
@override
7+
Widget build(BuildContext context) {
8+
return MaterialApp(
9+
title: 'Flutter Demo',
10+
theme: ThemeData(primarySwatch: Colors.red),
11+
home: MyHomePage(title: 'Flutter Demo Home Page'),
12+
);
13+
}
1414
}
1515

1616
class MyHomePage extends StatefulWidget {
17-
MyHomePage({Key key, this.title}) : super(key: key);
18-
final String title;
17+
MyHomePage({Key key, this.title}) : super(key: key);
18+
final String title;
1919

20-
@override
21-
_MyHomePageState createState() => _MyHomePageState();
20+
@override
21+
_MyHomePageState createState() => _MyHomePageState();
2222
}
2323

2424
class _MyHomePageState extends State<MyHomePage> {
25-
int _counter = 0;
25+
int _counter = 0;
2626

27-
void _incrementCounter() {
28-
setState(() {
29-
_counter++;
30-
});
31-
}
27+
void _incrementCounter() {
28+
setState(() {
29+
_counter++;
30+
});
31+
}
3232

33-
@override
34-
Widget build(BuildContext context) {
35-
return Scaffold(
36-
appBar: AppBar(
37-
title: Text(widget.title),
38-
),
39-
body: Center(
40-
child: Column(
41-
mainAxisAlignment: MainAxisAlignment.center,
42-
children: <Widget>[
43-
Text(
44-
'You have pushed the button this many times:',
45-
),
46-
Text(
47-
'$_counter',
48-
style: Theme.of(context).textTheme.display1,
49-
),
50-
],
51-
),
52-
),
53-
floatingActionButton: FloatingActionButton(
54-
onPressed: _incrementCounter,
55-
tooltip: 'Increment',
56-
child: Icon(Icons.add),
57-
),
58-
);
59-
}
33+
@override
34+
Widget build(BuildContext context) {
35+
return Scaffold(
36+
appBar: AppBar(
37+
title: Text(widget.title),
38+
),
39+
body: Center(
40+
child: Column(
41+
mainAxisAlignment: MainAxisAlignment.center,
42+
children: <Widget>[
43+
Padding(
44+
padding: const EdgeInsets.all(16.0),
45+
child: Text(
46+
'Hello BaseMax! It\'s an honour to make PR in your Repo\n ',
47+
style: TextStyle(fontSize: 12, color: Colors.red.shade900),
48+
),
49+
),
50+
Padding(
51+
padding: const EdgeInsets.all(12.0),
52+
child: Text(
53+
'$_counter',
54+
style: Theme.of(context).textTheme.display1,
55+
),
56+
),
57+
],
58+
),
59+
),
60+
floatingActionButton: FloatingActionButton(
61+
onPressed: _incrementCounter,
62+
tooltip: 'Increment',
63+
child: Icon(Icons.add),
64+
),
65+
);
66+
}
6067
}

0 commit comments

Comments
 (0)