🚧 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,30 +1,30 @@
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
home: new MyApp(),
runApp(MaterialApp(
home: MyApp(),
));
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Load local image"),
return Scaffold(
appBar: AppBar(
title: Text("Load local image"),
),
body: new Container(
child: new Center(
child: new Text(
body: Container(
child: Center(
child: Text(
"Hello World!",
style: new TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white),
),
),
// Set the image as the background of the Container
decoration: new BoxDecoration(
image: new DecorationImage(
decoration: BoxDecoration(
image: DecorationImage(
// Load image from assets
image: new AssetImage('data_repo/img/bg1.jpg'),
image: AssetImage('data_repo/img/bg1.jpg'),
// Make the image cover the whole area
fit: BoxFit.cover)),
));