Code:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this is the example code used in SL Coder - ego coding tutorial videos. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(new AssetExample()); | |
class AssetExample extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Assets', | |
home: new Scaffold( | |
body: new Row( | |
children: <Widget>[ | |
new Expanded( | |
flex: 2, | |
child: new Image.asset( | |
'images/egocoding.png', | |
fit: BoxFit.cover, | |
), | |
), | |
new Expanded( | |
child: new Image.asset( | |
'images/egocoding.png', | |
fit: BoxFit.cover, | |
), | |
), | |
new Expanded( | |
child: new Image.asset( | |
'images/egocoding.png', | |
fit: BoxFit.cover, | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Resources(Images):
No comments:
Post a Comment