Untitled
unknown
plain_text
4 years ago
4.6 kB
12
Indexable
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:secops/Widgets/search.dart';
import 'package:secops/Widgets/short.dart';
import 'package:secops/Widgets/small_card_in_scroll.dart';
import 'package:secops/Widgets/tags_btn.dart';
import 'package:secops/dummy.dart';
import 'package:secops/global.dart';
class Explore extends StatelessWidget {
Explore({Key? key}) : super(key: key);
final List TagsNames = [
'attack',
'security',
'somthimg',
'attack',
'security',
'attack',
'security',
'somthimg',
];
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
padding: EdgeInsets.only(top: 0,bottom: 80),
child: Container(
width: K.getScreenW(context),
height: K.getScreenH(context),
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 80),
child: Column(
children: [
Search(),
Image.asset(
'./assets/images/ecploreImg.png',
scale: 0.5,
),
const SizedBox(
height: 5,
),
Text(
'Explore News',
style: Theme.of(context).textTheme.headline1,
),
const SizedBox(
height: 5,
),
Container(
width: K.getScreenW(context) / 1.5,
child: Text(
'Try exploring new news with search or browse our categories',
style: Theme.of(context).textTheme.headline2,
textAlign: TextAlign.center,
),
),
const SizedBox(
height: 10,
),
Container(
padding: const EdgeInsets.all(15),
width: K.getScreenW(context),
child: Text(
'Tags',
style: Theme.of(context).textTheme.bodyText1?.copyWith(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
),
),
Wrap(
runSpacing: 5,
spacing: 5,
children: [
for (int i = 0; i < TagsNames.length; i++)
TagsBtn(IconDt: Icons.home,
TextDt: TagsNames[i] as String)
],
),
const SizedBox(
height: 10,
),
Container(
padding: const EdgeInsets.all(15),
width: K.getScreenW(context),
child: Text(
'Trending News',
style: Theme.of(context).textTheme.bodyText1?.copyWith(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
),
),
CarouselSlider(
options: CarouselOptions(
height: 120,
),
items: [1, 2, 3, 4, 5].map((i) {
return Builder(
builder: (BuildContext context) {
return SmallCardInScroll(onPress: () {});
},
);
}).toList(),
),
const SizedBox(
height: 10,
),
Container(
padding: const EdgeInsets.all(15),
width: K.getScreenW(context),
child: Text(
'Recent News',
style: Theme.of(context).textTheme.bodyText1?.copyWith(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
),
),
Column(
children: [
for (int i = 0; i < TagsNames.length; i++)
SmallCardInScroll(onPress: (){})
],
)
],
),
),
)
)
);
}
}
Editor is loading...