-
Notifications
You must be signed in to change notification settings - Fork 0
6.Image
Siddhant edited this page Jun 3, 2019
·
1 revision
class FlightImageAsset extends StatelessWidget
{
@override
Widget build(BuildContext context) {
AssetImage assetImage=AssetImage('images/ic_person_black.png');
Image image=Image(image: assetImage,width: 250,height: 250);
return Container(child: image,);
}
}
import 'package:flutter/material.dart';
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Container(
padding: EdgeInsets.only(top: 5,bottom: 5),
margin: EdgeInsets.only(top: 0),
alignment: Alignment.center,
color: Colors.deepPurple,
child: Column(children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(left: 10),
child: Text("Name :",
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 18.0,
fontFamily: 'Raleway',
fontStyle: FontStyle.normal),
textDirection: TextDirection.ltr),
)),
Expanded(
child: Text("Sameer Raorane",
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 18.0,
fontFamily: 'Raleway',
fontStyle: FontStyle.normal),
textDirection: TextDirection.ltr)),
],
), Row(
children: <Widget>[
Expanded(
child: Text("Color :",
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 18.0,
fontFamily: 'Raleway',
fontStyle: FontStyle.normal),
textDirection: TextDirection.ltr)),
Expanded(
child: Text("Blue",
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 18.0,
fontFamily: 'Raleway',
fontStyle: FontStyle.normal),
textDirection: TextDirection.ltr)),
],
),
FlightImageAsset(),
FlightBookButton()
],));
}
}