mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02: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>
37 lines
1.3 KiB
Dart
37 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(),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|