mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
fix: app listing on Home View
This commit is contained in:
parent
d351b86f41
commit
750f035104
@ -28,11 +28,13 @@
|
|||||||
},
|
},
|
||||||
"appSelectorCard": {
|
"appSelectorCard": {
|
||||||
"widgetTitle": "Select application",
|
"widgetTitle": "Select application",
|
||||||
|
"widgetTitleSelected": "Selected application",
|
||||||
"widgetSubtitle": "No application selected.",
|
"widgetSubtitle": "No application selected.",
|
||||||
"noAppsLabel": "No apps found."
|
"noAppsLabel": "No apps found."
|
||||||
},
|
},
|
||||||
"patchSelectorCard": {
|
"patchSelectorCard": {
|
||||||
"widgetTitle": "Select patches",
|
"widgetTitle": "Select patches",
|
||||||
|
"widgetTitleSelected": "Selected patches",
|
||||||
"widgetSubtitle": "Select an application first.",
|
"widgetSubtitle": "Select an application first.",
|
||||||
"widgetEmptySubtitle": "No patches selected."
|
"widgetEmptySubtitle": "No patches selected."
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'dart:convert';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
@ -10,8 +11,8 @@ class PatchedApplication {
|
|||||||
final String version;
|
final String version;
|
||||||
final String apkFilePath;
|
final String apkFilePath;
|
||||||
@JsonKey(
|
@JsonKey(
|
||||||
fromJson: bytesFromString,
|
fromJson: decodeBase64,
|
||||||
toJson: bytesToString,
|
toJson: encodeBase64,
|
||||||
)
|
)
|
||||||
final Uint8List icon;
|
final Uint8List icon;
|
||||||
final DateTime patchDate;
|
final DateTime patchDate;
|
||||||
@ -36,8 +37,7 @@ class PatchedApplication {
|
|||||||
|
|
||||||
Map toJson() => _$PatchedApplicationToJson(this);
|
Map toJson() => _$PatchedApplicationToJson(this);
|
||||||
|
|
||||||
static Uint8List bytesFromString(String icon) =>
|
static Uint8List decodeBase64(String icon) => base64.decode(icon);
|
||||||
Uint8List.fromList(icon.codeUnits);
|
|
||||||
|
|
||||||
static String bytesToString(Uint8List bytes) => String.fromCharCodes(bytes);
|
static String encodeBase64(Uint8List bytes) => base64.encode(bytes);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:github/github.dart';
|
import 'package:github/github.dart';
|
||||||
import 'package:injectable/injectable.dart';
|
import 'package:injectable/injectable.dart';
|
||||||
|
import 'package:revanced_manager/models/patched_application.dart';
|
||||||
import 'package:timeago/timeago.dart';
|
import 'package:timeago/timeago.dart';
|
||||||
|
|
||||||
@lazySingleton
|
@lazySingleton
|
||||||
@ -7,12 +8,11 @@ class GithubAPI {
|
|||||||
var github = GitHub();
|
var github = GitHub();
|
||||||
|
|
||||||
Future<String?> latestRelease(String org, repoName) async {
|
Future<String?> latestRelease(String org, repoName) async {
|
||||||
String? dlurl = '';
|
|
||||||
try {
|
try {
|
||||||
var latestRelease = await github.repositories.getLatestRelease(
|
var latestRelease = await github.repositories.getLatestRelease(
|
||||||
RepositorySlug(org, repoName),
|
RepositorySlug(org, repoName),
|
||||||
);
|
);
|
||||||
dlurl = latestRelease.assets
|
return latestRelease.assets
|
||||||
?.firstWhere((asset) =>
|
?.firstWhere((asset) =>
|
||||||
asset.name != null &&
|
asset.name != null &&
|
||||||
(asset.name!.endsWith('.dex') || asset.name!.endsWith('.apk')) &&
|
(asset.name!.endsWith('.dex') || asset.name!.endsWith('.apk')) &&
|
||||||
@ -20,24 +20,21 @@ class GithubAPI {
|
|||||||
!asset.name!.contains('-javadoc'))
|
!asset.name!.contains('-javadoc'))
|
||||||
.browserDownloadUrl;
|
.browserDownloadUrl;
|
||||||
} on Exception {
|
} on Exception {
|
||||||
dlurl = '';
|
return '';
|
||||||
}
|
}
|
||||||
return dlurl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> latestCommitTime(String org, repoName) async {
|
Future<String> latestCommitTime(String org, repoName) async {
|
||||||
String pushedAt = '';
|
|
||||||
try {
|
try {
|
||||||
var repo = await github.repositories.getRepository(
|
var repo = await github.repositories.getRepository(
|
||||||
RepositorySlug(org, repoName),
|
RepositorySlug(org, repoName),
|
||||||
);
|
);
|
||||||
pushedAt = repo.pushedAt != null
|
return repo.pushedAt != null
|
||||||
? format(repo.pushedAt!, locale: 'en_short')
|
? format(repo.pushedAt!, locale: 'en_short')
|
||||||
: '';
|
: '';
|
||||||
} on Exception {
|
} on Exception {
|
||||||
pushedAt = '';
|
return '';
|
||||||
}
|
}
|
||||||
return pushedAt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<Contributor>> getContributors(String org, repoName) async {
|
Future<List<Contributor>> getContributors(String org, repoName) async {
|
||||||
@ -50,4 +47,15 @@ class GithubAPI {
|
|||||||
return List.empty();
|
return List.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> hasUpdates(PatchedApplication app, String org, repoName) async {
|
||||||
|
// TODO: get status based on last update time on the folder of this app?
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> getChangelog(
|
||||||
|
PatchedApplication app, String org, repoName) async {
|
||||||
|
// TODO: get changelog based on last commits on the folder of this app?
|
||||||
|
return 'fix: incorrect fingerprint version';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ class PatcherAPI {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
await AppInstaller.installApk(_outFile!.path);
|
await AppInstaller.installApk(_outFile!.path);
|
||||||
return true;
|
return await DeviceApps.isAppInstalled(patchedApp.packageName);
|
||||||
}
|
}
|
||||||
} on Exception {
|
} on Exception {
|
||||||
return false;
|
return false;
|
||||||
|
@ -90,8 +90,8 @@ class HomeView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 14),
|
const SizedBox(height: 14),
|
||||||
model.showUpdatableApps
|
model.showUpdatableApps
|
||||||
? const AvailableUpdatesCard()
|
? AvailableUpdatesCard()
|
||||||
: const InstalledAppsCard()
|
: InstalledAppsCard()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -2,12 +2,14 @@ import 'dart:convert';
|
|||||||
import 'package:injectable/injectable.dart';
|
import 'package:injectable/injectable.dart';
|
||||||
import 'package:revanced_manager/app/app.locator.dart';
|
import 'package:revanced_manager/app/app.locator.dart';
|
||||||
import 'package:revanced_manager/models/patched_application.dart';
|
import 'package:revanced_manager/models/patched_application.dart';
|
||||||
|
import 'package:revanced_manager/services/github_api.dart';
|
||||||
import 'package:revanced_manager/services/manager_api.dart';
|
import 'package:revanced_manager/services/manager_api.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
|
||||||
@lazySingleton
|
@lazySingleton
|
||||||
class HomeViewModel extends BaseViewModel {
|
class HomeViewModel extends BaseViewModel {
|
||||||
|
final GithubAPI githubAPI = GithubAPI();
|
||||||
bool showUpdatableApps = true;
|
bool showUpdatableApps = true;
|
||||||
|
|
||||||
void toggleUpdatableApps(bool value) {
|
void toggleUpdatableApps(bool value) {
|
||||||
@ -19,10 +21,20 @@ class HomeViewModel extends BaseViewModel {
|
|||||||
Future downloadIntegrations() => locator<ManagerAPI>().downloadIntegrations();
|
Future downloadIntegrations() => locator<ManagerAPI>().downloadIntegrations();
|
||||||
|
|
||||||
Future<List<PatchedApplication>> getPatchedApps(bool isUpdatable) async {
|
Future<List<PatchedApplication>> getPatchedApps(bool isUpdatable) async {
|
||||||
|
List<PatchedApplication> list = [];
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
List<String> patchedApps = prefs.getStringList('patchedApps') ?? [];
|
List<String> patchedApps = prefs.getStringList('patchedApps') ?? [];
|
||||||
return patchedApps
|
for (String str in patchedApps) {
|
||||||
.map((app) => PatchedApplication.fromJson(json.decode(app)))
|
PatchedApplication app = PatchedApplication.fromJson(json.decode(str));
|
||||||
.toList();
|
bool hasUpdates = await githubAPI.hasUpdates(
|
||||||
|
app,
|
||||||
|
'revanced',
|
||||||
|
'revanced-patches',
|
||||||
|
);
|
||||||
|
if (hasUpdates == isUpdatable) {
|
||||||
|
list.add(app);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_i18n/flutter_i18n.dart';
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:revanced_manager/app/app.locator.dart';
|
import 'package:revanced_manager/app/app.locator.dart';
|
||||||
import 'package:revanced_manager/ui/views/installer/installer_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/installer/installer_viewmodel.dart';
|
||||||
@ -84,7 +83,7 @@ class InstallerView extends StatelessWidget {
|
|||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
model.logs,
|
model.logs,
|
||||||
style: GoogleFonts.jetBrainsMono(
|
style: GoogleFonts.jetBrainsMono(
|
||||||
fontSize: 12,
|
fontSize: 13,
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'dart:convert';
|
||||||
import 'package:device_apps/device_apps.dart';
|
import 'package:device_apps/device_apps.dart';
|
||||||
import 'package:flutter_background/flutter_background.dart';
|
import 'package:flutter_background/flutter_background.dart';
|
||||||
import 'package:revanced_manager/app/app.locator.dart';
|
import 'package:revanced_manager/app/app.locator.dart';
|
||||||
@ -151,7 +152,7 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
Future<void> saveApp(PatchedApplication selectedApp) async {
|
Future<void> saveApp(PatchedApplication selectedApp) async {
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
List<String> patchedApps = prefs.getStringList('patchedApps') ?? [];
|
List<String> patchedApps = prefs.getStringList('patchedApps') ?? [];
|
||||||
String app = selectedApp.toJson().toString();
|
String app = json.encode(selectedApp.toJson());
|
||||||
if (!patchedApps.contains(app)) {
|
if (!patchedApps.contains(app)) {
|
||||||
patchedApps.add(app);
|
patchedApps.add(app);
|
||||||
prefs.setStringList('patchedApps', patchedApps);
|
prefs.setStringList('patchedApps', patchedApps);
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_i18n/flutter_i18n.dart';
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
@ -32,8 +34,11 @@ class AppSelectorCard extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
const SizedBox(height: 10),
|
||||||
I18nText(
|
I18nText(
|
||||||
'appSelectorCard.widgetTitle',
|
locator<AppSelectorViewModel>().selectedApp == null
|
||||||
|
? 'appSelectorCard.widgetTitle'
|
||||||
|
: 'appSelectorCard.widgetTitleSelected',
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style: GoogleFonts.roboto(
|
style: GoogleFonts.roboto(
|
||||||
@ -43,17 +48,35 @@ class AppSelectorCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
locator<AppSelectorViewModel>().selectedApp != null
|
locator<AppSelectorViewModel>().selectedApp == null
|
||||||
? Text(
|
? I18nText(
|
||||||
_getAppSelection(),
|
|
||||||
style: robotoTextStyle,
|
|
||||||
)
|
|
||||||
: I18nText(
|
|
||||||
'appSelectorCard.widgetSubtitle',
|
'appSelectorCard.widgetSubtitle',
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style: robotoTextStyle,
|
style: robotoTextStyle,
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16.0,
|
||||||
|
child: ClipOval(
|
||||||
|
child: Image.memory(
|
||||||
|
locator<AppSelectorViewModel>().selectedApp == null
|
||||||
|
? Uint8List(0)
|
||||||
|
: locator<AppSelectorViewModel>()
|
||||||
|
.selectedApp!
|
||||||
|
.icon,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 4),
|
||||||
|
Text(
|
||||||
|
_getAppSelection(),
|
||||||
|
style: robotoTextStyle,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -12,7 +12,7 @@ class ApplicationItem extends StatelessWidget {
|
|||||||
final Uint8List icon;
|
final Uint8List icon;
|
||||||
final String name;
|
final String name;
|
||||||
final DateTime patchDate;
|
final DateTime patchDate;
|
||||||
final String? changelog;
|
final String changelog;
|
||||||
final bool isUpdatableApp;
|
final bool isUpdatableApp;
|
||||||
final Function()? onPressed;
|
final Function()? onPressed;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class ApplicationItem extends StatelessWidget {
|
|||||||
required this.icon,
|
required this.icon,
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.patchDate,
|
required this.patchDate,
|
||||||
this.changelog = '',
|
required this.changelog,
|
||||||
required this.isUpdatableApp,
|
required this.isUpdatableApp,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
@ -66,7 +66,7 @@ class ApplicationItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
format(patchDate),
|
format(patchDate, locale: 'en_short'),
|
||||||
style: robotoTextStyle.copyWith(
|
style: robotoTextStyle.copyWith(
|
||||||
color: Theme.of(context).colorScheme.tertiary,
|
color: Theme.of(context).colorScheme.tertiary,
|
||||||
),
|
),
|
||||||
@ -104,7 +104,7 @@ class ApplicationItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
changelog!,
|
changelog,
|
||||||
style: robotoTextStyle,
|
style: robotoTextStyle,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:revanced_manager/app/app.locator.dart';
|
import 'package:revanced_manager/app/app.locator.dart';
|
||||||
import 'package:revanced_manager/models/patched_application.dart';
|
import 'package:revanced_manager/models/patched_application.dart';
|
||||||
|
import 'package:revanced_manager/services/github_api.dart';
|
||||||
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/widgets/application_item.dart';
|
import 'package:revanced_manager/ui/widgets/application_item.dart';
|
||||||
|
|
||||||
class AvailableUpdatesCard extends StatelessWidget {
|
class AvailableUpdatesCard extends StatelessWidget {
|
||||||
const AvailableUpdatesCard({
|
AvailableUpdatesCard({
|
||||||
Key? key,
|
Key? key,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final GithubAPI githubAPI = GithubAPI();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
@ -18,15 +21,27 @@ class AvailableUpdatesCard extends StatelessWidget {
|
|||||||
FutureBuilder<List<PatchedApplication>>(
|
FutureBuilder<List<PatchedApplication>>(
|
||||||
future: locator<HomeViewModel>().getPatchedApps(true),
|
future: locator<HomeViewModel>().getPatchedApps(true),
|
||||||
builder: (context, snapshot) =>
|
builder: (context, snapshot) =>
|
||||||
snapshot.hasData && snapshot.data!.length > 1
|
snapshot.hasData && snapshot.data!.isNotEmpty
|
||||||
? ListView.builder(
|
? ListView.builder(
|
||||||
itemBuilder: (context, index) => ApplicationItem(
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: snapshot.data!.length,
|
||||||
|
itemBuilder: (context, index) => FutureBuilder<String>(
|
||||||
|
future: githubAPI.getChangelog(
|
||||||
|
snapshot.data![index],
|
||||||
|
'revanced',
|
||||||
|
'revanced-patches',
|
||||||
|
),
|
||||||
|
initialData: '',
|
||||||
|
builder: (context, snapshot2) => ApplicationItem(
|
||||||
icon: snapshot.data![index].icon,
|
icon: snapshot.data![index].icon,
|
||||||
name: snapshot.data![index].name,
|
name: snapshot.data![index].name,
|
||||||
patchDate: snapshot.data![index].patchDate,
|
patchDate: snapshot.data![index].patchDate,
|
||||||
|
changelog: snapshot2.data!,
|
||||||
isUpdatableApp: true,
|
isUpdatableApp: true,
|
||||||
onPressed: () => {},
|
onPressed: () => {},
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: Container(),
|
: Container(),
|
||||||
),
|
),
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:revanced_manager/app/app.locator.dart';
|
import 'package:revanced_manager/app/app.locator.dart';
|
||||||
import 'package:revanced_manager/models/patched_application.dart';
|
import 'package:revanced_manager/models/patched_application.dart';
|
||||||
|
import 'package:revanced_manager/services/github_api.dart';
|
||||||
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/widgets/application_item.dart';
|
import 'package:revanced_manager/ui/widgets/application_item.dart';
|
||||||
|
|
||||||
class InstalledAppsCard extends StatelessWidget {
|
class InstalledAppsCard extends StatelessWidget {
|
||||||
const InstalledAppsCard({
|
InstalledAppsCard({
|
||||||
Key? key,
|
Key? key,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final GithubAPI githubAPI = GithubAPI();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
@ -18,15 +21,27 @@ class InstalledAppsCard extends StatelessWidget {
|
|||||||
FutureBuilder<List<PatchedApplication>>(
|
FutureBuilder<List<PatchedApplication>>(
|
||||||
future: locator<HomeViewModel>().getPatchedApps(false),
|
future: locator<HomeViewModel>().getPatchedApps(false),
|
||||||
builder: (context, snapshot) =>
|
builder: (context, snapshot) =>
|
||||||
snapshot.hasData && snapshot.data!.length > 1
|
snapshot.hasData && snapshot.data!.isNotEmpty
|
||||||
? ListView.builder(
|
? ListView.builder(
|
||||||
itemBuilder: (context, index) => ApplicationItem(
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: snapshot.data!.length,
|
||||||
|
itemBuilder: (context, index) => FutureBuilder<String>(
|
||||||
|
future: githubAPI.getChangelog(
|
||||||
|
snapshot.data![index],
|
||||||
|
'revanced',
|
||||||
|
'revanced-patches',
|
||||||
|
),
|
||||||
|
initialData: '',
|
||||||
|
builder: (context, snapshot2) => ApplicationItem(
|
||||||
icon: snapshot.data![index].icon,
|
icon: snapshot.data![index].icon,
|
||||||
name: snapshot.data![index].name,
|
name: snapshot.data![index].name,
|
||||||
patchDate: snapshot.data![index].patchDate,
|
patchDate: snapshot.data![index].patchDate,
|
||||||
|
changelog: snapshot2.data!,
|
||||||
isUpdatableApp: false,
|
isUpdatableApp: false,
|
||||||
onPressed: () => {},
|
onPressed: () => {},
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: Container(),
|
: Container(),
|
||||||
),
|
),
|
||||||
|
@ -32,7 +32,9 @@ class PatchSelectorCard extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
I18nText(
|
I18nText(
|
||||||
'patchSelectorCard.widgetTitle',
|
locator<PatchesSelectorViewModel>().selectedPatches.isEmpty
|
||||||
|
? 'patchSelectorCard.widgetTitle'
|
||||||
|
: 'patchSelectorCard.widgetTitleSelected',
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style: GoogleFonts.roboto(
|
style: GoogleFonts.roboto(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user