Merge branch 'main' of https://gitlab.com/nekoya/app
This commit is contained in:
commit
a1722cf3fb
3 changed files with 1 additions and 97 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),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -36,7 +36,7 @@ class Home extends StatelessWidget {
|
||||||
.copyWith(fontWeight: FontWeight.w500, color: Colors.white),
|
.copyWith(fontWeight: FontWeight.w500, color: Colors.white),
|
||||||
),
|
),
|
||||||
const Text(
|
const Text(
|
||||||
"best Outfits for you",
|
"Best outfits for you",
|
||||||
style: TextStyle(fontSize: 18, color: Colors.white),
|
style: TextStyle(fontSize: 18, color: Colors.white),
|
||||||
),
|
),
|
||||||
const Padding(
|
const Padding(
|
||||||
|
|
Loading…
Reference in a new issue