Reputation: 23
Padding(
child: Icon(Icons.search)
);
new Padding(
child: new Icon(Icons.search)
);
The above two pieces of code achieve the same effect, when do us need to add "new"?
Upvotes: 1
Views: 117
Reputation: 187
Flutter need 'new' keyword in the lower version when create a object. In the newest version, 'new' keyword can be ignored
Upvotes: 0