import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'main.dart';
import 'chat.dart';
import 'event.dart';
import 'util/params.dart';
import 'package:carousel_pro/carousel_pro.dart';

class Home extends StatelessWidget {
  const Home({key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: COLOR_TERTIARY,
      body: ListView(
        children: [
          Container(
            height: 220,
            child: Carousel(
              boxFit: BoxFit.cover,
              images: [
                AssetImage('assets/images/pagde_slide.jpg'),
                AssetImage('assets/images/rock_slide.jpg'),
                AssetImage('assets/images/sertanejo_slide.jpg'),
                AssetImage('assets/images/reggae_slide.jpg'),
              ],
              autoplay: true,
              autoplayDuration: Duration(milliseconds: 6000),
              animationCurve: Curves.fastOutSlowIn,
              animationDuration: Duration(milliseconds: 2000),
              dotSize: 4.0,
              dotSpacing: 15.0,
              dotColor: COLOR_PRIMARY,
              indicatorBgPadding: 5,
              dotPosition: DotPosition.bottomRight,
              dotBgColor: Colors.transparent,
            ),
          ),
          Padding(
              padding: EdgeInsets.only(left: 20,top: 20),
              child: Text(
                'Próximo de você',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: 18,
                  fontWeight: FontWeight.bold,
                ),
              )),
          SizedBox(height: 150),
          Padding(
              padding: EdgeInsets.only(left: 20,top: 20),
              child: Text(
                'Estilos',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: 18,
                  fontWeight: FontWeight.bold,
                ),
              )),
          Padding(
            padding: EdgeInsets.all(20),
            child: Container(
              height: 150,
              child: ListView(
                scrollDirection: Axis.horizontal,
                children: [
                  Container(
                    width: 160,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.all(Radius.circular(12)),
                        image: DecorationImage(
                            image: AssetImage('assets/images/rock_slide.jpg'),
                            fit: BoxFit.cover)),
                  ),
                  SizedBox(width: 15),
                  Container(
                    width: 160,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.all(Radius.circular(12)),
                        image: DecorationImage(
                            image: AssetImage('assets/images/sertanejo_slide.jpg'),
                            fit: BoxFit.cover)),
                  ),
                  SizedBox(width: 15),
                  Container(
                    width: 160,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.all(Radius.circular(12)),
                        image: DecorationImage(
                            image: AssetImage('assets/images/reggae_slide.jpg'),
                            fit: BoxFit.cover)),
                  ),
                  SizedBox(width: 15),
                  Container(
                    width: 160,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.all(Radius.circular(12)),
                        image: DecorationImage(
                            image: AssetImage('assets/images/pagde_slide.jpg'),
                            fit: BoxFit.cover)),
                  ),
                  SizedBox(width: 15),
                ],
              ),
            ),
          )
        ],
      ),
    );
  }
}
