🚧 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

@ -3,28 +3,28 @@ import 'package:flutter/material.dart';
import './utils.dart' as utils;
void main() {
runApp(new MaterialApp(
runApp(MaterialApp(
// Title
title: "Using Gradient",
// Home
home: new Scaffold(
home: Scaffold(
// Appbar
appBar: new AppBar(
appBar: AppBar(
// Title
title: new Text("Using Gradient"),
title: Text("Using Gradient"),
),
// Body
body: new Container(
body: Container(
// Center the content
child: new Center(
child: Center(
// Add Text
child: new Text(
child: Text(
"Hello World!",
style: new TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white),
),
),
// Set background
decoration: new BoxDecoration(
decoration: BoxDecoration(
// Add Gradient
gradient: utils.getCustomGradient())))));
}

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
LinearGradient getCustomGradient() {
// Define a Linear Gradient
return new LinearGradient(
return LinearGradient(
colors: [Colors.pink, Colors.blueAccent],
begin: const FractionalOffset(0.0, 0.0),
end: const FractionalOffset(0.6, 0.0),