mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 09:07:47 +01:00
106d77ea0c
* feat: "New dashboard UI". * fix: some improvenents * fix: fix inconsistencies and light theme. * fix: save patched and installed apps on prefs, improve installer log, improve dashboard with real data (wip) Co-authored-by: Aunali321 <aunvakil.aa@gmail.com> * feat: move chips to a separate widget. Co-authored-by: Alberto Ponces <ponces26@gmail.com>
36 lines
1.3 KiB
Dart
36 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:revanced_manager/app/app.locator.dart';
|
|
import 'package:revanced_manager/models/patched_application.dart';
|
|
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
|
import 'package:revanced_manager/ui/widgets/application_item.dart';
|
|
|
|
class AvailableUpdatesCard extends StatelessWidget {
|
|
const AvailableUpdatesCard({
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
FutureBuilder<List<PatchedApplication>>(
|
|
future: locator<HomeViewModel>().getPatchedApps(true),
|
|
builder: (context, snapshot) =>
|
|
snapshot.hasData && snapshot.data!.length > 1
|
|
? ListView.builder(
|
|
itemBuilder: (context, index) => ApplicationItem(
|
|
icon: snapshot.data![index].icon,
|
|
name: snapshot.data![index].name,
|
|
patchDate: snapshot.data![index].patchDate,
|
|
isUpdatableApp: true,
|
|
onPressed: () => {},
|
|
),
|
|
)
|
|
: Container(),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|