Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:provider/provider.dart';
- import 'package:shamo/models/user_model.dart';
- import 'package:shamo/providers/auth_provider.dart';
- import 'package:shamo/widgets/all_shoes.dart';
- import '../theme.dart';
- class HeaderCategory extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- AuthProvider authProvider = Provider.of<AuthProvider>(context);
- UserModel user = authProvider.user;
- return Column(
- children: [
- Container(
- margin: EdgeInsets.only(
- top: defaultMargin,
- left: defaultMargin,
- right: defaultMargin,
- ),
- child: Row(
- children: [
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "Hallo, ${user.name}",
- style: primaryTextStyle.copyWith(
- fontSize: 18,
- fontWeight: semibold,
- ),
- ),
- Text(
- '@${user.username}',
- style: subtitleTextStyle.copyWith(
- fontSize: 14,
- fontWeight: regular,
- ),
- ),
- ],
- ),
- ),
- Container(
- width: 54,
- height: 54,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- image: DecorationImage(
- image: NetworkImage(
- user.profilePhotoUrl,
- ),
- fit: BoxFit.cover,
- ),
- ),
- ),
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.only(
- top: defaultMargin,
- ),
- child: SingleChildScrollView(
- scrollDirection: Axis.horizontal,
- child: Row(
- children: [
- SizedBox(
- width: defaultMargin,
- ),
- GestureDetector(
- onTap: () {
- Navigator.push(
- context,
- MaterialPageRoute(builder: (context) => AllShoes()),
- );
- },
- child: Container(
- padding: EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 10,
- ),
- margin: EdgeInsets.only(right: 16),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: primaryColor,
- ),
- child: Text(
- 'All Shoes',
- style: primaryTextStyle.copyWith(
- fontSize: 13,
- fontWeight: medium,
- ),
- ),
- ),
- ),
- GestureDetector(
- onTap: () {},
- child: Container(
- padding: EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 10,
- ),
- margin: EdgeInsets.only(right: 16),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: transparentColor,
- border: Border.all(
- color: subtitleColor,
- ),
- ),
- child: Text(
- 'Running',
- style: subtitleTextStyle.copyWith(
- fontSize: 13,
- fontWeight: medium,
- ),
- ),
- ),
- ),
- Container(
- padding: EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 10,
- ),
- margin: EdgeInsets.only(right: 16),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: transparentColor,
- border: Border.all(
- color: subtitleColor,
- ),
- ),
- child: Text(
- 'Training',
- style: subtitleTextStyle.copyWith(
- fontSize: 13,
- fontWeight: medium,
- ),
- ),
- ),
- Container(
- padding: EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 10,
- ),
- margin: EdgeInsets.only(right: 16),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: transparentColor,
- border: Border.all(
- color: subtitleColor,
- ),
- ),
- child: Text(
- 'Sportrs',
- style: subtitleTextStyle.copyWith(
- fontSize: 13,
- fontWeight: medium,
- ),
- ),
- ),
- Container(
- padding: EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 10,
- ),
- margin: EdgeInsets.only(right: 16),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: transparentColor,
- border: Border.all(
- color: subtitleColor,
- ),
- ),
- child: Text(
- 'School',
- style: subtitleTextStyle.copyWith(
- fontSize: 13,
- fontWeight: medium,
- ),
- ),
- ),
- Container(
- padding: EdgeInsets.symmetric(
- horizontal: 12,
- vertical: 10,
- ),
- margin: EdgeInsets.only(right: 16),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: transparentColor,
- border: Border.all(
- color: subtitleColor,
- ),
- ),
- child: Text(
- 'Boots',
- style: subtitleTextStyle.copyWith(
- fontSize: 13,
- fontWeight: medium,
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ],
- );
- }
- }
Add Comment
Please, Sign In to add comment