feat: Patch Item Widget.

This commit is contained in:
Aunali321 2022-08-07 23:35:44 +05:30
parent 3df427dccb
commit 645589fa0e

View File

@ -0,0 +1,76 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class PatchItem extends StatelessWidget {
final String name;
final String description;
final String version;
final bool isSelected;
PatchItem({
Key? key,
required this.name,
required this.description,
required this.version,
required this.isSelected,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: const Color(0xFF1A1A1A),
borderRadius: BorderRadius.circular(10),
),
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12),
margin: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
name,
style: GoogleFonts.inter(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
const SizedBox(width: 4),
Text(version)
],
),
const SizedBox(height: 4),
Text(
description,
softWrap: true,
maxLines: 3,
overflow: TextOverflow.visible,
style: GoogleFonts.roboto(
fontSize: 14,
),
),
],
),
),
Transform.scale(
scale: 1.2,
child: Checkbox(
value: isSelected,
onChanged: (newValue) {},
),
)
],
)
],
),
);
}
}