66 lines
1.8 KiB
Dart
66 lines
1.8 KiB
Dart
|
|
import 'package:flutter/material.dart';
|
|
import 'package:testapp/page_detail/sport_detail.dart';
|
|
|
|
class SportDetailWidget extends StatelessWidget {
|
|
const SportDetailWidget({
|
|
Key key,
|
|
@required this.title,
|
|
}) : super(key: key);
|
|
|
|
final String title;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return new InkWell(
|
|
onTap: (){
|
|
Navigator.push(context,
|
|
MaterialPageRoute(builder: (context) => SportDetail(),),);
|
|
},
|
|
child: Card(
|
|
child: Row(
|
|
children: <Widget>[
|
|
SizedBox(
|
|
width:120,
|
|
height: 100,
|
|
child: Image.asset('assets/images/sport.png',
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Container(
|
|
padding: EdgeInsets.only(top: 10, left: 10),
|
|
height: 100,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
child: Text("Ronaldo has one of the most expensive rolex watches in the world",
|
|
style: Theme.of(context).textTheme.title,
|
|
),
|
|
),
|
|
Row(
|
|
children: <Widget>[
|
|
Expanded(
|
|
child: Text("27th.June.20 " ,
|
|
)
|
|
),
|
|
IconButton(
|
|
icon: Icon(Icons.favorite_border),
|
|
),
|
|
IconButton(
|
|
icon: Icon(Icons.share),
|
|
)
|
|
],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |