🚧 remove new keyword to get inline with dart 2 code standard.

This commit is contained in:
Nishant Srivastava
2019-07-23 03:42:56 +02:00
parent e8b433c00d
commit 6d56bfc5d4
45 changed files with 438 additions and 438 deletions

View File

@ -1,15 +1,15 @@
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
home: new MyButton(),
runApp(MaterialApp(
home: MyButton(),
));
}
class MyButton extends StatefulWidget {
@override
MyButtonState createState() {
return new MyButtonState();
return MyButtonState();
}
}
@ -27,22 +27,22 @@ class MyButtonState extends State<MyButton> {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Stateful Widget"),
return Scaffold(
appBar: AppBar(
title: Text("Stateful Widget"),
backgroundColor: Colors.green,
),
body: new Container(
child: new Center(
child: new Column(
body: Container(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text(displayedString, style: new TextStyle(fontSize: 40.0)),
new Padding(padding: new EdgeInsets.all(10.0)),
new RaisedButton(
child: new Text(
Text(displayedString, style: TextStyle(fontSize: 40.0)),
Padding(padding: EdgeInsets.all(10.0)),
RaisedButton(
child: Text(
"Press me",
style: new TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white),
),
color: Colors.red,
onPressed: onPressOfButton,