Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
3.0 kB
1
Indexable
Never
import 'dart:collection';

import 'package:flutter/material.dart';
import 'package:hovering/hovering.dart';

class SkillCard extends StatelessWidget {

  const SkillCard({super.key, required this.label, required this.image});

  final String label;
  final Image image;

  @override
  Widget build(BuildContext context) {

    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        SizedBox(
          height: 150,
          width: 150,
          child: Container(
            padding: const EdgeInsets.all(10),
            margin: const EdgeInsets.all(10),
            decoration: const BoxDecoration(
                color: Colors.white,
                shape: BoxShape.rectangle,
                borderRadius: BorderRadius.all(Radius.circular(10)),
                boxShadow: [
                  BoxShadow(
                    color: Colors.black38,
                    offset: Offset(0, 7),
                    blurRadius: 2,
                    spreadRadius: 0,
                    blurStyle: BlurStyle.solid
                  ),
                ]
            ),
            child: SizedBox(
              width: 100,
              height: 100,
              child: image,
            ),
          ),
        ),
        Text(label,
          style: const TextStyle(
            color: Colors.white70,
            fontSize: 20,
          ),
        ),
      ],
    );
  }
}


class SkillCardBox extends StatelessWidget {
  const SkillCardBox({super.key, required this.label, required this.skillcards});

  final String label;
  final List<SkillCard> skillcards;

   final boxDekorationForCards = const BoxDecoration(
      color: Colors.white,
      border: null,
      shape: BoxShape.rectangle,
      borderRadius: BorderRadius.all(Radius.circular(10)),
      boxShadow: [
        BoxShadow(
            color: Colors.black38,
            offset: Offset(0, 7),
            blurRadius: 2,
            spreadRadius: 0,
            blurStyle: BlurStyle.solid
        ),
      ]
  );

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(10),
      margin: const EdgeInsets.all(10),
      //decoration: boxDekorationForCards,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Text(label,
            style: const TextStyle(
              color: Colors.white,
              fontSize: 30,
              fontFamily: 'HKGroteskBold',
            ),
          ),
          Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: skillcards,
          ),
        ],
      ),
    );
  }
}
Leave a Comment