🚧 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,34 +1,34 @@
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
home: new MyHome(),
runApp(MaterialApp(
home: MyHome(),
));
}
class MyHome extends StatefulWidget {
@override
MyHomeState createState() => new MyHomeState();
MyHomeState createState() => MyHomeState();
}
class MyHomeState extends State<MyHome> {
// Generate dialog
AlertDialog dialog = new AlertDialog(
content: new Text(
AlertDialog dialog = AlertDialog(
content: Text(
"Hello World!",
style: new TextStyle(fontSize: 30.0),
style: TextStyle(fontSize: 30.0),
));
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Using Alert Dialog"),
return Scaffold(
appBar: AppBar(
title: Text("Using Alert Dialog"),
),
body: new Container(
child: new Center(
child: new RaisedButton(
child: new Text("Hit to alert!"),
body: Container(
child: Center(
child: RaisedButton(
child: Text("Hit to alert!"),
// On press of the button
onPressed: () {
// Show dialog