first commit
This commit is contained in:
65
lib/widgets/Internal_detail_widget.dart
Normal file
65
lib/widgets/Internal_detail_widget.dart
Normal file
@@ -0,0 +1,65 @@
|
||||
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),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
70
lib/widgets/home_tabbar_view_widget.dart
Normal file
70
lib/widgets/home_tabbar_view_widget.dart
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:carousel_pro/carousel_pro.dart';
|
||||
import 'package:testapp/widgets/Internal_detail_widget.dart';
|
||||
import 'package:testapp/widgets/national_detail_widget.dart';
|
||||
import 'package:testapp/widgets/sport_detail_widget.dart';
|
||||
|
||||
|
||||
|
||||
class HomeTabBarViewwidget extends StatelessWidget {
|
||||
// parameter title
|
||||
final String title;
|
||||
int id;
|
||||
HomeTabBarViewwidget( this.title, {this.id});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Container(
|
||||
color: Colors.grey,
|
||||
height: 200,
|
||||
child: Carousel(
|
||||
images:
|
||||
[
|
||||
AssetImage('assets/images/sport.png'),
|
||||
AssetImage('assets/images/inter.png'),
|
||||
AssetImage('assets/images/news.png'),
|
||||
AssetImage('assets/images/entertainment.png'),
|
||||
|
||||
],
|
||||
autoplay: true,
|
||||
animationCurve: Curves.fastOutSlowIn,
|
||||
animationDuration: Duration(milliseconds: 1000),
|
||||
boxFit: BoxFit.cover,
|
||||
dotSize: 4.0,
|
||||
indicatorBgPadding: 4.0,
|
||||
// dotColor: Colors.red.withOpacity(0.2),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
//**************THE FIRST CARS BOD**********
|
||||
SportDetailWidget(title: title),
|
||||
//***********THE SECOND CARD BODY********
|
||||
NationDetialWidget(title: title),
|
||||
//***********THE SECOND CARD BODY********
|
||||
InternatDetailWidget(title: title),
|
||||
//***********THE SECOND CARD BODY********
|
||||
// EnterDetailWidget(title: title),
|
||||
//***********THE SECOND CARD BODY********
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
66
lib/widgets/national_detail_widget.dart
Normal file
66
lib/widgets/national_detail_widget.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:testapp/page_detail/national_detail.dart';
|
||||
|
||||
class NationDetialWidget extends StatelessWidget {
|
||||
const NationDetialWidget({
|
||||
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) => NationDetail(),),);
|
||||
},
|
||||
child: Card(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width:120,
|
||||
height: 100,
|
||||
child: Image.asset('assets/images/inter.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),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
66
lib/widgets/sport_detail_widget.dart
Normal file
66
lib/widgets/sport_detail_widget.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
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),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user