mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-07-15 02:46:03 +08:00
🚧 remove new keyword to get inline with dart 2 code standard.
This commit is contained in:
@ -1,24 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(new MyApp());
|
||||
void main() => runApp(MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new MaterialApp(
|
||||
home: new Scaffold(
|
||||
appBar: new AppBar(
|
||||
title: new Text("Image from Network"),
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("Image from Network"),
|
||||
),
|
||||
body: new Container(
|
||||
child: new Column(
|
||||
body: Container(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
// Load image from network
|
||||
new Image.network(
|
||||
Image.network(
|
||||
'https://github.com/nisrulz/flutter-examples/raw/develop/image_from_network/img/flutter_logo.png'),
|
||||
// even loads gifs
|
||||
// Gif image from Giphy, all copyrights are owned by Giphy
|
||||
new Image.network(
|
||||
Image.network(
|
||||
'https://github.com/nisrulz/flutter-examples/raw/develop/image_from_network/img/loop_anim.gif'),
|
||||
],
|
||||
)),
|
||||
|
Reference in New Issue
Block a user