import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/widgets/dashboard/activity_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';

class DashboardSliderItemWidget extends StatelessWidget {
  final DashboardModel item;

  DashboardSliderItemWidget(this.item);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Row(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            AppText(
              item.kPIName,
              fontSize: SizeConfig.textMultiplier * 2.2,
              fontWeight: FontWeight.bold,
            ),
          ],
        ),
        new Container(
            height: 110,
            child: ListView(
                scrollDirection: Axis.horizontal,
                children:
                    List.generate(item.summaryoptions.length, (int index) {
                  return GetActivityButton(item.summaryoptions[index]);
                })))
      ],
    );
  }
}
