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: [ 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: [ Expanded( child: Text("Ronaldo has one of the most expensive rolex watches in the world", style: Theme.of(context).textTheme.title, ), ), Row( children: [ Expanded( child: Text("27th.June.20 " , ) ), IconButton( icon: Icon(Icons.favorite_border), ), IconButton( icon: Icon(Icons.share), ) ], ) ], ), ), ) ], ), ), ); } }