mirrored_repositories/submission-dicoding-flutter/lib
import 'package:flutter/material.dart';

import '../theme.dart';

class OnBoardingItem extends StatelessWidget {
  final String imageUrl;
  final String title;
  final String subtitle;

  const OnBoardingItem({
    Key? key,
    required this.imageUrl,
    required this.title,
    required this.subtitle,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.only(left: 30, right: 30),
      child: Column(
        children: [
          const SizedBox(height: 100),
          Image.asset(imageUrl, width: double.infinity, height: 250),
          const SizedBox(height: 77),
          Text(
            title,
            style: blackTextStyle.copyWith(
              fontSize: 22,
            ),
          ),
          const SizedBox(height: 10),
          Text(
            subtitle,
            style: greyTextStyle.copyWith(
              fontSize: 14,
            ),
            textAlign: TextAlign.center,
          ),
        ],
      ),
    );
  }
}
