Testing/lib/widgets/Internal_detail_widget.dart
2020-06-27 18:46:23 +07:00

65 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:testapp/page_detail/internal_detail.dart';
class InternatDetailWidget extends StatelessWidget {
const InternatDetailWidget({
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) => InternalDetail(),),);
},
child: Card(
child: Row(
children: <Widget>[
SizedBox(
width:120,
height: 100,
child: Image.asset('assets/images/news.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("The US tightens its borders with the states to prevent the infection",
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),
)
],
)
],
),
),
)
],
),
),
);
}
}