feat: show all apps and recommended versions

This commit is contained in:
Aunali321
2023-03-20 03:35:55 +05:30
parent 7e05bcac90
commit cbb36f2ec7
6 changed files with 184 additions and 36 deletions

View File

@@ -9,12 +9,14 @@ class InstalledAppItem extends StatefulWidget {
required this.pkgName,
required this.icon,
required this.patchesCount,
required this.recommendedVersion,
this.onTap,
}) : super(key: key);
final String name;
final String pkgName;
final Uint8List icon;
final int patchesCount;
final String recommendedVersion;
final Function()? onTap;
@override
@@ -46,31 +48,35 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
widget.name,
maxLines: 2,
overflow: TextOverflow.visible,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 4),
Text(widget.pkgName),
Row(
children: <Widget>[
children: [
Text(
widget.name,
maxLines: 2,
overflow: TextOverflow.visible,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
widget.recommendedVersion.isEmpty
? 'All versions'
: widget.recommendedVersion,
),
const SizedBox(width: 6),
const SizedBox(width: 4),
Text(
widget.patchesCount == 1
? '${widget.patchesCount} patch'
: '${widget.patchesCount} patches',
? '${widget.patchesCount} patch'
: '${widget.patchesCount} patches',
style: TextStyle(
fontSize: 8,
color: Theme.of(context).colorScheme.secondary,
),
),
],
),
const SizedBox(height: 4),
Text(widget.pkgName),
],
),
),