import 'package:carousel_slider/carousel_slider.dart';
import 'package:didvan/config/theme_data.dart';
import 'package:flutter/material.dart';

class StudioSlider extends StatelessWidget {
  const StudioSlider({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        CarouselSlider(
          items: [
            Image.network('https://wallpapercave.com/wp/wp10731650.jpg'),
            Image.network('https://wallpapercave.com/wp/wp10731650.jpg'),
            Image.network('https://wallpapercave.com/wp/wp10731650.jpg'),
            Image.network('https://wallpapercave.com/wp/wp10731650.jpg'),
          ],
          options: CarouselOptions(
            viewportFraction: 0.94,
            aspectRatio: 16 / 9,
            autoPlay: true,
          ),
        ),
        Row(),
      ],
    );
  }
}

class _SliderIndicator extends StatelessWidget {
  final bool isCurrentIndex;
  const _SliderIndicator({Key? key, required this.isCurrentIndex})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 8,
      width: 8,
      decoration: BoxDecoration(
        border: Border.all(
          color: Theme.of(context).colorScheme.focusedBorder,
        ),
        shape: BoxShape.circle,
        color:
            isCurrentIndex ? Theme.of(context).colorScheme.focusedBorder : null,
      ),
    );
  }
}
