mirror of
https://gitlab.com/moepoi/moepoi.dev.git
synced 2024-12-01 20:50:27 +01:00
48 lines
No EOL
1.2 KiB
Dart
48 lines
No EOL
1.2 KiB
Dart
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class SkillBox extends StatelessWidget {
|
|
const SkillBox({Key? key, required this.title, required this.image}) : super(key: key);
|
|
|
|
final String title;
|
|
final String image;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(10),
|
|
),
|
|
elevation: 15.0,
|
|
child: Container(
|
|
margin: const EdgeInsets.all(25.0),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: [
|
|
Flexible(
|
|
flex: 3,
|
|
child: SvgPicture.asset(
|
|
image,
|
|
height: 200,
|
|
width: 200,
|
|
fit: BoxFit.contain,
|
|
semanticsLabel: title,
|
|
),
|
|
),
|
|
Flexible(
|
|
flex: 1,
|
|
child: Text(
|
|
title,
|
|
style: const TextStyle(
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
textAlign: TextAlign.center,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |