33 lines
741 B
Dart
33 lines
741 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SkillListTile extends StatelessWidget {
|
|
const SkillListTile({
|
|
super.key,
|
|
required this.name,
|
|
this.percentage,
|
|
});
|
|
|
|
final String name;
|
|
final String? percentage;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListTile(
|
|
contentPadding: const EdgeInsets.all(0),
|
|
title: Row(
|
|
children: [
|
|
Expanded(flex: 2, child: Text(name)),
|
|
const Padding(padding: EdgeInsets.only(bottom: 8)),
|
|
if (percentage != null)
|
|
Expanded(
|
|
flex: 5,
|
|
child: LinearProgressIndicator(
|
|
value: double.parse(percentage!) / 100,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|