Remove categories
This commit is contained in:
parent
26c806ad2e
commit
68e44229b5
2 changed files with 0 additions and 96 deletions
|
@ -1,26 +0,0 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class Category {
|
||||
final String icon, title;
|
||||
|
||||
Category({required this.icon, required this.title});
|
||||
}
|
||||
|
||||
List<Category> demoCategories = [
|
||||
Category(
|
||||
icon: "assets/icons/dress.svg",
|
||||
title: "Dress",
|
||||
),
|
||||
Category(
|
||||
icon: "assets/icons/shirt.svg",
|
||||
title: "Shirt",
|
||||
),
|
||||
Category(
|
||||
icon: "assets/icons/pants.svg",
|
||||
title: "Pants",
|
||||
),
|
||||
Category(
|
||||
icon: "assets/icons/Tshirt.svg",
|
||||
title: "Tshirt",
|
||||
),
|
||||
];
|
|
@ -1,70 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:nekoya_flutter/components/_category.dart';
|
||||
|
||||
import '../utils/utils.dart';
|
||||
|
||||
class Categories extends StatelessWidget {
|
||||
const Categories({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 84,
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: demoCategories.length,
|
||||
itemBuilder: (context, index) => CategoryCard(
|
||||
icon: demoCategories[index].icon,
|
||||
title: demoCategories[index].title,
|
||||
press: () {},
|
||||
),
|
||||
separatorBuilder: (context, index) =>
|
||||
const SizedBox(width: defaultPadding),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CategoryCard extends StatelessWidget {
|
||||
const CategoryCard({
|
||||
Key? key,
|
||||
required this.icon,
|
||||
required this.title,
|
||||
required this.press,
|
||||
}) : super(key: key);
|
||||
|
||||
final String icon, title;
|
||||
final VoidCallback press;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OutlinedButton(
|
||||
onPressed: press,
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(defaultBorderRadius)),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: defaultPadding / 2, horizontal: defaultPadding / 4),
|
||||
child: Column(
|
||||
children: [
|
||||
SvgPicture.asset(icon),
|
||||
const SizedBox(height: defaultPadding / 2),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
backgroundColor: const Color(0xff212226),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue