feat: Allow changing languages (#1488)

Co-authored-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
Ushie
2024-02-12 02:22:25 +03:00
committed by GitHub
parent c498cff096
commit f82c439b26
64 changed files with 1302 additions and 1488 deletions

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/models/patched_application.dart';
import 'package:revanced_manager/ui/widgets/appInfoView/app_info_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
@ -22,13 +22,10 @@ class AppInfoView extends StatelessWidget {
body: CustomScrollView(
slivers: <Widget>[
CustomSliverAppBar(
title: I18nText(
'appInfoView.widgetTitle',
child: Text(
'',
style: GoogleFonts.inter(
color: Theme.of(context).textTheme.titleLarge!.color,
),
title: Text(
t.appInfoView.widgetTitle,
style: GoogleFonts.inter(
color: Theme.of(context).textTheme.titleLarge!.color,
),
),
),
@ -86,16 +83,13 @@ class AppInfoView extends StatelessWidget {
.primary,
),
const SizedBox(height: 10),
I18nText(
'appInfoView.openButton',
child: Text(
'',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
fontWeight: FontWeight.bold,
),
Text(
t.appInfoView.openButton,
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
fontWeight: FontWeight.bold,
),
),
],
@ -130,16 +124,13 @@ class AppInfoView extends StatelessWidget {
.primary,
),
const SizedBox(height: 10),
I18nText(
'appInfoView.uninstallButton',
child: Text(
'',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
fontWeight: FontWeight.bold,
),
Text(
t.appInfoView.uninstallButton,
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
fontWeight: FontWeight.bold,
),
),
],
@ -183,16 +174,13 @@ class AppInfoView extends StatelessWidget {
.primary,
),
const SizedBox(height: 10),
I18nText(
'appInfoView.unmountButton',
child: Text(
'',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
fontWeight: FontWeight.bold,
),
Text(
t.appInfoView.unmountButton,
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
fontWeight: FontWeight.bold,
),
),
],
@ -209,14 +197,11 @@ class AppInfoView extends StatelessWidget {
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'appInfoView.packageNameLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.appInfoView.packageNameLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: Text(app.packageName),
@ -225,61 +210,50 @@ class AppInfoView extends StatelessWidget {
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'appInfoView.installTypeLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.appInfoView.installTypeLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: app.isRooted
? I18nText('appInfoView.mountTypeLabel')
: I18nText('appInfoView.regularTypeLabel'),
? Text(t.appInfoView.mountTypeLabel)
: Text(t.appInfoView.regularTypeLabel),
),
const SizedBox(height: 4),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'appInfoView.patchedDateLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.appInfoView.patchedDateLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText(
'appInfoView.patchedDateHint',
translationParams: {
'date': model.getPrettyDate(context, app.patchDate),
'time': model.getPrettyTime(context, app.patchDate),
},
subtitle: Text(
t.appInfoView.patchedDateHint(
date: model.getPrettyDate(context, app.patchDate),
time: model.getPrettyTime(context, app.patchDate),
),
),
),
const SizedBox(height: 4),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'appInfoView.appliedPatchesLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.appInfoView.appliedPatchesLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText(
'appInfoView.appliedPatchesHint',
translationParams: {
'quantity': app.appliedPatches.length.toString(),
},
subtitle: Text(
t.appInfoView.appliedPatchesHint(
quantity: app.appliedPatches.length.toString(),
),
),
onTap: () => model.showAppliedPatchesDialog(context, app),
),

View File

@ -1,9 +1,9 @@
// ignore_for_file: use_build_context_synchronously
import 'package:device_apps/device_apps.dart';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:intl/intl.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/models/patched_application.dart';
import 'package:revanced_manager/services/manager_api.dart';
import 'package:revanced_manager/services/patcher_api.dart';
@ -32,7 +32,7 @@ class AppInfoViewModel extends BaseViewModel {
isUninstalled = await DeviceApps.uninstallApp(app.packageName);
}
if (isUninstalled && app.isRooted && await _rootAPI.hasRootPermissions()) {
if (isUninstalled && app.isRooted && await _rootAPI.hasRootPermissions()) {
await _rootAPI.uninstall(app.packageName);
}
@ -51,7 +51,7 @@ class AppInfoViewModel extends BaseViewModel {
}
void updateNotImplemented(BuildContext context) {
_toast.showBottom('appInfoView.updateNotImplemented');
_toast.showBottom(t.appInfoView.updateNotImplemented);
}
Future<void> showUninstallDialog(
@ -64,12 +64,12 @@ class AppInfoViewModel extends BaseViewModel {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText('appInfoView.rootDialogTitle'),
content: I18nText('appInfoView.rootDialogText'),
title: Text(t.appInfoView.rootDialogTitle),
content: Text(t.appInfoView.rootDialogText),
actions: <Widget>[
FilledButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('okButton'),
child: Text(t.okButton),
),
],
),
@ -79,16 +79,12 @@ class AppInfoViewModel extends BaseViewModel {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText(
'appInfoView.unmountButton',
),
content: I18nText(
'appInfoView.unmountDialogText',
),
title: Text(t.appInfoView.unmountButton),
content: Text(t.appInfoView.unmountDialogText),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('noButton'),
child: Text(t.noButton),
),
FilledButton(
onPressed: () {
@ -96,7 +92,7 @@ class AppInfoViewModel extends BaseViewModel {
Navigator.of(context).pop();
Navigator.of(context).pop();
},
child: I18nText('yesButton'),
child: Text(t.yesButton),
),
],
),
@ -105,16 +101,12 @@ class AppInfoViewModel extends BaseViewModel {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText(
'appInfoView.uninstallButton',
),
content: I18nText(
'appInfoView.uninstallDialogText',
),
title: Text(t.appInfoView.uninstallButton),
content: Text(t.appInfoView.uninstallDialogText),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('noButton'),
child: Text(t.noButton),
),
FilledButton(
onPressed: () {
@ -122,7 +114,7 @@ class AppInfoViewModel extends BaseViewModel {
Navigator.of(context).pop();
Navigator.of(context).pop();
},
child: I18nText('yesButton'),
child: Text(t.yesButton),
),
],
),
@ -148,14 +140,14 @@ class AppInfoViewModel extends BaseViewModel {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText('appInfoView.appliedPatchesLabel'),
title: Text(t.appInfoView.appliedPatchesLabel),
content: SingleChildScrollView(
child: Text(getAppliedPatchesString(app.appliedPatches)),
),
actions: <Widget>[
FilledButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('okButton'),
child: Text(t.okButton),
),
],
),

View File

@ -1,6 +1,6 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
class InstalledAppItem extends StatefulWidget {
@ -107,16 +107,12 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
I18nText(
'suggested',
translationParams: {
'version': widget.suggestedVersion.isEmpty
? FlutterI18n.translate(
context,
'appSelectorCard.anyVersion',
)
: widget.suggestedVersion,
},
Text(
t.suggested(
version: widget.suggestedVersion.isEmpty
? Text(t.appSelectorCard.anyVersion)
: 'v${widget.suggestedVersion}',
),
),
const SizedBox(width: 4),
Icon(

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
class NotInstalledAppItem extends StatefulWidget {
@ -91,16 +91,12 @@ class _NotInstalledAppItem extends State<NotInstalledAppItem> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
I18nText(
'suggested',
translationParams: {
'version': widget.suggestedVersion.isEmpty
? FlutterI18n.translate(
context,
'appSelectorCard.anyVersion',
)
: widget.suggestedVersion,
},
Text(
t.suggested(
version: widget.suggestedVersion.isEmpty
? t.appSelectorCard.anyVersion
: 'v${widget.suggestedVersion}',
),
),
const SizedBox(width: 4),
Icon(

View File

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_cache_manager/file.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/services/download_manager.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
import 'package:url_launcher/url_launcher.dart';
@ -26,14 +25,11 @@ class _ContributorsCardState extends State<ContributorsCard> {
children: <Widget>[
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: I18nText(
child: Text(
widget.title,
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
),

View File

@ -1,7 +1,7 @@
import 'package:device_apps/device_apps.dart';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/models/patched_application.dart';
import 'package:revanced_manager/services/manager_api.dart';
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
@ -51,19 +51,15 @@ class InstalledAppsCard extends StatelessWidget {
color: Theme.of(context).colorScheme.secondary,
),
const SizedBox(height: 16),
I18nText(
'homeView.noInstallations',
child: Text(
'',
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(
color:
Theme.of(context).colorScheme.secondary,
),
),
Text(
t.homeView.noInstallations,
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(
color: Theme.of(context).colorScheme.secondary,
),
),
],
),

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
@ -39,13 +39,13 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
children: <Widget>[
FutureBuilder<String?>(
future: model.getLatestManagerReleaseTime(),
builder: (context, snapshot) => snapshot.hasData &&
snapshot.data!.isNotEmpty
? I18nText(
'latestCommitCard.timeagoLabel',
translationParams: {'time': snapshot.data!},
)
: I18nText('latestCommitCard.loadingLabel'),
builder: (context, snapshot) =>
snapshot.hasData && snapshot.data!.isNotEmpty
? Text(
t.latestCommitCard
.timeagoLabel(time: snapshot.data!),
)
: Text(t.latestCommitCard.loadingLabel),
),
],
),
@ -62,8 +62,8 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
!snapshot.data!,
),
child: (snapshot.hasData && !snapshot.data!)
? I18nText('showChangelogButton')
: I18nText('showUpdateButton'),
? Text(t.showChangelogButton)
: Text(t.showUpdateButton),
),
),
],
@ -89,15 +89,9 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
future: model.getLatestPatchesReleaseTime(),
builder: (context, snapshot) => Text(
snapshot.hasData && snapshot.data!.isNotEmpty
? FlutterI18n.translate(
context,
'latestCommitCard.timeagoLabel',
translationParams: {'time': snapshot.data!},
)
: FlutterI18n.translate(
context,
'latestCommitCard.loadingLabel',
),
? t.latestCommitCard
.timeagoLabel(time: snapshot.data!)
: t.latestCommitCard.loadingLabel,
),
),
],
@ -115,8 +109,8 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
!snapshot.data!,
),
child: (snapshot.hasData && !snapshot.data!)
? I18nText('showChangelogButton')
: I18nText('showUpdateButton'),
? Text(t.showChangelogButton)
: Text(t.showUpdateButton),
),
),
],

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
class UpdateConfirmationSheet extends StatelessWidget {
@ -51,16 +51,13 @@ class UpdateConfirmationSheet extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
I18nText(
Text(
isPatches
? 'homeView.updatePatchesSheetTitle'
: 'homeView.updateSheetTitle',
child: const Text(
'',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
? t.homeView.updatePatchesSheetTitle
: t.homeView.updateSheetTitle,
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 4.0),
@ -94,40 +91,36 @@ class UpdateConfirmationSheet extends StatelessWidget {
? model.updatePatches(context)
: model.updateManager(context);
},
child: I18nText('updateButton'),
child: Text(t.updateButton),
),
],
),
),
Padding(
padding: const EdgeInsets.only(top: 12.0, left: 24.0, bottom: 12.0),
child: I18nText(
'homeView.updateChangelogTitle',
child: Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
child: Text(
t.homeView.updateChangelogTitle,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
color:
Theme.of(context).colorScheme.onSecondaryContainer,
),
),
),
),
Container(
margin: const EdgeInsets.symmetric(horizontal: 24.0),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondaryContainer,
borderRadius: BorderRadius.circular(12.0),
Container(
margin: const EdgeInsets.symmetric(horizontal: 24.0),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondaryContainer,
borderRadius: BorderRadius.circular(12.0),
),
child: Markdown(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
padding: const EdgeInsets.all(20.0),
data: snapshot.data!['body'] ?? '',
),
),
child: Markdown(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
padding: const EdgeInsets.all(20.0),
data: snapshot.data!['body'] ?? '',
),
),
],
);
},

View File

@ -1,7 +1,8 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
@ -28,21 +29,18 @@ class AppSelectorCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
I18nText(
Text(
vm.selectedApp == null
? 'appSelectorCard.widgetTitle'
: 'appSelectorCard.widgetTitleSelected',
child: const Text(
'',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
),
? t.appSelectorCard.widgetTitle
: t.appSelectorCard.widgetTitleSelected,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 8),
if (vm.selectedApp == null)
I18nText('appSelectorCard.widgetSubtitle')
Text(t.appSelectorCard.widgetSubtitle)
else
Row(
children: <Widget>[
@ -96,11 +94,10 @@ class AppSelectorCard extends StatelessWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
I18nText(
'suggested',
translationParams: {
'version': suggestedVersion,
},
Text(
t.suggested(
version: suggestedVersion,
),
),
const SizedBox(width: 4),
Icon(

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
@ -21,16 +21,13 @@ class PatchSelectorCard extends StatelessWidget {
children: <Widget>[
Row(
children: <Widget>[
I18nText(
Text(
locator<PatcherViewModel>().selectedPatches.isEmpty
? 'patchSelectorCard.widgetTitle'
: 'patchSelectorCard.widgetTitleSelected',
child: const Text(
'',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
),
? t.patchSelectorCard.widgetTitle
: t.patchSelectorCard.widgetTitleSelected,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
Text(
@ -46,10 +43,10 @@ class PatchSelectorCard extends StatelessWidget {
),
const SizedBox(height: 4),
if (locator<PatcherViewModel>().selectedApp == null)
I18nText('patchSelectorCard.widgetSubtitle')
Text(t.patchSelectorCard.widgetSubtitle)
else
locator<PatcherViewModel>().selectedPatches.isEmpty
? I18nText('patchSelectorCard.widgetEmptySubtitle')
? Text(t.patchSelectorCard.widgetEmptySubtitle)
: Text(_getPatchesSelection()),
],
),

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/services/manager_api.dart';
import 'package:revanced_manager/services/toast.dart';
@ -162,7 +162,7 @@ class _PatchItemState extends State<PatchItem> {
Padding(
padding: const EdgeInsets.only(top: 8),
child: TextButton.icon(
label: I18nText('warning'),
label: Text(t.warning),
icon: const Icon(
Icons.warning_amber_outlined,
size: 20.0,
@ -215,19 +215,18 @@ class _PatchItemState extends State<PatchItem> {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText('warning'),
content: I18nText(
'patchItem.unsupportedDialogText',
translationParams: {
'packageVersion': widget.packageVersion,
'supportedVersions':
title: Text(t.warning),
content: Text(
t.patchItem.unsupportedDialogText(
packageVersion: widget.packageVersion,
supportedVersions:
'${widget.supportedPackageVersions.reversed.join('\n')}',
},
),
),
actions: <Widget>[
FilledButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('okButton'),
child: Text(t.okButton),
),
],
),
@ -238,14 +237,14 @@ class _PatchItemState extends State<PatchItem> {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText('notice'),
content: I18nText(
'patchItem.unsupportedRequiredOption',
title: Text(t.notice),
content: Text(
t.patchItem.unsupportedRequiredOption,
),
actions: <Widget>[
FilledButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('okButton'),
child: Text(t.okButton),
),
],
),

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_file_dialog/flutter_file_dialog.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
@ -93,13 +93,10 @@ class IntAndStringPatchOption extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 8),
I18nText(
'patchOptionsView.requiredOption',
child: Text(
'',
style: TextStyle(
color: Theme.of(context).colorScheme.error,
),
Text(
t.patchOptionsView.requiredOption,
style: TextStyle(
color: Theme.of(context).colorScheme.error,
),
),
],
@ -240,14 +237,11 @@ class IntStringLongListPatchOption extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.add, size: 20),
I18nText(
'add',
child: const Text(
'',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
),
Text(
t.add,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
],
@ -279,13 +273,10 @@ class UnsupportedPatchOption extends StatelessWidget {
alignment: Alignment.centerLeft,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: I18nText(
'patchOptionsView.unsupportedOption',
child: const Text(
'',
style: TextStyle(
fontSize: 16,
),
child: Text(
t.patchOptionsView.unsupportedOption,
style: const TextStyle(
fontSize: 16,
),
),
),
@ -452,13 +443,10 @@ class _TextFieldForPatchOptionState extends State<TextFieldForPatchOption> {
..add(
DropdownMenuItem(
value: '',
child: I18nText(
'patchOptionsView.customValue',
child: const Text(
'',
style: TextStyle(
fontSize: 16,
),
child: Text(
t.patchOptionsView.customValue,
style: const TextStyle(
fontSize: 16,
),
),
),
@ -491,25 +479,22 @@ class _TextFieldForPatchOptionState extends State<TextFieldForPatchOption> {
isStringOption ? TextInputType.text : TextInputType.number,
decoration: InputDecoration(
suffixIcon: PopupMenuButton(
tooltip: FlutterI18n.translate(
context,
'patchOptionsView.tooltip',
),
tooltip: t.patchOptionsView.tooltip,
itemBuilder: (BuildContext context) {
return [
if (isArrayOption)
PopupMenuItem(
value: 'remove',
child: I18nText('remove'),
value: t.remove,
child: Text(t.remove),
),
if (isStringOption) ...[
PopupMenuItem(
value: 'patchOptionsView.selectFilePath',
child: I18nText('patchOptionsView.selectFilePath'),
value: t.patchOptionsView.selectFilePath,
child: Text(t.patchOptionsView.selectFilePath),
),
PopupMenuItem(
value: 'patchOptionsView.selectFolder',
child: I18nText('patchOptionsView.selectFolder'),
value: t.patchOptionsView.selectFolder,
child: Text(t.patchOptionsView.selectFolder),
),
],
];

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/utils/about_info.dart';
class AboutWidget extends StatefulWidget {
@ -34,21 +34,18 @@ class _AboutWidgetState extends State<AboutWidget> {
);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: I18nText('settingsView.snackbarMessage'),
content: Text(t.settingsView.snackbarMessage),
backgroundColor:
Theme.of(context).colorScheme.secondary,
),
);
}
: null,
title: I18nText(
'settingsView.aboutLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.aboutLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: snapshot.hasData

View File

@ -1,6 +1,7 @@
// ignore_for_file: prefer_const_constructors
import 'package:flutter/material.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_api_url.dart';
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_sources.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_auto_update_patches.dart';
@ -17,7 +18,7 @@ class SAdvancedSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SettingsSection(
title: 'settingsView.advancedSectionTitle',
title: t.settingsView.advancedSectionTitle,
children: const <Widget>[
SAutoUpdatePatches(),
SShowUpdateDialog(),

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/haptics/haptic_switch_list_tile.dart';
@ -17,17 +17,14 @@ class _SAutoUpdatePatchesState extends State<SAutoUpdatePatches> {
Widget build(BuildContext context) {
return HapticSwitchListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.autoUpdatePatchesLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.autoUpdatePatchesLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.autoUpdatePatchesHint'),
subtitle: Text(t.settingsView.autoUpdatePatchesHint),
value: _settingsViewModel.isPatchesAutoUpdate(),
onChanged: (value) {
setState(() {

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/settingsView/about_widget.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_section.dart';
@ -12,51 +12,42 @@ class SDebugSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SettingsSection(
title: 'settingsView.debugSectionTitle',
title: t.settingsView.debugSectionTitle,
children: <Widget>[
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.logsLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.logsLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.logsHint'),
subtitle: Text(t.settingsView.logsHint),
onTap: () => _settingsViewModel.exportLogcatLogs(),
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.deleteLogsLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.deleteLogsLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.deleteLogsHint'),
subtitle: Text(t.settingsView.deleteLogsHint),
onTap: () => _settingsViewModel.deleteLogs(),
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.deleteTempDirLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.deleteTempDirLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.deleteTempDirHint'),
subtitle: Text(t.settingsView.deleteTempDirHint),
onTap: () => _settingsViewModel.deleteTempDir(),
),
const AboutWidget(

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/haptics/haptic_switch_list_tile.dart';
@ -18,17 +18,14 @@ class _SEnablePatchesSelectionState extends State<SEnablePatchesSelection> {
Widget build(BuildContext context) {
return HapticSwitchListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.enablePatchesSelectionLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.enablePatchesSelectionLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.enablePatchesSelectionHint'),
subtitle: Text(t.settingsView.enablePatchesSelectionHint),
value: _settingsViewModel.isPatchesChangeEnabled(),
onChanged: (value) async {
await _settingsViewModel.showPatchesChangeEnableDialog(value, context);

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_keystore_password.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_section.dart';
@ -12,106 +12,88 @@ class SExportSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SettingsSection(
title: 'settingsView.exportSectionTitle',
title: t.settingsView.exportSectionTitle,
children: <Widget>[
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.exportPatchesLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.exportPatchesLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.exportPatchesHint'),
subtitle: Text(t.settingsView.exportPatchesHint),
onTap: () => _settingsViewModel.exportPatches(),
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.importPatchesLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.importPatchesLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.importPatchesHint'),
subtitle: Text(t.settingsView.importPatchesHint),
onTap: () => _settingsViewModel.importPatches(context),
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.resetStoredPatchesLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.resetStoredPatchesLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.resetStoredPatchesHint'),
subtitle: Text(t.settingsView.resetStoredPatchesHint),
onTap: () => _showResetDialog(
context,
'settingsView.resetStoredPatchesDialogTitle',
'settingsView.resetStoredPatchesDialogText',
t.settingsView.resetStoredPatchesDialogTitle,
t.settingsView.resetStoredPatchesDialogText,
_settingsViewModel.resetSelectedPatches,
),
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.resetStoredOptionsLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.resetStoredOptionsLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.resetStoredOptionsHint'),
subtitle: Text(t.settingsView.resetStoredOptionsHint),
onTap: () => _showResetDialog(
context,
'settingsView.resetStoredOptionsDialogTitle',
'settingsView.resetStoredOptionsDialogText',
t.settingsView.resetStoredOptionsDialogTitle,
t.settingsView.resetStoredOptionsDialogText,
_settingsViewModel.resetAllOptions,
),
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.exportKeystoreLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.exportKeystoreLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.exportKeystoreHint'),
subtitle: Text(t.settingsView.exportKeystoreHint),
onTap: () => _settingsViewModel.exportKeystore(),
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.importKeystoreLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.importKeystoreLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.importKeystoreHint'),
subtitle: Text(t.settingsView.importKeystoreHint),
onTap: () async {
await _settingsViewModel.importKeystore();
final sManageKeystorePassword = SManageKeystorePassword();
@ -122,17 +104,14 @@ class SExportSection extends StatelessWidget {
),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.regenerateKeystoreLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.regenerateKeystoreLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.regenerateKeystoreHint'),
subtitle: Text(t.settingsView.regenerateKeystoreHint),
onTap: () => _showDeleteKeystoreDialog(context),
),
// SManageKeystorePasswordUI(),
@ -149,19 +128,19 @@ class SExportSection extends StatelessWidget {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText(dialogTitle),
content: I18nText(dialogText),
title: Text(dialogTitle),
content: Text(dialogText),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('noButton'),
child: Text(t.noButton),
),
FilledButton(
onPressed: () => {
Navigator.of(context).pop(),
dialogAction(),
},
child: I18nText('yesButton'),
child: Text(t.yesButton),
),
],
),
@ -172,19 +151,19 @@ class SExportSection extends StatelessWidget {
return showDialog(
context: context,
builder: (context) => AlertDialog(
title: I18nText('settingsView.regenerateKeystoreDialogTitle'),
content: I18nText('settingsView.regenerateKeystoreDialogText'),
title: Text(t.settingsView.regenerateKeystoreDialogTitle),
content: Text(t.settingsView.regenerateKeystoreDialogText),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('noButton'),
child: Text(t.noButton),
),
FilledButton(
onPressed: () => {
Navigator.of(context).pop(),
_settingsViewModel.deleteKeystore(),
},
child: I18nText('yesButton'),
child: Text(t.yesButton),
),
],
),

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/haptics/haptic_switch_list_tile.dart';
@ -19,17 +19,14 @@ class _SRequireSuggestedAppVersionState
Widget build(BuildContext context) {
return HapticSwitchListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.requireSuggestedAppVersionLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.requireSuggestedAppVersionLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.requireSuggestedAppVersionHint'),
subtitle: Text(t.settingsView.requireSuggestedAppVersionHint),
value: _settingsViewModel.isRequireSuggestedAppVersionEnabled(),
onChanged: (value) async {
await _settingsViewModel.showRequireSuggestedAppVersionDialog(

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
class SettingsSection extends StatelessWidget {
const SettingsSection({
@ -17,13 +16,10 @@ class SettingsSection extends StatelessWidget {
children: <Widget>[
Container(
padding: const EdgeInsets.only(top: 16.0, bottom: 10.0, left: 20.0),
child: I18nText(
child: Text(
title,
child: Text(
'',
style: TextStyle(
color: Theme.of(context).colorScheme.primary,
),
style: TextStyle(
color: Theme.of(context).colorScheme.primary,
),
),
),

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/haptics/haptic_switch_list_tile.dart';
@ -17,17 +17,14 @@ class _SShowUpdateDialogState extends State<SShowUpdateDialog> {
Widget build(BuildContext context) {
return HapticSwitchListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.showUpdateDialogLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.showUpdateDialogLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.showUpdateDialogHint'),
subtitle: Text(t.settingsView.showUpdateDialogHint),
value: _settingsViewModel.showUpdateDialog(),
onChanged: (value) {
setState(() {

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_section.dart';
import 'package:revanced_manager/ui/widgets/settingsView/social_media_widget.dart';
@ -12,21 +12,18 @@ class STeamSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SettingsSection(
title: 'settingsView.teamSectionTitle',
title: t.settingsView.teamSectionTitle,
children: <Widget>[
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.contributorsLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.contributorsLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.contributorsHint'),
subtitle: Text(t.settingsView.contributorsHint),
onTap: () => _settingsViewModel.navigateToContributors(),
),
const SocialMediaWidget(

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
class SettingsTileDialog extends StatelessWidget {
const SettingsTileDialog({
@ -18,17 +17,14 @@ class SettingsTileDialog extends StatelessWidget {
Widget build(BuildContext context) {
return ListTile(
contentPadding: padding ?? EdgeInsets.zero,
title: I18nText(
title: Text(
title,
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText(subtitle),
subtitle: Text(subtitle),
onTap: onTap,
);
}

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
import 'package:revanced_manager/ui/views/patches_selector/patches_selector_viewmodel.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
@ -21,17 +21,14 @@ class _SUniversalPatchesState extends State<SUniversalPatches> {
Widget build(BuildContext context) {
return HapticSwitchListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.universalPatchesLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.universalPatchesLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.universalPatchesHint'),
subtitle: Text(t.settingsView.universalPatchesHint),
value: _settingsViewModel.areUniversalPatchesEnabled(),
onChanged: (value) {
setState(() {

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
import 'package:revanced_manager/ui/views/patches_selector/patches_selector_viewmodel.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
@ -24,17 +24,14 @@ class _SVersionCompatibilityCheckState
Widget build(BuildContext context) {
return HapticSwitchListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.versionCompatibilityCheckLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.settingsView.versionCompatibilityCheckLabel,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('settingsView.versionCompatibilityCheckHint'),
subtitle: Text(t.settingsView.versionCompatibilityCheckHint),
value: _settingsViewModel.isVersionCompatibilityCheckEnabled(),
onChanged: (value) {
setState(() {

View File

@ -1,7 +1,7 @@
import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/widgets/settingsView/social_media_item.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_icon.dart';
@ -26,17 +26,14 @@ class SocialMediaWidget extends StatelessWidget {
),
header: ListTile(
contentPadding: padding ?? EdgeInsets.zero,
title: I18nText(
'socialMediaCard.widgetTitle',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
title: Text(
t.socialMediaCard.widgetTitle,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
subtitle: I18nText('socialMediaCard.widgetSubtitle'),
subtitle: Text(t.socialMediaCard.widgetSubtitle),
),
expanded: Padding(
padding: padding ?? EdgeInsets.zero,

View File

@ -1,7 +1,7 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
import 'package:timeago/timeago.dart';
@ -81,7 +81,7 @@ class _ApplicationItemState extends State<ApplicationItem> {
children: <Widget>[
FilledButton(
onPressed: widget.onPressed,
child: I18nText('applicationItem.infoButton'),
child: Text(t.applicationItem.infoButton),
),
],
),