Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- class horizonatallist extends StatelessWidget {
- const horizonatallist({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return Container(
- // height: 80,
- // width: 80,
- child: ListView(
- scrollDirection: Axis.horizontal,
- children: <Widget>[
- Category(
- image_caption: 'accessories',
- image_location: 'images/cats/accessories.png')
- ],
- ),
- );
- }
- }
- class Category extends StatelessWidget {
- final String image_location;
- final String image_caption;
- const Category({required this.image_caption, required this.image_location});
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.all(2),
- child: InkWell(
- onTap: () {},
- child: ListTile(
- title: Image.asset(image_location),
- subtitle: Text(image_caption),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement