mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 17:17:49 +01:00
77 lines
2.2 KiB
Dart
77 lines
2.2 KiB
Dart
|
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) {},
|
||
|
),
|
||
|
)
|
||
|
],
|
||
|
)
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|