mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
refactor: Better names for widgets.
This commit is contained in:
parent
87192e49c6
commit
48a65872ea
5 changed files with 21 additions and 21 deletions
|
@ -1,8 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/available_update.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/installed_apps.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/latest_commit.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/available_updates_card.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/installed_apps_card.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/latest_commit_card.dart';
|
||||
|
||||
class HomeScreen extends StatelessWidget {
|
||||
const HomeScreen({Key? key}) : super(key: key);
|
||||
|
@ -44,7 +44,7 @@ class HomeScreen extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const LatestCommitWidget(),
|
||||
const LatestCommitCard(),
|
||||
const SizedBox(height: 14),
|
||||
Text(
|
||||
"Patched Applications",
|
||||
|
@ -53,9 +53,9 @@ class HomeScreen extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
const AvailableUpdatesWidget(),
|
||||
const AvailableUpdatesCard(),
|
||||
const SizedBox(height: 15),
|
||||
const InstalledAppsWidget(),
|
||||
const InstalledAppsCard(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -4,13 +4,13 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:revanced_manager_flutter/constants.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/patch_text_button.dart';
|
||||
|
||||
class AppDetails extends StatelessWidget {
|
||||
class ApplicationItem extends StatelessWidget {
|
||||
final String asset;
|
||||
final String name;
|
||||
final String releaseDate;
|
||||
final Function()? onPressed;
|
||||
|
||||
const AppDetails({
|
||||
const ApplicationItem({
|
||||
Key? key,
|
||||
required this.asset,
|
||||
required this.name,
|
|
@ -1,10 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/app_details.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/application_item.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/patch_text_button.dart';
|
||||
|
||||
class AvailableUpdatesWidget extends StatelessWidget {
|
||||
const AvailableUpdatesWidget({Key? key}) : super(key: key);
|
||||
class AvailableUpdatesCard extends StatelessWidget {
|
||||
const AvailableUpdatesCard({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -36,13 +36,13 @@ class AvailableUpdatesWidget extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppDetails(
|
||||
ApplicationItem(
|
||||
asset: "lib/assets/images/revanced.svg",
|
||||
name: "ReVanced",
|
||||
releaseDate: "2 days ago",
|
||||
onPressed: () {},
|
||||
),
|
||||
AppDetails(
|
||||
ApplicationItem(
|
||||
asset: "lib/assets/images/reddit.png",
|
||||
name: "ReReddit",
|
||||
releaseDate: "Released 1 month ago",
|
|
@ -1,9 +1,9 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/app_details.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/application_item.dart';
|
||||
|
||||
class InstalledAppsWidget extends StatelessWidget {
|
||||
const InstalledAppsWidget({Key? key}) : super(key: key);
|
||||
class InstalledAppsCard extends StatelessWidget {
|
||||
const InstalledAppsCard({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -25,7 +25,7 @@ class InstalledAppsWidget extends StatelessWidget {
|
|||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
AppDetails(
|
||||
ApplicationItem(
|
||||
asset: "lib/assets/images/revanced.svg",
|
||||
name: "ReVanced",
|
||||
releaseDate: "2 days ago",
|
|
@ -4,14 +4,14 @@ import 'package:revanced_manager_flutter/backend/api/github_api.dart';
|
|||
import 'package:revanced_manager_flutter/constants.dart';
|
||||
import 'package:revanced_manager_flutter/ui/widgets/patch_text_button.dart';
|
||||
|
||||
class LatestCommitWidget extends StatefulWidget {
|
||||
const LatestCommitWidget({Key? key}) : super(key: key);
|
||||
class LatestCommitCard extends StatefulWidget {
|
||||
const LatestCommitCard({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LatestCommitWidget> createState() => _LatestCommitWidgetState();
|
||||
State<LatestCommitCard> createState() => _LatestCommitCardState();
|
||||
}
|
||||
|
||||
class _LatestCommitWidgetState extends State<LatestCommitWidget> {
|
||||
class _LatestCommitCardState extends State<LatestCommitCard> {
|
||||
GithubAPI githubAPI = GithubAPI();
|
||||
String lastPatcherCommit = "Loading...";
|
||||
String lastManagerCommit = "Loading...";
|
Loading…
Reference in a new issue