prod
This commit is contained in:
1 parent
5ae45d615e
commit
9e201bf12e
40 files changed
+4896
-490
No files matched your search
@@ -69,10 +69,6 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.matching { it.name.contains("AarMetadata") }.configureEach {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
arb-dir: lib/l10n
|
||||
template-arb-file: app_en.arb
|
||||
output-localization-file: app_localizations.dart
|
||||
output-dir: lib/l10n/generated
|
||||
@@ -2,7 +2,7 @@ class AppConstants {
|
||||
AppConstants._();
|
||||
|
||||
static const String appName = 'Catelli Barcode Reader';
|
||||
static const String appVersion = '1.0.0';
|
||||
static const String appVersion = '1.1.0';
|
||||
static const String organization = 'Catelli Srl';
|
||||
|
||||
// Network defaults
|
||||
@@ -24,6 +24,7 @@ class AppConstants {
|
||||
static const String keyVibrate = 'vibrate_enabled';
|
||||
static const String keySound = 'sound_enabled';
|
||||
static const String keyAimMode = 'scan_aim_mode';
|
||||
static const String keyLanguageCode = 'app_language_code';
|
||||
static const String keyHistory = 'scan_history';
|
||||
|
||||
// Suffix options
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import '../../features/scanner/domain/entities/scan_aim_mode.dart';
|
||||
import '../../l10n/generated/app_localizations.dart';
|
||||
|
||||
export '../../l10n/generated/app_localizations.dart';
|
||||
|
||||
extension AppLocalizationsX on BuildContext {
|
||||
/// Returns the active [AppLocalizations], falling back to Italian if a widget
|
||||
/// is pumped in an isolated test harness without localization delegates.
|
||||
AppLocalizations get l10n =>
|
||||
AppLocalizations.of(this) ?? lookupAppLocalizations(const Locale('it'));
|
||||
}
|
||||
|
||||
extension ScanAimModeL10n on ScanAimMode {
|
||||
String localizedLabel(AppLocalizations l10n) {
|
||||
switch (this) {
|
||||
case ScanAimMode.standard:
|
||||
return l10n.aimModeStandard;
|
||||
case ScanAimMode.precision:
|
||||
return l10n.aimModePrecision;
|
||||
case ScanAimMode.arMulti:
|
||||
return l10n.aimModeArMulti;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,8 @@ class AdService {
|
||||
static const String androidTestRewardedAdUnitId =
|
||||
'ca-app-pub-3940256099942544/5224354917';
|
||||
|
||||
// Set to true only when publishing the final public release to production.
|
||||
// Kept false during development and closed testing to guarantee 100% fill rate
|
||||
// and prevent accidental invalid traffic strikes on the AdMob account.
|
||||
static const bool useProductionAds = false;
|
||||
// Production Rewarded Ads enabled for release builds (debug builds still use test ads).
|
||||
static const bool useProductionAds = true;
|
||||
|
||||
RewardedAd? _rewardedAd;
|
||||
bool _isLoading = false;
|
||||
@@ -90,15 +88,8 @@ class AdService {
|
||||
_isLoading = true;
|
||||
|
||||
try {
|
||||
// 1. Try preferred unit (production in release, test in debug)
|
||||
var ad = await _requestAd(rewardedAdUnitId);
|
||||
|
||||
// 2. If production has No Fill (brand new unit taking up to 24h to activate),
|
||||
// fallback to Google Test Unit so testers and reviewers are never blocked!
|
||||
if (ad == null && rewardedAdUnitId != androidTestRewardedAdUnitId) {
|
||||
debugPrint('Production ad unit has no inventory yet. Falling back to test unit...');
|
||||
ad = await _requestAd(androidTestRewardedAdUnitId);
|
||||
}
|
||||
// Request preferred unit (production in release, official test unit in debug).
|
||||
final ad = await _requestAd(rewardedAdUnitId);
|
||||
|
||||
_rewardedAd = ad;
|
||||
_isLoading = false;
|
||||
|
||||
@@ -2,20 +2,26 @@ import 'dart:async';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:purchases_flutter/purchases_flutter.dart';
|
||||
import 'package:purchases_ui_flutter/purchases_ui_flutter.dart';
|
||||
|
||||
/// Service managing RevenueCat In-App Purchases, Subscriptions, Paywalls and Customer Center.
|
||||
enum PurchaseOutcome {
|
||||
purchased,
|
||||
cancelled,
|
||||
error,
|
||||
}
|
||||
|
||||
/// Service managing RevenueCat In-App Purchases and Subscriptions.
|
||||
class SubscriptionService {
|
||||
SubscriptionService();
|
||||
|
||||
// RevenueCat Google / Android API Key
|
||||
static const String apiKey = 'test_WfBStIXoLdiBaGJjDFgiLQSPjnl';
|
||||
// RevenueCat Google Play Production API Key
|
||||
static const String apiKey = 'goog_DwjzlZrJpLkGrgGjZttqXUmPBdM';
|
||||
|
||||
// Entitlement ID granting unlimited scanning
|
||||
static const String entitlementId = 'barcode_reader_pc_unlimited';
|
||||
|
||||
// Product IDs configured in RevenueCat
|
||||
// Product / Package identifiers configured in RevenueCat
|
||||
static const String productLifetime = 'lifetime';
|
||||
static const String productYearly = 'yearly';
|
||||
static const String productMonthly = 'monthly';
|
||||
@@ -72,7 +78,7 @@ class SubscriptionService {
|
||||
return entitlement != null && entitlement.isActive;
|
||||
}
|
||||
|
||||
/// Fetches available offerings and subscription packages from RevenueCat.
|
||||
/// Fetches available offerings from RevenueCat.
|
||||
Future<Offerings?> getOfferings() async {
|
||||
if (_isFlutterTest || kIsWeb || !_isConfigured) return null;
|
||||
try {
|
||||
@@ -83,6 +89,56 @@ class SubscriptionService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the current offering's available packages ordered as:
|
||||
/// Yearly -> Lifetime -> Monthly -> any other package.
|
||||
Future<List<Package>> getAvailablePackages() async {
|
||||
final offerings = await getOfferings();
|
||||
final packages = List<Package>.from(
|
||||
offerings?.current?.availablePackages ?? const <Package>[],
|
||||
);
|
||||
|
||||
int rank(Package pkg) {
|
||||
final id = pkg.identifier.toLowerCase();
|
||||
if (pkg.packageType == PackageType.annual || id.contains('year') || id.contains('annual')) {
|
||||
return 0;
|
||||
}
|
||||
if (pkg.packageType == PackageType.lifetime || id.contains('life')) {
|
||||
return 1;
|
||||
}
|
||||
if (pkg.packageType == PackageType.monthly || id.contains('month')) {
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
packages.sort((a, b) => rank(a).compareTo(rank(b)));
|
||||
return packages;
|
||||
}
|
||||
|
||||
/// Purchases a specific RevenueCat [Package].
|
||||
Future<PurchaseOutcome> purchasePackage(Package package) async {
|
||||
if (_isFlutterTest || kIsWeb || !_isConfigured) {
|
||||
return PurchaseOutcome.error;
|
||||
}
|
||||
try {
|
||||
final result = await Purchases.purchase(PurchaseParams.package(package));
|
||||
_customerInfoController.add(result.customerInfo);
|
||||
return isCustomerEntitled(result.customerInfo)
|
||||
? PurchaseOutcome.purchased
|
||||
: PurchaseOutcome.error;
|
||||
} on PlatformException catch (e) {
|
||||
final errorCode = PurchasesErrorHelper.getErrorCode(e);
|
||||
if (errorCode == PurchasesErrorCode.purchaseCancelledError) {
|
||||
return PurchaseOutcome.cancelled;
|
||||
}
|
||||
debugPrint('Purchase error ($errorCode): $e');
|
||||
return PurchaseOutcome.error;
|
||||
} catch (e) {
|
||||
debugPrint('Unexpected purchase error: $e');
|
||||
return PurchaseOutcome.error;
|
||||
}
|
||||
}
|
||||
|
||||
/// Restores existing purchases (e.g. after reinstalling the app or switching devices).
|
||||
Future<CustomerInfo?> restorePurchases() async {
|
||||
if (_isFlutterTest || kIsWeb || !_isConfigured) return null;
|
||||
@@ -96,56 +152,7 @@ class SubscriptionService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Presents the official RevenueCat Paywall UI.
|
||||
Future<PaywallResult> presentPaywall({Offering? offering}) async {
|
||||
if (_isFlutterTest || kIsWeb || !_isConfigured) {
|
||||
return PaywallResult.notPresented;
|
||||
}
|
||||
try {
|
||||
final result = await RevenueCatUI.presentPaywall(offering: offering);
|
||||
if (result == PaywallResult.purchased || result == PaywallResult.restored) {
|
||||
final info = await Purchases.getCustomerInfo();
|
||||
_customerInfoController.add(info);
|
||||
}
|
||||
return result;
|
||||
} catch (e) {
|
||||
debugPrint('Error presenting Paywall: $e');
|
||||
return PaywallResult.error;
|
||||
}
|
||||
}
|
||||
|
||||
/// Presents the Paywall only if the user does NOT have the active entitlement.
|
||||
Future<PaywallResult> presentPaywallIfNeeded() async {
|
||||
if (_isFlutterTest || kIsWeb || !_isConfigured) {
|
||||
return PaywallResult.notPresented;
|
||||
}
|
||||
try {
|
||||
final result = await RevenueCatUI.presentPaywallIfNeeded(entitlementId);
|
||||
if (result == PaywallResult.purchased || result == PaywallResult.restored) {
|
||||
final info = await Purchases.getCustomerInfo();
|
||||
_customerInfoController.add(info);
|
||||
}
|
||||
return result;
|
||||
} catch (e) {
|
||||
debugPrint('Error presenting Paywall if needed: $e');
|
||||
return PaywallResult.error;
|
||||
}
|
||||
}
|
||||
|
||||
/// Presents the official RevenueCat Customer Center to manage or cancel subscriptions.
|
||||
Future<void> presentCustomerCenter() async {
|
||||
if (_isFlutterTest || kIsWeb || !_isConfigured) return;
|
||||
try {
|
||||
await RevenueCatUI.presentCustomerCenter();
|
||||
final info = await Purchases.getCustomerInfo();
|
||||
_customerInfoController.add(info);
|
||||
} catch (e) {
|
||||
debugPrint('Error presenting Customer Center: $e');
|
||||
}
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
_customerInfoController.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/server_connection_info.dart';
|
||||
import '../../domain/repositories/connection_repository.dart';
|
||||
@@ -46,6 +47,7 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
}
|
||||
|
||||
void _onManualConnect() {
|
||||
final l10n = context.l10n;
|
||||
final name = _nameController.text.trim();
|
||||
final ip = _ipController.text.trim();
|
||||
final port = int.tryParse(_portController.text.trim()) ?? 8765;
|
||||
@@ -53,8 +55,8 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
|
||||
if (ip.isEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Inserisci un indirizzo IP valido del PC'),
|
||||
SnackBar(
|
||||
content: Text(l10n.enterValidIp),
|
||||
backgroundColor: AppTheme.error,
|
||||
),
|
||||
);
|
||||
@@ -65,7 +67,7 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
ip: ip,
|
||||
port: port,
|
||||
pin: pin,
|
||||
serverName: name.isNotEmpty ? name : 'PC Negozio',
|
||||
serverName: name.isNotEmpty ? name : l10n.defaultStorePcName,
|
||||
);
|
||||
|
||||
final timeout = context
|
||||
@@ -80,7 +82,7 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Connessione a $ip:$port in corso...'),
|
||||
content: Text(l10n.connectingToHost(ip, port)),
|
||||
backgroundColor: AppTheme.primary,
|
||||
),
|
||||
);
|
||||
@@ -89,12 +91,13 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final timeout =
|
||||
context.watch<SettingsCubit>().state.settings.inactivityTimeoutMinutes;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Connessione Postazioni PC'),
|
||||
title: Text(l10n.pcConnectionsTitle),
|
||||
),
|
||||
body: BlocConsumer<ConnectionCubit, ServerConnectionState>(
|
||||
listener: (context, state) {
|
||||
@@ -125,9 +128,10 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
borderRadius: BorderRadius.circular(14)),
|
||||
),
|
||||
icon: const Icon(Icons.qr_code_scanner_rounded, size: 22),
|
||||
label: const Text(
|
||||
'Inquadra QR Code sul PC',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
label: Text(
|
||||
l10n.scanPcQrCode,
|
||||
style: const TextStyle(
|
||||
fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
onPressed: () {
|
||||
showModalBottomSheet(
|
||||
@@ -144,16 +148,16 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'Postazioni Salvate nel Negozio',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
l10n.savedStoreWorkstations,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppTheme.darkTextPrimary,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${favorites.length} preferiti',
|
||||
l10n.favoritesCount(favorites.length),
|
||||
style: const TextStyle(
|
||||
fontSize: 12, color: AppTheme.darkTextSecondary),
|
||||
),
|
||||
@@ -217,7 +221,8 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
timeoutMinutes: timeout);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(isCurrent ? 'Attivo' : 'Connetti'),
|
||||
child:
|
||||
Text(isCurrent ? l10n.active : l10n.connect),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -232,9 +237,9 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'PC Rilevati in Wi-Fi',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
l10n.detectedWifiPcs,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppTheme.darkTextPrimary,
|
||||
@@ -251,7 +256,7 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
strokeWidth: 2, color: AppTheme.primary),
|
||||
)
|
||||
: const Icon(Icons.refresh_rounded, size: 20),
|
||||
tooltip: 'Aggiorna ricerca',
|
||||
tooltip: l10n.refreshDiscoveryTooltip,
|
||||
onPressed: discoveryState.isScanning
|
||||
? null
|
||||
: () =>
|
||||
@@ -274,18 +279,18 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
border: Border.all(color: AppTheme.darkBorder),
|
||||
),
|
||||
child: const Row(
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Ricerca server PC in corso sulla rete...',
|
||||
style: TextStyle(
|
||||
l10n.searchingPcServers,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextSecondary,
|
||||
fontSize: 13),
|
||||
),
|
||||
@@ -303,9 +308,9 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
border: Border.all(color: AppTheme.darkBorder),
|
||||
),
|
||||
child: const Text(
|
||||
'Nessun server PC rilevato automaticamente sulla rete.\nAssicurati che il programma sul PC sia avviato e connesso allo stesso Wi-Fi.',
|
||||
style: TextStyle(
|
||||
child: Text(
|
||||
l10n.noPcServersFound,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextSecondary,
|
||||
fontSize: 13,
|
||||
height: 1.4),
|
||||
@@ -340,18 +345,18 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
fontWeight: FontWeight.bold, fontSize: 15),
|
||||
),
|
||||
subtitle: Text(
|
||||
'${srv.ip}:${srv.port} ${srv.pinRequired ? "• Richiede PIN" : ""}',
|
||||
'${srv.ip}:${srv.port} ${srv.pinRequired ? "• ${l10n.requiresPin}" : ""}',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: AppTheme.darkTextSecondary),
|
||||
),
|
||||
trailing: isCurrent
|
||||
? const Chip(
|
||||
label: Text('Connesso',
|
||||
style: TextStyle(
|
||||
? Chip(
|
||||
label: Text(l10n.connected,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: AppTheme.success)),
|
||||
backgroundColor: Color(0xFF064E3B),
|
||||
backgroundColor: const Color(0xFF064E3B),
|
||||
side: BorderSide.none,
|
||||
)
|
||||
: FilledButton(
|
||||
@@ -371,7 +376,7 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text('Connetti'),
|
||||
child: Text(l10n.connect),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -383,9 +388,9 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
const SizedBox(height: 28),
|
||||
|
||||
// Method 3: Manual Setup
|
||||
const Text(
|
||||
'Configurazione Manuale',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
l10n.manualSetup,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppTheme.darkTextPrimary,
|
||||
@@ -395,20 +400,20 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
|
||||
TextField(
|
||||
controller: _nameController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Nome Postazione / PC (opzionale)',
|
||||
hintText: 'Es. Cassa 1, Magazzino, Ufficio',
|
||||
prefixIcon: Icon(Icons.badge_outlined, size: 20),
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.workstationNameLabel,
|
||||
hintText: l10n.workstationNameHint,
|
||||
prefixIcon: const Icon(Icons.badge_outlined, size: 20),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextField(
|
||||
controller: _ipController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Indirizzo IP del PC',
|
||||
hintText: 'Es. 192.168.1.100',
|
||||
prefixIcon: Icon(Icons.lan_outlined, size: 20),
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.pcIpLabel,
|
||||
hintText: l10n.pcIpHint,
|
||||
prefixIcon: const Icon(Icons.lan_outlined, size: 20),
|
||||
),
|
||||
keyboardType: TextInputType.url,
|
||||
),
|
||||
@@ -420,10 +425,10 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
flex: 2,
|
||||
child: TextField(
|
||||
controller: _portController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Porta',
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.portLabel,
|
||||
hintText: '8765',
|
||||
prefixIcon: Icon(Icons.tag_rounded, size: 20),
|
||||
prefixIcon: const Icon(Icons.tag_rounded, size: 20),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
@@ -433,10 +438,11 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
flex: 3,
|
||||
child: TextField(
|
||||
controller: _pinController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'PIN (se impostato)',
|
||||
hintText: 'Codice PIN',
|
||||
prefixIcon: Icon(Icons.lock_outline_rounded, size: 20),
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.pinOptionalLabel,
|
||||
hintText: l10n.pinHint,
|
||||
prefixIcon:
|
||||
const Icon(Icons.lock_outline_rounded, size: 20),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
obscureText: true,
|
||||
@@ -451,7 +457,7 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||
),
|
||||
icon: const Icon(Icons.save_rounded, size: 20),
|
||||
label: const Text('Salva e Connetti Manualmente'),
|
||||
label: Text(l10n.saveAndConnectManually),
|
||||
onPressed: _onManualConnect,
|
||||
),
|
||||
|
||||
@@ -460,7 +466,7 @@ class _ConnectScreenState extends State<ConnectScreen> {
|
||||
TextButton.icon(
|
||||
style: TextButton.styleFrom(foregroundColor: AppTheme.error),
|
||||
icon: const Icon(Icons.link_off_rounded, size: 20),
|
||||
label: const Text('Disconnetti dal PC'),
|
||||
label: Text(l10n.disconnectFromPc),
|
||||
onPressed: () {
|
||||
context.read<ConnectionCubit>().disconnect();
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/repositories/connection_repository.dart';
|
||||
import '../cubit/connection_cubit.dart';
|
||||
@@ -11,6 +12,7 @@ class ConnectionStatusChip extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return BlocBuilder<ConnectionCubit, ServerConnectionState>(
|
||||
builder: (context, state) {
|
||||
Color dotColor;
|
||||
@@ -23,15 +25,15 @@ class ConnectionStatusChip extends StatelessWidget {
|
||||
break;
|
||||
case ConnectionStatus.connecting:
|
||||
dotColor = AppTheme.warning;
|
||||
label = 'Connessione...';
|
||||
label = l10n.connecting;
|
||||
break;
|
||||
case ConnectionStatus.error:
|
||||
dotColor = AppTheme.error;
|
||||
label = 'Errore PIN/Rete';
|
||||
label = l10n.pinOrNetworkError;
|
||||
break;
|
||||
case ConnectionStatus.disconnected:
|
||||
dotColor = AppTheme.darkTextSecondary;
|
||||
label = 'Non connesso';
|
||||
label = l10n.notConnected;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:mobile_scanner/mobile_scanner.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/server_connection_info.dart';
|
||||
import '../../../settings/presentation/cubit/settings_cubit.dart';
|
||||
@@ -12,6 +13,7 @@ class QrPairingModal extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return Container(
|
||||
height: MediaQuery.of(context).size.height * 0.75,
|
||||
decoration: const BoxDecoration(
|
||||
@@ -35,9 +37,9 @@ class QrPairingModal extends StatelessWidget {
|
||||
children: [
|
||||
const Icon(Icons.qr_code_scanner, color: AppTheme.primary),
|
||||
const SizedBox(width: 8),
|
||||
const Text(
|
||||
'Inquadra QR Code del Server',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
l10n.qrModalTitle,
|
||||
style: const TextStyle(
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppTheme.darkTextPrimary,
|
||||
@@ -51,11 +53,12 @@ class QrPairingModal extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 4),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 4),
|
||||
child: Text(
|
||||
'Inquadra il codice QR mostrato nel terminale o nella dashboard web del PC.',
|
||||
style: TextStyle(color: AppTheme.darkTextSecondary, fontSize: 13),
|
||||
l10n.qrModalSubtitle,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextSecondary, fontSize: 13),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/server_connection_info.dart';
|
||||
import '../../../settings/presentation/cubit/settings_cubit.dart';
|
||||
@@ -31,7 +32,7 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
Navigator.of(context).pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Connessione a ${server.displayName}...'),
|
||||
content: Text(context.l10n.connectingToName(server.displayName)),
|
||||
backgroundColor: AppTheme.primary,
|
||||
duration: const Duration(seconds: 1),
|
||||
),
|
||||
@@ -40,17 +41,18 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
|
||||
void _confirmDelete(
|
||||
BuildContext context, ServerConnectionInfo server) {
|
||||
final l10n = context.l10n;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Rimuovere postazione?'),
|
||||
title: Text(l10n.removeWorkstationTitle),
|
||||
content: Text(
|
||||
'Vuoi eliminare "${server.displayName}" (${server.ip}) dai PC preferiti?',
|
||||
l10n.removeWorkstationMessage(server.displayName, server.ip),
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx),
|
||||
child: const Text('Annulla'),
|
||||
child: Text(l10n.cancel),
|
||||
),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(backgroundColor: AppTheme.error),
|
||||
@@ -58,7 +60,7 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
context.read<ConnectionCubit>().removeFavorite(server.effectiveId);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
child: const Text('Rimuovi'),
|
||||
child: Text(l10n.remove),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -67,6 +69,7 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return BlocBuilder<SettingsCubit, SettingsState>(
|
||||
builder: (context, settingsState) {
|
||||
final settings = settingsState.settings;
|
||||
@@ -114,22 +117,22 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
color: AppTheme.primary, size: 24),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Expanded(
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Seleziona Postazione PC',
|
||||
style: TextStyle(
|
||||
l10n.selectPcWorkstation,
|
||||
style: const TextStyle(
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppTheme.darkTextPrimary,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 2),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
'Scegli il computer del negozio su cui scrivere',
|
||||
style: TextStyle(
|
||||
l10n.selectPcSubtitle,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: AppTheme.darkTextSecondary,
|
||||
),
|
||||
@@ -159,15 +162,15 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
border: Border.all(
|
||||
color: AppTheme.warning.withValues(alpha: 0.4)),
|
||||
),
|
||||
child: const Row(
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.timer_outlined,
|
||||
const Icon(Icons.timer_outlined,
|
||||
color: AppTheme.warning, size: 18),
|
||||
SizedBox(width: 10),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Disconnesso per inattività. Seleziona la postazione prima di scansionare.',
|
||||
style: TextStyle(
|
||||
l10n.inactivityAlert,
|
||||
style: const TextStyle(
|
||||
fontSize: 12, color: AppTheme.warning),
|
||||
),
|
||||
),
|
||||
@@ -190,17 +193,17 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
color: AppTheme.darkTextSecondary
|
||||
.withValues(alpha: 0.4)),
|
||||
const SizedBox(height: 12),
|
||||
const Text(
|
||||
'Nessun PC preferito salvato',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
l10n.noFavoritePcs,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const Text(
|
||||
'Aggiungi i computer del negozio per collegarti con 1 tocco ed evitare errori tra colleghi.',
|
||||
Text(
|
||||
l10n.noFavoritePcsHint,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: AppTheme.darkTextSecondary),
|
||||
),
|
||||
@@ -298,9 +301,9 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
BorderRadius
|
||||
.circular(6),
|
||||
),
|
||||
child: const Text(
|
||||
'ATTIVO',
|
||||
style: TextStyle(
|
||||
child: Text(
|
||||
l10n.activeUppercase,
|
||||
style: const TextStyle(
|
||||
color:
|
||||
AppTheme.success,
|
||||
fontSize: 10,
|
||||
@@ -313,7 +316,7 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
'${item.ip}:${item.port} ${item.pin.isNotEmpty ? "• Con PIN" : ""}',
|
||||
'${item.ip}:${item.port} ${item.pin.isNotEmpty ? "• ${l10n.withPin}" : ""}',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'monospace',
|
||||
fontSize: 12,
|
||||
@@ -332,7 +335,7 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
Icons.delete_outline_rounded,
|
||||
size: 20),
|
||||
color: AppTheme.darkTextSecondary,
|
||||
tooltip: 'Rimuovi dai preferiti',
|
||||
tooltip: l10n.removeFavoriteTooltip,
|
||||
onPressed: () =>
|
||||
_confirmDelete(context, item),
|
||||
),
|
||||
@@ -356,8 +359,8 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
settings.inactivityTimeoutMinutes,
|
||||
),
|
||||
child: Text(isCurrent
|
||||
? 'Riconnetti'
|
||||
: 'Connetti'),
|
||||
? l10n.reconnect
|
||||
: l10n.connect),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -381,9 +384,9 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
),
|
||||
icon: const Icon(Icons.add_rounded, size: 20),
|
||||
label: const Text(
|
||||
'Aggiungi Nuovo PC (Wi-Fi o QR Code)',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
label: Text(
|
||||
l10n.addNewPcButton,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
@@ -406,20 +409,20 @@ class ServerSelectionSheet extends StatelessWidget {
|
||||
const Icon(Icons.flash_auto_rounded,
|
||||
size: 20, color: AppTheme.secondary),
|
||||
const SizedBox(width: 10),
|
||||
const Expanded(
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Collega automaticamente all\'avvio',
|
||||
style: TextStyle(
|
||||
l10n.autoConnectOnStartup,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Disattivato: richiede la selezione del PC (consigliato in negozio)',
|
||||
style: TextStyle(
|
||||
l10n.autoConnectSubtitleShort,
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
color: AppTheme.darkTextSecondary,
|
||||
),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:purchases_ui_flutter/purchases_ui_flutter.dart';
|
||||
import 'package:purchases_flutter/purchases_flutter.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../../../core/services/ad_service.dart';
|
||||
@@ -150,20 +150,26 @@ class MonetizationCubit extends Cubit<MonetizationState> {
|
||||
return success;
|
||||
}
|
||||
|
||||
/// Presents the official RevenueCat Paywall UI.
|
||||
Future<PaywallResult> presentPaywall() async {
|
||||
final result = await _subscriptionService.presentPaywall();
|
||||
if (result == PaywallResult.purchased || result == PaywallResult.restored) {
|
||||
emit(state.copyWith(isPremium: true));
|
||||
}
|
||||
return result;
|
||||
/// Fetches available subscription / lifetime packages from RevenueCat.
|
||||
Future<List<Package>> loadPackages() async {
|
||||
return _subscriptionService.getAvailablePackages();
|
||||
}
|
||||
|
||||
/// Presents the RevenueCat Customer Center to view/manage subscription.
|
||||
Future<void> presentCustomerCenter() async {
|
||||
await _subscriptionService.presentCustomerCenter();
|
||||
/// Purchases a selected package via RevenueCat and updates premium state.
|
||||
Future<PurchaseOutcome> purchasePackage(Package package) async {
|
||||
final outcome = await _subscriptionService.purchasePackage(package);
|
||||
if (outcome == PurchaseOutcome.purchased && !isClosed) {
|
||||
emit(state.copyWith(isPremium: true));
|
||||
}
|
||||
return outcome;
|
||||
}
|
||||
|
||||
/// Refreshes the entitlement status from RevenueCat.
|
||||
Future<void> refreshEntitlement() async {
|
||||
final isEntitled = await _subscriptionService.isEntitled();
|
||||
emit(state.copyWith(isPremium: isEntitled));
|
||||
if (!isClosed) {
|
||||
emit(state.copyWith(isPremium: isEntitled));
|
||||
}
|
||||
}
|
||||
|
||||
/// Restores previous purchases across device reinstalls.
|
||||
|
||||
@@ -0,0 +1,647 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:purchases_flutter/purchases_flutter.dart';
|
||||
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/services/subscription_service.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../cubit/monetization_cubit.dart';
|
||||
|
||||
/// Custom native Flutter Paywall powered by RevenueCat Offerings & Packages.
|
||||
class PaywallSheet extends StatefulWidget {
|
||||
const PaywallSheet({super.key});
|
||||
|
||||
/// Shows the custom paywall modal and returns `true` if Premium was unlocked.
|
||||
static Future<bool> show(BuildContext context) async {
|
||||
final result = await showModalBottomSheet<bool>(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (_) => BlocProvider.value(
|
||||
value: context.read<MonetizationCubit>(),
|
||||
child: const PaywallSheet(),
|
||||
),
|
||||
);
|
||||
return result == true;
|
||||
}
|
||||
|
||||
/// Shows a clean dialog for users who already have an active Premium plan.
|
||||
static Future<void> showPremiumManageDialog(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return showDialog<void>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.workspace_premium_rounded,
|
||||
color: Color(0xFFFBBF24),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: Text(l10n.premiumManageTitle)),
|
||||
],
|
||||
),
|
||||
content: Text(
|
||||
l10n.premiumManageBody,
|
||||
style: const TextStyle(height: 1.45),
|
||||
),
|
||||
actions: [
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.of(ctx).pop(),
|
||||
child: Text(l10n.closeButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
State<PaywallSheet> createState() => _PaywallSheetState();
|
||||
}
|
||||
|
||||
class _PaywallSheetState extends State<PaywallSheet> {
|
||||
static const _gold = Color(0xFFFBBF24);
|
||||
|
||||
List<Package> _packages = const [];
|
||||
Package? _selectedPackage;
|
||||
bool _isLoading = true;
|
||||
bool _isPurchasing = false;
|
||||
bool _isRestoring = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_loadOfferings();
|
||||
}
|
||||
|
||||
Future<void> _loadOfferings() async {
|
||||
setState(() => _isLoading = true);
|
||||
final packages = await context.read<MonetizationCubit>().loadPackages();
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_packages = packages;
|
||||
_selectedPackage = packages.isNotEmpty ? packages.first : null;
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _onPurchasePressed() async {
|
||||
final pkg = _selectedPackage;
|
||||
if (pkg == null || _isPurchasing || _isRestoring) return;
|
||||
|
||||
setState(() => _isPurchasing = true);
|
||||
final outcome = await context.read<MonetizationCubit>().purchasePackage(pkg);
|
||||
if (!mounted) return;
|
||||
setState(() => _isPurchasing = false);
|
||||
|
||||
final l10n = context.l10n;
|
||||
if (outcome == PurchaseOutcome.purchased) {
|
||||
Navigator.of(context).pop(true);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('🎉 ${l10n.welcomePremiumSnackbar}'),
|
||||
backgroundColor: AppTheme.success,
|
||||
duration: const Duration(milliseconds: 2200),
|
||||
),
|
||||
);
|
||||
} else if (outcome == PurchaseOutcome.error) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(l10n.paywallPurchaseError),
|
||||
backgroundColor: AppTheme.error,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _onRestorePressed() async {
|
||||
if (_isPurchasing || _isRestoring) return;
|
||||
setState(() => _isRestoring = true);
|
||||
final restored = await context.read<MonetizationCubit>().restorePurchases();
|
||||
if (!mounted) return;
|
||||
setState(() => _isRestoring = false);
|
||||
|
||||
final l10n = context.l10n;
|
||||
if (restored) {
|
||||
Navigator.of(context).pop(true);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(l10n.restorePurchasesSuccess),
|
||||
backgroundColor: AppTheme.success,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(l10n.restorePurchasesEmpty),
|
||||
backgroundColor: AppTheme.darkCard,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
int? _yearlySavingsPercent() {
|
||||
Package? monthly;
|
||||
Package? yearly;
|
||||
for (final p in _packages) {
|
||||
final id = p.identifier.toLowerCase();
|
||||
if (p.packageType == PackageType.monthly || id.contains('month')) {
|
||||
monthly = p;
|
||||
} else if (p.packageType == PackageType.annual ||
|
||||
id.contains('year') ||
|
||||
id.contains('annual')) {
|
||||
yearly = p;
|
||||
}
|
||||
}
|
||||
if (monthly == null || yearly == null) return null;
|
||||
final annualAtMonthlyRate = monthly.storeProduct.price * 12.0;
|
||||
if (annualAtMonthlyRate <= 0 || yearly.storeProduct.price >= annualAtMonthlyRate) {
|
||||
return null;
|
||||
}
|
||||
final pct = ((1.0 - (yearly.storeProduct.price / annualAtMonthlyRate)) * 100).round();
|
||||
return pct >= 5 ? pct : null;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final savingsPct = _yearlySavingsPercent();
|
||||
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: MediaQuery.of(context).size.height * 0.90,
|
||||
),
|
||||
decoration: const BoxDecoration(
|
||||
color: AppTheme.darkSurface,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(28)),
|
||||
border: Border(
|
||||
top: BorderSide(color: AppTheme.darkBorder, width: 1.5),
|
||||
),
|
||||
),
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// Drag handle + close button
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 12, 8, 0),
|
||||
child: Row(
|
||||
children: [
|
||||
const SizedBox(width: 40),
|
||||
const Spacer(),
|
||||
Container(
|
||||
width: 42,
|
||||
height: 4,
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.darkTextSecondary.withValues(alpha: 0.4),
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close_rounded),
|
||||
color: AppTheme.darkTextSecondary,
|
||||
onPressed: _isPurchasing
|
||||
? null
|
||||
: () => Navigator.of(context).pop(false),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Flexible(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.fromLTRB(22, 4, 22, 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Crown icon
|
||||
Center(
|
||||
child: Container(
|
||||
width: 68,
|
||||
height: 68,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
_gold.withValues(alpha: 0.25),
|
||||
AppTheme.primary.withValues(alpha: 0.20),
|
||||
],
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: _gold.withValues(alpha: 0.6),
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.workspace_premium_rounded,
|
||||
color: _gold,
|
||||
size: 36,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
|
||||
Text(
|
||||
l10n.paywallTitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: Colors.white,
|
||||
letterSpacing: -0.4,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
l10n.paywallSubtitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 13.5,
|
||||
color: AppTheme.darkTextSecondary,
|
||||
height: 1.35,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
|
||||
// Benefits Card
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16, vertical: 14),
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.darkCard,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: AppTheme.darkBorder),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
_BenefitRow(
|
||||
icon: Icons.all_inclusive_rounded,
|
||||
text: l10n.paywallBenefitUnlimited,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_BenefitRow(
|
||||
icon: Icons.block_rounded,
|
||||
text: l10n.paywallBenefitNoAds,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_BenefitRow(
|
||||
icon: Icons.view_in_ar_rounded,
|
||||
text: l10n.paywallBenefitAllModes,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_BenefitRow(
|
||||
icon: Icons.computer_rounded,
|
||||
text: l10n.paywallBenefitMultiPc,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
|
||||
// Plans section
|
||||
if (_isLoading)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 28),
|
||||
child: Column(
|
||||
children: [
|
||||
const CircularProgressIndicator(color: _gold),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
l10n.paywallLoadingPlans,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextSecondary,
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
else if (_packages.isEmpty)
|
||||
Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.darkCard,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: AppTheme.darkBorder),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.cloud_off_rounded,
|
||||
color: AppTheme.darkTextSecondary,
|
||||
size: 32,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
l10n.paywallUnavailableTitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
l10n.paywallUnavailableSubtitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 12.5,
|
||||
color: AppTheme.darkTextSecondary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
OutlinedButton.icon(
|
||||
onPressed: _loadOfferings,
|
||||
icon: const Icon(Icons.refresh_rounded, size: 18),
|
||||
label: Text(l10n.paywallRetryButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
else ...[
|
||||
for (final pkg in _packages) ...[
|
||||
_PlanCard(
|
||||
package: pkg,
|
||||
isSelected: _selectedPackage?.identifier == pkg.identifier,
|
||||
savingsPercent: savingsPct,
|
||||
onTap: () => setState(() => _selectedPackage = pkg),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// Primary Purchase CTA
|
||||
SizedBox(
|
||||
height: 54,
|
||||
child: FilledButton(
|
||||
onPressed: (_selectedPackage == null || _isPurchasing)
|
||||
? null
|
||||
: _onPurchasePressed,
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: _gold,
|
||||
foregroundColor: Colors.black87,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
child: _isPurchasing
|
||||
? const SizedBox(
|
||||
width: 22,
|
||||
height: 22,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2.5,
|
||||
color: Colors.black87,
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
_selectedPackage != null
|
||||
? l10n.paywallContinueWithPrice(
|
||||
_selectedPackage!.storeProduct.priceString,
|
||||
)
|
||||
: l10n.paywallContinueButton,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w800,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Restore Purchases
|
||||
Center(
|
||||
child: TextButton(
|
||||
onPressed:
|
||||
(_isPurchasing || _isRestoring) ? null : _onRestorePressed,
|
||||
child: _isRestoring
|
||||
? const SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
)
|
||||
: Text(
|
||||
l10n.restorePurchasesTitle,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.secondary,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
l10n.paywallLegalNote,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: AppTheme.darkTextSecondary.withValues(alpha: 0.75),
|
||||
height: 1.35,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _BenefitRow extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String text;
|
||||
|
||||
const _BenefitRow({required this.icon, required this.text});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
Icon(icon, color: const Color(0xFFFBBF24), size: 20),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
fontSize: 13.5,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppTheme.darkTextPrimary,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _PlanCard extends StatelessWidget {
|
||||
final Package package;
|
||||
final bool isSelected;
|
||||
final int? savingsPercent;
|
||||
final VoidCallback onTap;
|
||||
|
||||
const _PlanCard({
|
||||
required this.package,
|
||||
required this.isSelected,
|
||||
required this.savingsPercent,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
const gold = Color(0xFFFBBF24);
|
||||
final id = package.identifier.toLowerCase();
|
||||
|
||||
final isYearly = package.packageType == PackageType.annual ||
|
||||
id.contains('year') ||
|
||||
id.contains('annual');
|
||||
final isLifetime =
|
||||
package.packageType == PackageType.lifetime || id.contains('life');
|
||||
final isMonthly =
|
||||
package.packageType == PackageType.monthly || id.contains('month');
|
||||
|
||||
final title = isYearly
|
||||
? l10n.paywallPlanYearly
|
||||
: isLifetime
|
||||
? l10n.paywallPlanLifetime
|
||||
: isMonthly
|
||||
? l10n.paywallPlanMonthly
|
||||
: package.storeProduct.title;
|
||||
|
||||
final periodLabel = isYearly
|
||||
? l10n.paywallPerYear
|
||||
: isLifetime
|
||||
? l10n.paywallOneTime
|
||||
: isMonthly
|
||||
? l10n.paywallPerMonth
|
||||
: '';
|
||||
|
||||
String? badge;
|
||||
if (isYearly) {
|
||||
badge = savingsPercent != null
|
||||
? l10n.paywallSavePercent(savingsPercent!)
|
||||
: l10n.paywallBestValue;
|
||||
} else if (isLifetime) {
|
||||
badge = l10n.paywallOneTimeBadge;
|
||||
}
|
||||
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 160),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? gold.withValues(alpha: 0.12)
|
||||
: AppTheme.darkCard,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(
|
||||
color: isSelected ? gold : AppTheme.darkBorder,
|
||||
width: isSelected ? 2 : 1,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 22,
|
||||
height: 22,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: isSelected ? gold : AppTheme.darkTextSecondary,
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
child: isSelected
|
||||
? Center(
|
||||
child: Container(
|
||||
width: 11,
|
||||
height: 11,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: gold,
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 15.5,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (badge != null) ...[
|
||||
const SizedBox(width: 8),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 7, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: isYearly
|
||||
? gold
|
||||
: AppTheme.primary.withValues(alpha: 0.25),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text(
|
||||
badge,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: isYearly ? Colors.black87 : AppTheme.secondary,
|
||||
letterSpacing: 0.3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
if (periodLabel.isNotEmpty) ...[
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
periodLabel,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: AppTheme.darkTextSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
package.storeProduct.priceString,
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: isSelected ? gold : Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:purchases_ui_flutter/purchases_ui_flutter.dart';
|
||||
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../cubit/monetization_cubit.dart';
|
||||
import '../cubit/monetization_state.dart';
|
||||
import 'paywall_sheet.dart';
|
||||
|
||||
/// Bottom sheet dialog prompting user to watch a rewarded video for 15 min unlimited scanning.
|
||||
class RewardSessionDialog extends StatelessWidget {
|
||||
@@ -24,6 +25,7 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return Container(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
24,
|
||||
@@ -74,9 +76,9 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
const Text(
|
||||
'Scansioni Illimitate',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
l10n.unlimitedScansTitle,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -86,7 +88,7 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
|
||||
Text(
|
||||
'Guarda un breve video per sbloccare 15 minuti di scansioni illimitate al PC senza interruzioni.',
|
||||
l10n.unlimitedScansDescription,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: AppTheme.darkTextSecondary,
|
||||
@@ -110,21 +112,17 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
if (success) {
|
||||
Navigator.of(context).pop(true);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(
|
||||
'15 minuti di scansioni illimitate sbloccati!',
|
||||
),
|
||||
duration: Duration(milliseconds: 1600),
|
||||
SnackBar(
|
||||
content: Text(l10n.unlocked15MinSnackbar),
|
||||
duration: const Duration(milliseconds: 1600),
|
||||
backgroundColor: AppTheme.success,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(
|
||||
'Caricamento video in corso... Riprova tra pochi istanti.',
|
||||
),
|
||||
duration: Duration(milliseconds: 1800),
|
||||
SnackBar(
|
||||
content: Text(l10n.loadingVideoRetrySnackbar),
|
||||
duration: const Duration(milliseconds: 1800),
|
||||
backgroundColor: AppTheme.darkCard,
|
||||
),
|
||||
);
|
||||
@@ -149,7 +147,9 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
)
|
||||
: const Icon(Icons.ondemand_video_rounded, size: 22),
|
||||
label: Text(
|
||||
state.isAdLoading ? 'Caricamento video...' : 'Guarda Video (+15 min)',
|
||||
state.isAdLoading
|
||||
? l10n.loadingVideoButton
|
||||
: l10n.watchVideoButton,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -159,25 +159,15 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Upgrade to Premium button (RevenueCat Paywall)
|
||||
// Upgrade to Premium button (Custom Paywall)
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: () async {
|
||||
final cubit = context.read<MonetizationCubit>();
|
||||
final result = await cubit.presentPaywall();
|
||||
if (context.mounted &&
|
||||
(result == PaywallResult.purchased ||
|
||||
result == PaywallResult.restored)) {
|
||||
final unlocked = await PaywallSheet.show(context);
|
||||
if (context.mounted && unlocked) {
|
||||
Navigator.of(context).pop(true);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('🎉 Benvenuto in Premium Illimitato!'),
|
||||
backgroundColor: AppTheme.success,
|
||||
duration: Duration(milliseconds: 2000),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
@@ -188,9 +178,9 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
icon: const Icon(Icons.workspace_premium_rounded, size: 22),
|
||||
label: const Text(
|
||||
'Passa a Premium Illimitato',
|
||||
style: TextStyle(
|
||||
label: Text(
|
||||
l10n.upgradeToPremiumButton,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
@@ -202,9 +192,9 @@ class RewardSessionDialog extends StatelessWidget {
|
||||
// Cancel button
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(false),
|
||||
child: const Text(
|
||||
'Più tardi',
|
||||
style: TextStyle(
|
||||
child: Text(
|
||||
l10n.laterButton,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextSecondary,
|
||||
fontSize: 14,
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/scan_record.dart';
|
||||
import '../cubit/history_cubit.dart';
|
||||
@@ -24,17 +25,16 @@ class _HistoryScreenState extends State<HistoryScreen> {
|
||||
}
|
||||
|
||||
void _confirmClear() {
|
||||
final l10n = context.l10n;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Cancellare Cronologia?'),
|
||||
content: const Text(
|
||||
'Tutti i codici salvati nella cronologia su questo dispositivo verranno rimossi.',
|
||||
),
|
||||
title: Text(l10n.clearHistoryTitle),
|
||||
content: Text(l10n.clearHistoryMessage),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx),
|
||||
child: const Text('Annulla'),
|
||||
child: Text(l10n.cancel),
|
||||
),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(backgroundColor: AppTheme.error),
|
||||
@@ -42,7 +42,7 @@ class _HistoryScreenState extends State<HistoryScreen> {
|
||||
context.read<HistoryCubit>().clearHistory();
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
child: const Text('Cancella Tutto'),
|
||||
child: Text(l10n.clearAllButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -51,16 +51,17 @@ class _HistoryScreenState extends State<HistoryScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Cronologia Scansioni'),
|
||||
title: Text(l10n.scanHistoryTitle),
|
||||
actions: [
|
||||
BlocBuilder<HistoryCubit, HistoryState>(
|
||||
builder: (context, state) {
|
||||
if (state.history.isEmpty) return const SizedBox.shrink();
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.delete_sweep_rounded),
|
||||
tooltip: 'Cancella cronologia',
|
||||
tooltip: l10n.clearHistoryTooltip,
|
||||
onPressed: _confirmClear,
|
||||
);
|
||||
},
|
||||
@@ -79,7 +80,7 @@ class _HistoryScreenState extends State<HistoryScreen> {
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Cerca tra i codici...',
|
||||
hintText: l10n.searchCodesHint,
|
||||
prefixIcon: const Icon(Icons.search_rounded, size: 20),
|
||||
suffixIcon: state.searchQuery.isNotEmpty
|
||||
? IconButton(
|
||||
@@ -112,8 +113,8 @@ class _HistoryScreenState extends State<HistoryScreen> {
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
state.searchQuery.isEmpty
|
||||
? 'Nessuna scansione in memoria'
|
||||
: 'Nessun risultato per "${state.searchQuery}"',
|
||||
? l10n.noScansInHistory
|
||||
: l10n.noResultsForQuery(state.searchQuery),
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextSecondary,
|
||||
fontSize: 15,
|
||||
@@ -197,26 +198,26 @@ class _HistoryTile extends StatelessWidget {
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.copy_rounded, size: 20),
|
||||
tooltip: 'Copia codice',
|
||||
tooltip: context.l10n.copyCodeTooltip,
|
||||
onPressed: () {
|
||||
Clipboard.setData(ClipboardData(text: item.code));
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Copiato negli appunti'),
|
||||
duration: Duration(seconds: 1),
|
||||
SnackBar(
|
||||
content: Text(context.l10n.copiedToClipboardSnackbar),
|
||||
duration: const Duration(seconds: 1),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.send_rounded, size: 20),
|
||||
tooltip: 'Invia di nuovo al PC',
|
||||
tooltip: context.l10n.resendToPcTooltip,
|
||||
color: AppTheme.primary,
|
||||
onPressed: () {
|
||||
context.read<ScannerCubit>().resendScan(item);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Inviato "${item.code}" al PC'),
|
||||
content: Text(context.l10n.resentCodeSnackbar(item.code)),
|
||||
duration: const Duration(seconds: 1),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:mobile_scanner/mobile_scanner.dart';
|
||||
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/services/feedback_service.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../../connection/presentation/cubit/connection_cubit.dart';
|
||||
@@ -11,6 +12,7 @@ import '../../../connection/presentation/widgets/connection_status_chip.dart';
|
||||
import '../../../connection/presentation/widgets/server_selection_sheet.dart';
|
||||
import '../../../monetization/presentation/cubit/monetization_cubit.dart';
|
||||
import '../../../monetization/presentation/cubit/monetization_state.dart';
|
||||
import '../../../monetization/presentation/widgets/paywall_sheet.dart';
|
||||
import '../../../monetization/presentation/widgets/reward_session_dialog.dart';
|
||||
import '../../../settings/presentation/cubit/settings_cubit.dart';
|
||||
import '../../../settings/presentation/cubit/settings_state.dart';
|
||||
@@ -510,14 +512,15 @@ class _ScannerScreenState extends State<ScannerScreen>
|
||||
}
|
||||
|
||||
if (_frozenSnapshot == null) {
|
||||
final l10n = context.l10n;
|
||||
ScaffoldMessenger.of(context)
|
||||
..hideCurrentSnackBar()
|
||||
..showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
success
|
||||
? 'Inviato al PC: ${item.code}'
|
||||
: 'Codice salvato in cronologia (PC non connesso)',
|
||||
? l10n.sentToPcSnackbar(item.code)
|
||||
: l10n.savedToHistoryOfflineSnackbar,
|
||||
),
|
||||
duration: const Duration(milliseconds: 1100),
|
||||
backgroundColor: AppTheme.darkCard,
|
||||
@@ -688,14 +691,15 @@ class _ScannerScreenState extends State<ScannerScreen>
|
||||
color: scannerState.isTorchOn
|
||||
? Colors.amber
|
||||
: Colors.white,
|
||||
tooltip: 'Torcia',
|
||||
tooltip: context.l10n.torchTooltip,
|
||||
onPressed: _toggleTorch,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
_CircleGlassButton(
|
||||
icon: Icons
|
||||
.flip_camera_ios_rounded,
|
||||
tooltip: 'Inverti Fotocamera',
|
||||
tooltip: context
|
||||
.l10n.switchCameraTooltip,
|
||||
onPressed: _switchCamera,
|
||||
),
|
||||
],
|
||||
@@ -724,7 +728,8 @@ class _ScannerScreenState extends State<ScannerScreen>
|
||||
offset: const Offset(-2, 2),
|
||||
child: _CircleGlassButton(
|
||||
icon: Icons.history_rounded,
|
||||
tooltip: 'Cronologia',
|
||||
tooltip: context
|
||||
.l10n.historyTooltip,
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
@@ -740,7 +745,8 @@ class _ScannerScreenState extends State<ScannerScreen>
|
||||
const SizedBox(width: 10),
|
||||
_CircleGlassButton(
|
||||
icon: Icons.settings_outlined,
|
||||
tooltip: 'Impostazioni',
|
||||
tooltip:
|
||||
context.l10n.settingsTooltip,
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
@@ -911,7 +917,7 @@ class _SessionStatusChip extends StatelessWidget {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => context.read<MonetizationCubit>().presentCustomerCenter(),
|
||||
onTap: () => PaywallSheet.showPremiumManageDialog(context),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
@@ -947,15 +953,16 @@ class _SessionStatusChip extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
final l10n = context.l10n;
|
||||
final isUnlimited = state.isUnlimited;
|
||||
final color = isUnlimited
|
||||
? AppTheme.success
|
||||
: (state.freeScansRemaining > 0 ? AppTheme.primary : AppTheme.warning);
|
||||
final label = isUnlimited
|
||||
? '${state.formattedRemainingTime} Illimitati'
|
||||
? l10n.unlimitedSessionLabel(state.formattedRemainingTime)
|
||||
: (state.freeScansRemaining > 0
|
||||
? '${state.freeScansRemaining} libere'
|
||||
: 'Sblocca 15 min');
|
||||
? l10n.freeScansShort(state.freeScansRemaining)
|
||||
: l10n.unlock15Min);
|
||||
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/detected_barcode_item.dart';
|
||||
import 'ar_barcode_overlay.dart';
|
||||
@@ -143,7 +144,8 @@ class _ArFrozenPickerState extends State<ArFrozenPicker> {
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
child: Text(
|
||||
'Frame bloccato • ${snapshot.items.length} ${snapshot.items.length == 1 ? 'codice' : 'codici'}',
|
||||
context.l10n.frozenFrameCount(
|
||||
snapshot.items.length),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
@@ -171,7 +173,7 @@ class _ArFrozenPickerState extends State<ArFrozenPicker> {
|
||||
],
|
||||
_TopPillButton(
|
||||
icon: Icons.close_rounded,
|
||||
label: 'Riprendi',
|
||||
label: context.l10n.resumeButton,
|
||||
accent: true,
|
||||
onTap: widget.onResumeLive,
|
||||
),
|
||||
@@ -215,10 +217,10 @@ class _ArFrozenPickerState extends State<ArFrozenPicker> {
|
||||
padding: const EdgeInsets.fromLTRB(18, 12, 14, 8),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Tocca un codice per inviarlo al PC',
|
||||
style: TextStyle(
|
||||
context.l10n.tapCodeToSend,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextSecondary,
|
||||
fontSize: 12.5,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -231,7 +233,7 @@ class _ArFrozenPickerState extends State<ArFrozenPicker> {
|
||||
Icons.videocam_rounded,
|
||||
size: 16,
|
||||
),
|
||||
label: const Text('Nuova scansione'),
|
||||
label: Text(context.l10n.newScanButton),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: AppTheme.secondary,
|
||||
visualDensity: VisualDensity.compact,
|
||||
@@ -379,7 +381,9 @@ class _FrozenCodeRow extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
isSent ? 'Inviato' : 'Invia',
|
||||
isSent
|
||||
? context.l10n.sentLabel
|
||||
: context.l10n.sendLabel,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/scan_record.dart';
|
||||
import '../cubit/scanner_cubit.dart';
|
||||
@@ -12,6 +13,7 @@ class LastScanCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final isSuccess = record.sentSuccessfully;
|
||||
|
||||
return Container(
|
||||
@@ -80,9 +82,10 @@ class LastScanCard extends StatelessWidget {
|
||||
),
|
||||
if (!isSuccess) ...[
|
||||
const Spacer(),
|
||||
const Text(
|
||||
'Non inviato',
|
||||
style: TextStyle(fontSize: 11, color: AppTheme.warning),
|
||||
Text(
|
||||
l10n.notSent,
|
||||
style: const TextStyle(
|
||||
fontSize: 11, color: AppTheme.warning),
|
||||
),
|
||||
],
|
||||
],
|
||||
@@ -105,14 +108,14 @@ class LastScanCard extends StatelessWidget {
|
||||
const SizedBox(width: 8),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.copy_rounded, size: 20),
|
||||
tooltip: 'Copia',
|
||||
tooltip: l10n.copyTooltip,
|
||||
color: AppTheme.darkTextSecondary,
|
||||
onPressed: () {
|
||||
Clipboard.setData(ClipboardData(text: record.code));
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Codice copiato negli appunti'),
|
||||
duration: Duration(seconds: 1),
|
||||
SnackBar(
|
||||
content: Text(l10n.codeCopiedSnackbar),
|
||||
duration: const Duration(seconds: 1),
|
||||
backgroundColor: AppTheme.darkCard,
|
||||
),
|
||||
);
|
||||
@@ -120,7 +123,7 @@ class LastScanCard extends StatelessWidget {
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.send_rounded, size: 20),
|
||||
tooltip: 'Invia di nuovo al PC',
|
||||
tooltip: l10n.resendToPcTooltip,
|
||||
color: AppTheme.primary,
|
||||
onPressed: () {
|
||||
context.read<ScannerCubit>().resendScan(record);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../cubit/scanner_cubit.dart';
|
||||
|
||||
@@ -39,21 +40,24 @@ class _ManualInputDialogState extends State<ManualInputDialog> {
|
||||
void _submit() {
|
||||
final code = _textController.text.trim();
|
||||
if (code.isNotEmpty) {
|
||||
context.read<ScannerCubit>().processBarcode(code, format: 'Manuale');
|
||||
context
|
||||
.read<ScannerCubit>()
|
||||
.processBarcode(code, format: context.l10n.manualFormat);
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return AlertDialog(
|
||||
title: const Row(
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.keyboard_outlined, color: AppTheme.primary),
|
||||
SizedBox(width: 10),
|
||||
const Icon(Icons.keyboard_outlined, color: AppTheme.primary),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
'Digitazione Manuale',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
l10n.manualInputTitle,
|
||||
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -61,9 +65,10 @@ class _ManualInputDialogState extends State<ManualInputDialog> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Digita o incolla il codice da digitare in tempo reale sul PC:',
|
||||
style: TextStyle(fontSize: 13, color: AppTheme.darkTextSecondary),
|
||||
Text(
|
||||
l10n.manualInputSubtitle,
|
||||
style: const TextStyle(
|
||||
fontSize: 13, color: AppTheme.darkTextSecondary),
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
TextField(
|
||||
@@ -71,10 +76,10 @@ class _ManualInputDialogState extends State<ManualInputDialog> {
|
||||
autofocus: true,
|
||||
style: const TextStyle(fontFamily: 'monospace', fontSize: 16),
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Es. 8001234567890 o ART-99',
|
||||
hintText: l10n.manualInputHint,
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.paste_rounded, size: 20),
|
||||
tooltip: 'Incolla dagli appunti',
|
||||
tooltip: l10n.pasteFromClipboardTooltip,
|
||||
onPressed: () async {
|
||||
final data = await Clipboard.getData('text/plain');
|
||||
if (data?.text != null) {
|
||||
@@ -91,11 +96,11 @@ class _ManualInputDialogState extends State<ManualInputDialog> {
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('Annulla'),
|
||||
child: Text(l10n.cancel),
|
||||
),
|
||||
FilledButton.icon(
|
||||
icon: const Icon(Icons.send_rounded, size: 18),
|
||||
label: const Text('Invia al PC'),
|
||||
label: Text(l10n.sendToPcButton),
|
||||
onPressed: _submit,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/scan_aim_mode.dart';
|
||||
|
||||
@@ -80,12 +81,13 @@ class _FreezeButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final hasCodes = liveBarcodeCount > 0;
|
||||
final label = isPendingFreeze
|
||||
? 'In attesa dei codici… Tocca per annullare'
|
||||
? l10n.waitingForCodesCancel
|
||||
: hasCodes
|
||||
? 'Blocca frame ($liveBarcodeCount ${liveBarcodeCount == 1 ? 'codice' : 'codici'})'
|
||||
: 'Blocca e scegli';
|
||||
? l10n.freezeFrameCount(liveBarcodeCount)
|
||||
: l10n.freezeAndPick;
|
||||
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
@@ -247,14 +249,15 @@ class _ManualActionPill extends StatelessWidget {
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: const Row(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.keyboard_rounded, color: AppTheme.primary, size: 18),
|
||||
SizedBox(width: 6),
|
||||
const Icon(Icons.keyboard_rounded,
|
||||
color: AppTheme.primary, size: 18),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
'Manuale',
|
||||
style: TextStyle(
|
||||
context.l10n.manualButton,
|
||||
style: const TextStyle(
|
||||
fontSize: 12.5,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppTheme.darkTextPrimary,
|
||||
@@ -293,19 +296,19 @@ class _AimModeSelector extends StatelessWidget {
|
||||
children: [
|
||||
_ModeTab(
|
||||
icon: Icons.qr_code_scanner_rounded,
|
||||
label: ScanAimMode.standard.label,
|
||||
label: ScanAimMode.standard.localizedLabel(context.l10n),
|
||||
selected: selectedMode == ScanAimMode.standard,
|
||||
onTap: () => onChanged(ScanAimMode.standard),
|
||||
),
|
||||
_ModeTab(
|
||||
icon: Icons.gps_fixed_rounded,
|
||||
label: ScanAimMode.precision.label,
|
||||
label: ScanAimMode.precision.localizedLabel(context.l10n),
|
||||
selected: selectedMode == ScanAimMode.precision,
|
||||
onTap: () => onChanged(ScanAimMode.precision),
|
||||
),
|
||||
_ModeTab(
|
||||
icon: Icons.view_in_ar_rounded,
|
||||
label: ScanAimMode.arMulti.label,
|
||||
label: ScanAimMode.arMulti.localizedLabel(context.l10n),
|
||||
selected: selectedMode == ScanAimMode.arMulti,
|
||||
onTap: () => onChanged(ScanAimMode.arMulti),
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../domain/entities/scan_aim_mode.dart';
|
||||
import '../utils/barcode_geometry.dart';
|
||||
@@ -223,8 +224,8 @@ class _ScannerOverlayState extends State<ScannerOverlay>
|
||||
)
|
||||
: Text(
|
||||
isPrecision
|
||||
? 'Centra il mirino sul codice • Tocca per mettere a fuoco'
|
||||
: 'Inquadra codice a barre o QR • Pizzica per zoomare',
|
||||
? context.l10n.precisionHelperText
|
||||
: context.l10n.standardHelperText,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: Colors.white70,
|
||||
@@ -455,9 +456,10 @@ class _CooldownStatusPill extends StatelessWidget {
|
||||
duration: Duration(milliseconds: remainingMs),
|
||||
builder: (context, fraction, _) {
|
||||
final secsLeft = (fraction * totalMs / 1000.0).clamp(0.0, 99.9);
|
||||
final secsText = secsLeft.toStringAsFixed(1);
|
||||
final label = succeeded
|
||||
? 'Inviato • Pausa ${secsLeft.toStringAsFixed(1)}s'
|
||||
: 'Non inviato • Pausa ${secsLeft.toStringAsFixed(1)}s';
|
||||
? context.l10n.cooldownSent(secsText)
|
||||
: context.l10n.cooldownNotSent(secsText);
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||
|
||||
@@ -22,6 +22,7 @@ class SettingsLocalDataSource {
|
||||
final aimMode = ScanAimMode.fromStorageKey(
|
||||
_prefs.getString(AppConstants.keyAimMode),
|
||||
);
|
||||
final languageCode = _prefs.getString(AppConstants.keyLanguageCode) ?? '';
|
||||
|
||||
return AppSettings(
|
||||
suffix: suffix,
|
||||
@@ -32,6 +33,7 @@ class SettingsLocalDataSource {
|
||||
autoConnect: autoConnect,
|
||||
inactivityTimeoutMinutes: inactivityTimeout,
|
||||
aimMode: aimMode,
|
||||
languageCode: languageCode,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,4 +66,8 @@ class SettingsLocalDataSource {
|
||||
Future<void> saveAimMode(ScanAimMode mode) async {
|
||||
await _prefs.setString(AppConstants.keyAimMode, mode.storageKey);
|
||||
}
|
||||
|
||||
Future<void> saveLanguageCode(String languageCode) async {
|
||||
await _prefs.setString(AppConstants.keyLanguageCode, languageCode);
|
||||
}
|
||||
}
|
||||
@@ -48,4 +48,9 @@ class SettingsRepositoryImpl implements SettingsRepository {
|
||||
Future<void> saveAimMode(ScanAimMode mode) async {
|
||||
await _localDataSource.saveAimMode(mode);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> saveLanguageCode(String languageCode) async {
|
||||
await _localDataSource.saveLanguageCode(languageCode);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import '../../../../core/constants/app_constants.dart';
|
||||
import '../../../scanner/domain/entities/scan_aim_mode.dart';
|
||||
@@ -11,6 +13,7 @@ class AppSettings extends Equatable {
|
||||
final bool autoConnect; // Default: false (ideal for multi-PC store)
|
||||
final int inactivityTimeoutMinutes; // Default: 5 or 10 min, 0 = disabled
|
||||
final ScanAimMode aimMode;
|
||||
final String languageCode; // '' = system default, 'it', 'en'
|
||||
|
||||
const AppSettings({
|
||||
this.suffix = 'enter',
|
||||
@@ -21,8 +24,11 @@ class AppSettings extends Equatable {
|
||||
this.autoConnect = false,
|
||||
this.inactivityTimeoutMinutes = AppConstants.defaultInactivityTimeoutMinutes,
|
||||
this.aimMode = ScanAimMode.standard,
|
||||
this.languageCode = '',
|
||||
});
|
||||
|
||||
Locale? get locale => languageCode.isEmpty ? null : Locale(languageCode);
|
||||
|
||||
AppSettings copyWith({
|
||||
String? suffix,
|
||||
bool? continuousMode,
|
||||
@@ -32,6 +38,7 @@ class AppSettings extends Equatable {
|
||||
bool? autoConnect,
|
||||
int? inactivityTimeoutMinutes,
|
||||
ScanAimMode? aimMode,
|
||||
String? languageCode,
|
||||
}) {
|
||||
return AppSettings(
|
||||
suffix: suffix ?? this.suffix,
|
||||
@@ -43,6 +50,7 @@ class AppSettings extends Equatable {
|
||||
inactivityTimeoutMinutes:
|
||||
inactivityTimeoutMinutes ?? this.inactivityTimeoutMinutes,
|
||||
aimMode: aimMode ?? this.aimMode,
|
||||
languageCode: languageCode ?? this.languageCode,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -56,5 +64,6 @@ class AppSettings extends Equatable {
|
||||
autoConnect,
|
||||
inactivityTimeoutMinutes,
|
||||
aimMode,
|
||||
languageCode,
|
||||
];
|
||||
}
|
||||
@@ -10,4 +10,5 @@ abstract class SettingsRepository {
|
||||
Future<void> saveAutoConnect(bool enabled);
|
||||
Future<void> saveInactivityTimeout(int minutes);
|
||||
Future<void> saveAimMode(ScanAimMode mode);
|
||||
Future<void> saveLanguageCode(String languageCode);
|
||||
}
|
||||
@@ -65,4 +65,10 @@ class SettingsCubit extends Cubit<SettingsState> {
|
||||
emit(state.copyWith(settings: updated));
|
||||
await _settingsRepository.saveAimMode(mode);
|
||||
}
|
||||
|
||||
Future<void> updateLanguageCode(String languageCode) async {
|
||||
final updated = state.settings.copyWith(languageCode: languageCode);
|
||||
emit(state.copyWith(settings: updated));
|
||||
await _settingsRepository.saveLanguageCode(languageCode);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/constants/app_constants.dart';
|
||||
import '../../../../core/l10n/l10n_extensions.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
import '../../../connection/presentation/cubit/connection_cubit.dart';
|
||||
import '../../../connection/presentation/cubit/connection_state.dart';
|
||||
@@ -8,6 +9,7 @@ import '../../../connection/presentation/screens/connect_screen.dart';
|
||||
import '../../../connection/presentation/widgets/server_selection_sheet.dart';
|
||||
import '../../../monetization/presentation/cubit/monetization_cubit.dart';
|
||||
import '../../../monetization/presentation/cubit/monetization_state.dart';
|
||||
import '../../../monetization/presentation/widgets/paywall_sheet.dart';
|
||||
import '../../../scanner/domain/entities/scan_aim_mode.dart';
|
||||
import '../cubit/settings_cubit.dart';
|
||||
import '../cubit/settings_state.dart';
|
||||
@@ -17,9 +19,10 @@ class SettingsScreen extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Impostazioni'),
|
||||
title: Text(l10n.settingsTitle),
|
||||
),
|
||||
body: BlocBuilder<SettingsCubit, SettingsState>(
|
||||
builder: (context, settingsState) {
|
||||
@@ -29,7 +32,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
children: [
|
||||
// Subscription & Premium Section (RevenueCat)
|
||||
const _SectionHeader(title: 'PIANO & ABBONAMENTO'),
|
||||
_SectionHeader(title: l10n.sectionPlanSubscription),
|
||||
BlocBuilder<MonetizationCubit, MonetizationState>(
|
||||
builder: (context, monState) {
|
||||
final isPremium = monState.isPremium;
|
||||
@@ -57,42 +60,42 @@ class SettingsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
isPremium ? 'Piano Premium Attivo' : 'Versione Base Gratuita',
|
||||
isPremium
|
||||
? l10n.premiumPlanActive
|
||||
: l10n.freeBaseVersion,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
subtitle: Text(
|
||||
isPremium
|
||||
? 'Scansioni illimitate e zero pubblicità'
|
||||
? l10n.unlimitedAndAdFree
|
||||
: (monState.isUnlimited
|
||||
? 'Sessione attiva: ${monState.formattedRemainingTime}'
|
||||
: '${monState.freeScansRemaining} scansioni libere rimanenti'),
|
||||
? l10n.activeSessionLabel(
|
||||
monState.formattedRemainingTime)
|
||||
: l10n.freeScansRemaining(
|
||||
monState.freeScansRemaining)),
|
||||
),
|
||||
trailing: isPremium
|
||||
? OutlinedButton(
|
||||
onPressed: () => context
|
||||
.read<MonetizationCubit>()
|
||||
.presentCustomerCenter(),
|
||||
child: const Text('Gestisci'),
|
||||
onPressed: () =>
|
||||
PaywallSheet.showPremiumManageDialog(
|
||||
context),
|
||||
child: Text(l10n.manageButton),
|
||||
)
|
||||
: FilledButton(
|
||||
onPressed: () => context
|
||||
.read<MonetizationCubit>()
|
||||
.presentPaywall(),
|
||||
onPressed: () => PaywallSheet.show(context),
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: const Color(0xFFFBBF24),
|
||||
foregroundColor: Colors.black87,
|
||||
),
|
||||
child: const Text('Passa a Premium'),
|
||||
child: Text(l10n.upgradePremiumShort),
|
||||
),
|
||||
),
|
||||
if (!isPremium) ...[
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.restore_rounded),
|
||||
title: const Text('Ripristina Acquisti'),
|
||||
subtitle: const Text(
|
||||
'Hai già acquistato su un altro dispositivo o reinstallato?',
|
||||
),
|
||||
title: Text(l10n.restorePurchasesTitle),
|
||||
subtitle: Text(l10n.restorePurchasesSubtitle),
|
||||
onTap: () async {
|
||||
final restored = await context
|
||||
.read<MonetizationCubit>()
|
||||
@@ -102,8 +105,8 @@ class SettingsScreen extends StatelessWidget {
|
||||
SnackBar(
|
||||
content: Text(
|
||||
restored
|
||||
? 'Acquisti ripristinati con successo!'
|
||||
: 'Nessun acquisto attivo trovato da ripristinare.',
|
||||
? l10n.restorePurchasesSuccess
|
||||
: l10n.restorePurchasesEmpty,
|
||||
),
|
||||
backgroundColor: restored
|
||||
? AppTheme.success
|
||||
@@ -122,7 +125,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
const SizedBox(height: 14),
|
||||
|
||||
// PC Connection Section
|
||||
const _SectionHeader(title: 'CONNESSIONE PC & NEGOZIO'),
|
||||
_SectionHeader(title: l10n.sectionPcConnection),
|
||||
Card(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -148,13 +151,14 @@ class SettingsScreen extends StatelessWidget {
|
||||
size: 22,
|
||||
),
|
||||
),
|
||||
title: const Text('Stato Postazione'),
|
||||
title: Text(l10n.workstationStatusTitle),
|
||||
subtitle: Text(
|
||||
isConnected
|
||||
? 'Connesso a ${connState.info.displayName}'
|
||||
? l10n.connectedToName(
|
||||
connState.info.displayName)
|
||||
: (connState.info.isConfigured
|
||||
? 'Non connesso (${connState.info.ip})'
|
||||
: 'Nessun PC configurato'),
|
||||
? l10n.notConnectedWithIp(connState.info.ip)
|
||||
: l10n.noPcConfigured),
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
trailing: const Icon(Icons.chevron_right_rounded),
|
||||
@@ -184,11 +188,11 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.storefront_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Postazioni PC Preferite'),
|
||||
title: Text(l10n.favoriteWorkstationsTitle),
|
||||
subtitle: Text(
|
||||
count > 0
|
||||
? '$count computer registrati nel negozio'
|
||||
: 'Nessun computer salvato',
|
||||
? l10n.registeredComputersCount(count)
|
||||
: l10n.noComputersSaved,
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
trailing: const Icon(Icons.chevron_right_rounded),
|
||||
@@ -211,13 +215,14 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.flash_auto_rounded,
|
||||
color: AppTheme.secondary, size: 22),
|
||||
),
|
||||
title: const Text(
|
||||
'Autocollegamento all\'avvio/risveglio',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
|
||||
title: Text(
|
||||
l10n.autoConnectFullTitle,
|
||||
style: const TextStyle(
|
||||
fontSize: 14, fontWeight: FontWeight.w600),
|
||||
),
|
||||
subtitle: const Text(
|
||||
'Disattivato: chiede sempre a quale PC connettersi (evita di sparare codici sul PC del collega)',
|
||||
style: TextStyle(fontSize: 12),
|
||||
subtitle: Text(
|
||||
l10n.autoConnectFullSubtitle,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
value: settings.autoConnect,
|
||||
onChanged: (val) {
|
||||
@@ -237,14 +242,16 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.timer_outlined,
|
||||
color: AppTheme.warning, size: 22),
|
||||
),
|
||||
title: const Text(
|
||||
'Disconnessione per inattività',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
|
||||
title: Text(
|
||||
l10n.inactivityDisconnectTitle,
|
||||
style: const TextStyle(
|
||||
fontSize: 14, fontWeight: FontWeight.w600),
|
||||
),
|
||||
subtitle: Text(
|
||||
settings.inactivityTimeoutMinutes > 0
|
||||
? 'Interrompe la connessione dopo ${settings.inactivityTimeoutMinutes} minuti senza scansioni'
|
||||
: 'Disattivata (rimane sempre connesso)',
|
||||
? l10n.inactivityDisconnectActive(
|
||||
settings.inactivityTimeoutMinutes)
|
||||
: l10n.inactivityDisconnectOff,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
trailing: DropdownButton<int>(
|
||||
@@ -254,11 +261,15 @@ class SettingsScreen extends StatelessWidget {
|
||||
color: AppTheme.darkTextPrimary,
|
||||
fontWeight: FontWeight.bold),
|
||||
underline: const SizedBox.shrink(),
|
||||
items: const [
|
||||
DropdownMenuItem(value: 5, child: Text('5 min (Consigliato)')),
|
||||
DropdownMenuItem(value: 10, child: Text('10 min')),
|
||||
DropdownMenuItem(value: 15, child: Text('15 min')),
|
||||
DropdownMenuItem(value: 0, child: Text('Disattivata')),
|
||||
items: [
|
||||
DropdownMenuItem(
|
||||
value: 5, child: Text(l10n.inactivity5Min)),
|
||||
DropdownMenuItem(
|
||||
value: 10, child: Text(l10n.inactivity10Min)),
|
||||
DropdownMenuItem(
|
||||
value: 15, child: Text(l10n.inactivity15Min)),
|
||||
DropdownMenuItem(
|
||||
value: 0, child: Text(l10n.disabledOption)),
|
||||
],
|
||||
onChanged: (val) {
|
||||
if (val != null) {
|
||||
@@ -285,10 +296,10 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.send_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Invia Test di Digitazione'),
|
||||
subtitle: const Text(
|
||||
'Digita "TEST-CATELLI-123" sul PC attivo',
|
||||
style: TextStyle(fontSize: 13),
|
||||
title: Text(l10n.sendTypingTestTitle),
|
||||
subtitle: Text(
|
||||
l10n.sendTypingTestSubtitle,
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
onTap: () {
|
||||
context.read<ConnectionCubit>().sendCode(
|
||||
@@ -296,9 +307,9 @@ class SettingsScreen extends StatelessWidget {
|
||||
suffix: settings.suffix,
|
||||
);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Test di digitazione inviato al PC!'),
|
||||
duration: Duration(seconds: 1),
|
||||
SnackBar(
|
||||
content: Text(l10n.typingTestSentSnackbar),
|
||||
duration: const Duration(seconds: 1),
|
||||
backgroundColor: AppTheme.darkCard,
|
||||
),
|
||||
);
|
||||
@@ -311,14 +322,13 @@ class SettingsScreen extends StatelessWidget {
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Keyboard Emulation Section
|
||||
const _SectionHeader(title: 'EMULAZIONE TASTIERA PC'),
|
||||
_SectionHeader(title: l10n.sectionKeyboardEmulation),
|
||||
Card(
|
||||
child: Column(
|
||||
children: [
|
||||
_RadioOption(
|
||||
title: 'Tasto Invio (Enter)',
|
||||
subtitle:
|
||||
'Preme Invio dopo ogni codice (consigliato per Excel, ERP, gestionali)',
|
||||
title: l10n.suffixEnterTitle,
|
||||
subtitle: l10n.suffixEnterSubtitle,
|
||||
isSelected: settings.suffix == AppConstants.suffixEnter,
|
||||
onTap: () {
|
||||
context
|
||||
@@ -328,8 +338,8 @@ class SettingsScreen extends StatelessWidget {
|
||||
),
|
||||
const Divider(height: 1),
|
||||
_RadioOption(
|
||||
title: 'Tasto Tabulatore (Tab)',
|
||||
subtitle: 'Sposta il cursore al campo/cella successiva',
|
||||
title: l10n.suffixTabTitle,
|
||||
subtitle: l10n.suffixTabSubtitle,
|
||||
isSelected: settings.suffix == AppConstants.suffixTab,
|
||||
onTap: () {
|
||||
context
|
||||
@@ -339,8 +349,8 @@ class SettingsScreen extends StatelessWidget {
|
||||
),
|
||||
const Divider(height: 1),
|
||||
_RadioOption(
|
||||
title: 'Nessun tasto finale',
|
||||
subtitle: 'Scrive solo la stringa pura del codice a barre',
|
||||
title: l10n.suffixNoneTitle,
|
||||
subtitle: l10n.suffixNoneSubtitle,
|
||||
isSelected: settings.suffix == AppConstants.suffixNone,
|
||||
onTap: () {
|
||||
context
|
||||
@@ -355,7 +365,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Scan & Feedback Section
|
||||
const _SectionHeader(title: 'SCANSIONE E FEEDBACK'),
|
||||
_SectionHeader(title: l10n.sectionScanFeedback),
|
||||
Card(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -369,10 +379,10 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.gps_fixed_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Modalità di mira'),
|
||||
subtitle: const Text(
|
||||
'Standard, Precisione (mirino + zoom) o AR Multi-Codice',
|
||||
style: TextStyle(fontSize: 12),
|
||||
title: Text(l10n.aimModeTitle),
|
||||
subtitle: Text(
|
||||
l10n.aimModeSubtitle,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
trailing: DropdownButton<ScanAimMode>(
|
||||
value: settings.aimMode,
|
||||
@@ -386,7 +396,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
for (final mode in ScanAimMode.values)
|
||||
DropdownMenuItem(
|
||||
value: mode,
|
||||
child: Text(mode.label),
|
||||
child: Text(mode.localizedLabel(l10n)),
|
||||
),
|
||||
],
|
||||
onChanged: (mode) {
|
||||
@@ -407,9 +417,11 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.hourglass_bottom_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Pausa dopo scansione'),
|
||||
title: Text(l10n.postScanPauseTitle),
|
||||
subtitle: Text(
|
||||
'Attesa di ${(settings.scanCooldownMs / 1000).toStringAsFixed(1).replaceAll('.', ',')}s prima della prossima lettura',
|
||||
l10n.postScanPauseSubtitle(
|
||||
(settings.scanCooldownMs / 1000).toStringAsFixed(1),
|
||||
),
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
trailing: DropdownButton<int>(
|
||||
@@ -420,13 +432,19 @@ class SettingsScreen extends StatelessWidget {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
underline: const SizedBox.shrink(),
|
||||
items: const [
|
||||
DropdownMenuItem(value: 1000, child: Text('1,0 sec (Rapida)')),
|
||||
DropdownMenuItem(value: 2000, child: Text('2,0 sec')),
|
||||
DropdownMenuItem(value: 2500, child: Text('2,5 sec (Consigliata)')),
|
||||
DropdownMenuItem(value: 3000, child: Text('3,0 sec')),
|
||||
DropdownMenuItem(value: 4000, child: Text('4,0 sec')),
|
||||
DropdownMenuItem(value: 5000, child: Text('5,0 sec')),
|
||||
items: [
|
||||
DropdownMenuItem(
|
||||
value: 1000, child: Text(l10n.cooldown1s)),
|
||||
DropdownMenuItem(
|
||||
value: 2000, child: Text(l10n.cooldown2s)),
|
||||
DropdownMenuItem(
|
||||
value: 2500, child: Text(l10n.cooldown25s)),
|
||||
DropdownMenuItem(
|
||||
value: 3000, child: Text(l10n.cooldown3s)),
|
||||
DropdownMenuItem(
|
||||
value: 4000, child: Text(l10n.cooldown4s)),
|
||||
DropdownMenuItem(
|
||||
value: 5000, child: Text(l10n.cooldown5s)),
|
||||
],
|
||||
onChanged: (val) {
|
||||
if (val != null) {
|
||||
@@ -448,10 +466,10 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.repeat_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Scansione Continua'),
|
||||
subtitle: const Text(
|
||||
'Riduce la pausa a 1,0s quando inquadri codici diversi in serie',
|
||||
style: TextStyle(fontSize: 12),
|
||||
title: Text(l10n.continuousScanTitle),
|
||||
subtitle: Text(
|
||||
l10n.continuousScanSubtitle,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
value: settings.continuousMode,
|
||||
onChanged: (val) {
|
||||
@@ -469,10 +487,10 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.vibration_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Vibrazione alla lettura'),
|
||||
subtitle: const Text(
|
||||
'Feedback aptico alla decodifica del codice',
|
||||
style: TextStyle(fontSize: 13),
|
||||
title: Text(l10n.vibrationTitle),
|
||||
subtitle: Text(
|
||||
l10n.vibrationSubtitle,
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
value: settings.vibrate,
|
||||
onChanged: (val) {
|
||||
@@ -492,10 +510,10 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.volume_up_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Suono di conferma'),
|
||||
subtitle: const Text(
|
||||
'Segnale acustico alla lettura del barcode',
|
||||
style: TextStyle(fontSize: 13),
|
||||
title: Text(l10n.soundTitle),
|
||||
subtitle: Text(
|
||||
l10n.soundSubtitle,
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
value: settings.sound,
|
||||
onChanged: (val) {
|
||||
@@ -508,8 +526,55 @@ class SettingsScreen extends StatelessWidget {
|
||||
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Language Section
|
||||
_SectionHeader(title: l10n.sectionLanguage),
|
||||
Card(
|
||||
child: ListTile(
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.primary.withValues(alpha: 0.15),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: const Icon(Icons.language_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: Text(l10n.languageTitle),
|
||||
trailing: DropdownButton<String>(
|
||||
value: settings.languageCode,
|
||||
dropdownColor: AppTheme.darkCard,
|
||||
style: const TextStyle(
|
||||
color: AppTheme.darkTextPrimary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
underline: const SizedBox.shrink(),
|
||||
items: [
|
||||
DropdownMenuItem(
|
||||
value: '',
|
||||
child: Text(l10n.languageSystem),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: 'it',
|
||||
child: Text(l10n.languageItalian),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: 'en',
|
||||
child: Text(l10n.languageEnglish),
|
||||
),
|
||||
],
|
||||
onChanged: (code) {
|
||||
if (code != null) {
|
||||
context.read<SettingsCubit>().updateLanguageCode(code);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Info Section
|
||||
const _SectionHeader(title: 'INFORMAZIONI'),
|
||||
_SectionHeader(title: l10n.sectionInfo),
|
||||
Card(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -523,7 +588,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.business_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Organizzazione'),
|
||||
title: Text(l10n.organizationTitle),
|
||||
subtitle: const Text(AppConstants.organization,
|
||||
style: TextStyle(fontSize: 13)),
|
||||
),
|
||||
@@ -538,7 +603,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: const Icon(Icons.info_outline_rounded,
|
||||
color: AppTheme.primary, size: 22),
|
||||
),
|
||||
title: const Text('Versione App'),
|
||||
title: Text(l10n.appVersionTitle),
|
||||
subtitle: const Text(
|
||||
'${AppConstants.appVersion} (Flutter Clean Architecture & Cubit)',
|
||||
style: TextStyle(fontSize: 13),
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
{
|
||||
"@@locale": "en",
|
||||
"appTitle": "Catelli Barcode Reader",
|
||||
"cancel": "Cancel",
|
||||
"remove": "Remove",
|
||||
"connect": "Connect",
|
||||
"reconnect": "Reconnect",
|
||||
"active": "Active",
|
||||
"activeUppercase": "ACTIVE",
|
||||
"connected": "Connected",
|
||||
"connecting": "Connecting...",
|
||||
"notConnected": "Not connected",
|
||||
"pinOrNetworkError": "PIN/Network error",
|
||||
"defaultStorePcName": "Store PC",
|
||||
"defaultPcServerName": "PC Server",
|
||||
"enterValidIp": "Enter a valid PC IP address",
|
||||
"connectingToHost": "Connecting to {ip}:{port}...",
|
||||
"@connectingToHost": {
|
||||
"placeholders": {
|
||||
"ip": { "type": "String" },
|
||||
"port": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"connectingToName": "Connecting to {name}...",
|
||||
"@connectingToName": {
|
||||
"placeholders": {
|
||||
"name": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"pcConnectionsTitle": "PC Workstations Connection",
|
||||
"scanPcQrCode": "Scan QR Code on PC",
|
||||
"savedStoreWorkstations": "Saved Store Workstations",
|
||||
"favoritesCount": "{count, plural, =1{1 favorite} other{{count} favorites}}",
|
||||
"@favoritesCount": {
|
||||
"placeholders": {
|
||||
"count": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"detectedWifiPcs": "PCs Detected on Wi-Fi",
|
||||
"refreshDiscoveryTooltip": "Refresh scan",
|
||||
"searchingPcServers": "Searching for PC servers on the network...",
|
||||
"noPcServersFound": "No PC server detected automatically on the network.\nMake sure the PC companion app is running and connected to the same Wi-Fi.",
|
||||
"requiresPin": "Requires PIN",
|
||||
"withPin": "With PIN",
|
||||
"manualSetup": "Manual Configuration",
|
||||
"workstationNameLabel": "Workstation / PC Name (optional)",
|
||||
"workstationNameHint": "e.g. Register 1, Warehouse, Office",
|
||||
"pcIpLabel": "PC IP Address",
|
||||
"pcIpHint": "e.g. 192.168.1.100",
|
||||
"portLabel": "Port",
|
||||
"pinOptionalLabel": "PIN (if set)",
|
||||
"pinHint": "PIN code",
|
||||
"saveAndConnectManually": "Save and Connect Manually",
|
||||
"disconnectFromPc": "Disconnect from PC",
|
||||
"disconnectedByInactivity": "Disconnected due to inactivity",
|
||||
"disconnectedManually": "Manually disconnected",
|
||||
"qrModalTitle": "Scan Server QR Code",
|
||||
"qrModalSubtitle": "Point the camera at the QR code shown in the PC companion app.",
|
||||
"removeWorkstationTitle": "Remove workstation?",
|
||||
"removeWorkstationMessage": "Do you want to remove \"{name}\" ({ip}) from favorite PCs?",
|
||||
"@removeWorkstationMessage": {
|
||||
"placeholders": {
|
||||
"name": { "type": "String" },
|
||||
"ip": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"selectPcWorkstation": "Select PC Workstation",
|
||||
"selectPcSubtitle": "Choose the computer where codes will be typed",
|
||||
"inactivityAlert": "Disconnected due to inactivity. Select a workstation before scanning.",
|
||||
"noFavoritePcs": "No favorite PC saved",
|
||||
"noFavoritePcsHint": "Add your store computers to connect with 1 tap and avoid typing on a colleague's PC.",
|
||||
"removeFavoriteTooltip": "Remove from favorites",
|
||||
"addNewPcButton": "Add New PC (Wi-Fi or QR Code)",
|
||||
"autoConnectOnStartup": "Auto-connect on startup",
|
||||
"autoConnectSubtitleShort": "Disabled: asks to pick a PC (recommended in multi-PC stores)",
|
||||
"unlimitedScansTitle": "Unlimited Scans",
|
||||
"unlimitedScansDescription": "Watch a short video to unlock 15 minutes of uninterrupted unlimited PC scanning.",
|
||||
"unlocked15MinSnackbar": "15 minutes of unlimited scans unlocked!",
|
||||
"loadingVideoRetrySnackbar": "Loading video... Please try again in a moment.",
|
||||
"loadingVideoButton": "Loading video...",
|
||||
"watchVideoButton": "Watch Video (+15 min)",
|
||||
"welcomePremiumSnackbar": "Welcome to Unlimited Premium!",
|
||||
"upgradeToPremiumButton": "Upgrade to Unlimited Premium",
|
||||
"laterButton": "Later",
|
||||
"sentToPcSnackbar": "Sent to PC: {code}",
|
||||
"@sentToPcSnackbar": {
|
||||
"placeholders": {
|
||||
"code": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"savedToHistoryOfflineSnackbar": "Code saved to history (PC not connected)",
|
||||
"torchTooltip": "Flashlight",
|
||||
"switchCameraTooltip": "Switch Camera",
|
||||
"historyTooltip": "History",
|
||||
"settingsTooltip": "Settings",
|
||||
"premiumBadge": "Premium",
|
||||
"unlimitedSessionLabel": "{time} Unlimited",
|
||||
"@unlimitedSessionLabel": {
|
||||
"placeholders": {
|
||||
"time": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"freeScansShort": "{count} free",
|
||||
"@freeScansShort": {
|
||||
"placeholders": {
|
||||
"count": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"unlock15Min": "Unlock 15 min",
|
||||
"aimModeStandard": "Standard",
|
||||
"aimModePrecision": "Precision",
|
||||
"aimModeArMulti": "AR Multi",
|
||||
"waitingForCodesCancel": "Waiting for codes… Tap to cancel",
|
||||
"freezeFrameCount": "{count, plural, =1{Freeze frame (1 code)} other{Freeze frame ({count} codes)}}",
|
||||
"@freezeFrameCount": {
|
||||
"placeholders": {
|
||||
"count": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"freezeAndPick": "Freeze & pick",
|
||||
"manualButton": "Manual",
|
||||
"manualFormat": "Manual",
|
||||
"manualInputTitle": "Manual Entry",
|
||||
"manualInputSubtitle": "Type or paste the code to send directly to the PC:",
|
||||
"manualInputHint": "e.g. 8001234567890 or ART-99",
|
||||
"pasteFromClipboardTooltip": "Paste from clipboard",
|
||||
"sendToPcButton": "Send to PC",
|
||||
"precisionHelperText": "Center crosshair on code • Tap to focus",
|
||||
"standardHelperText": "Frame barcode or QR • Pinch to zoom",
|
||||
"cooldownSent": "Sent • Pause {seconds}s",
|
||||
"@cooldownSent": {
|
||||
"placeholders": {
|
||||
"seconds": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"cooldownNotSent": "Not sent • Pause {seconds}s",
|
||||
"@cooldownNotSent": {
|
||||
"placeholders": {
|
||||
"seconds": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"notSent": "Not sent",
|
||||
"copyTooltip": "Copy",
|
||||
"codeCopiedSnackbar": "Code copied to clipboard",
|
||||
"resendToPcTooltip": "Send to PC again",
|
||||
"frozenFrameCount": "{count, plural, =1{Frozen frame • 1 code} other{Frozen frame • {count} codes}}",
|
||||
"@frozenFrameCount": {
|
||||
"placeholders": {
|
||||
"count": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"resumeButton": "Resume",
|
||||
"tapCodeToSend": "Tap a code to send it to the PC",
|
||||
"newScanButton": "New scan",
|
||||
"sentLabel": "Sent",
|
||||
"sendLabel": "Send",
|
||||
"clearHistoryTitle": "Clear History?",
|
||||
"clearHistoryMessage": "All codes saved in history on this device will be removed.",
|
||||
"clearAllButton": "Clear All",
|
||||
"scanHistoryTitle": "Scan History",
|
||||
"clearHistoryTooltip": "Clear history",
|
||||
"searchCodesHint": "Search codes...",
|
||||
"noScansInHistory": "No scans in history",
|
||||
"noResultsForQuery": "No results for \"{query}\"",
|
||||
"@noResultsForQuery": {
|
||||
"placeholders": {
|
||||
"query": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"copyCodeTooltip": "Copy code",
|
||||
"copiedToClipboardSnackbar": "Copied to clipboard",
|
||||
"resentCodeSnackbar": "Sent \"{code}\" to PC",
|
||||
"@resentCodeSnackbar": {
|
||||
"placeholders": {
|
||||
"code": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"settingsTitle": "Settings",
|
||||
"sectionPlanSubscription": "PLAN & SUBSCRIPTION",
|
||||
"premiumPlanActive": "Premium Plan Active",
|
||||
"freeBaseVersion": "Free Basic Version",
|
||||
"unlimitedAndAdFree": "Unlimited scans and zero ads",
|
||||
"activeSessionLabel": "Active session: {time}",
|
||||
"@activeSessionLabel": {
|
||||
"placeholders": {
|
||||
"time": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"freeScansRemaining": "{count, plural, =1{1 free scan remaining} other{{count} free scans remaining}}",
|
||||
"@freeScansRemaining": {
|
||||
"placeholders": {
|
||||
"count": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"manageButton": "Manage",
|
||||
"upgradePremiumShort": "Go Premium",
|
||||
"restorePurchasesTitle": "Restore Purchases",
|
||||
"restorePurchasesSubtitle": "Already purchased on another device or reinstalled?",
|
||||
"restorePurchasesSuccess": "Purchases restored successfully!",
|
||||
"restorePurchasesEmpty": "No active purchases found to restore.",
|
||||
"sectionPcConnection": "PC & STORE CONNECTION",
|
||||
"workstationStatusTitle": "Workstation Status",
|
||||
"connectedToName": "Connected to {name}",
|
||||
"@connectedToName": {
|
||||
"placeholders": {
|
||||
"name": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"notConnectedWithIp": "Not connected ({ip})",
|
||||
"@notConnectedWithIp": {
|
||||
"placeholders": {
|
||||
"ip": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"noPcConfigured": "No PC configured",
|
||||
"favoriteWorkstationsTitle": "Favorite PC Workstations",
|
||||
"registeredComputersCount": "{count, plural, =1{1 computer saved} other{{count} computers saved}}",
|
||||
"@registeredComputersCount": {
|
||||
"placeholders": {
|
||||
"count": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"noComputersSaved": "No computers saved",
|
||||
"autoConnectFullTitle": "Auto-connect on startup/resume",
|
||||
"autoConnectFullSubtitle": "Disabled: always asks which PC to connect to (prevents typing on a colleague's PC)",
|
||||
"inactivityDisconnectTitle": "Inactivity disconnect",
|
||||
"inactivityDisconnectActive": "Disconnects after {minutes} minutes without scans",
|
||||
"@inactivityDisconnectActive": {
|
||||
"placeholders": {
|
||||
"minutes": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"inactivityDisconnectOff": "Disabled (stays connected)",
|
||||
"inactivity5Min": "5 min (Recommended)",
|
||||
"inactivity10Min": "10 min",
|
||||
"inactivity15Min": "15 min",
|
||||
"disabledOption": "Disabled",
|
||||
"sendTypingTestTitle": "Send Typing Test",
|
||||
"sendTypingTestSubtitle": "Types \"TEST-CATELLI-123\" on the active PC",
|
||||
"typingTestSentSnackbar": "Typing test sent to PC!",
|
||||
"sectionKeyboardEmulation": "PC KEYBOARD EMULATION",
|
||||
"suffixEnterTitle": "Enter Key",
|
||||
"suffixEnterSubtitle": "Presses Enter after each code (recommended for Excel, ERP, POS)",
|
||||
"suffixTabTitle": "Tab Key",
|
||||
"suffixTabSubtitle": "Moves cursor to the next field/cell",
|
||||
"suffixNoneTitle": "No trailing key",
|
||||
"suffixNoneSubtitle": "Types only the raw barcode string",
|
||||
"sectionScanFeedback": "SCANNING & FEEDBACK",
|
||||
"aimModeTitle": "Aiming mode",
|
||||
"aimModeSubtitle": "Standard, Precision (crosshair + zoom), or AR Multi-Code",
|
||||
"postScanPauseTitle": "Post-scan pause",
|
||||
"postScanPauseSubtitle": "Wait {seconds}s before the next reading",
|
||||
"@postScanPauseSubtitle": {
|
||||
"placeholders": {
|
||||
"seconds": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"cooldown1s": "1.0 sec (Fast)",
|
||||
"cooldown2s": "2.0 sec",
|
||||
"cooldown25s": "2.5 sec (Recommended)",
|
||||
"cooldown3s": "3.0 sec",
|
||||
"cooldown4s": "4.0 sec",
|
||||
"cooldown5s": "5.0 sec",
|
||||
"continuousScanTitle": "Continuous Scanning",
|
||||
"continuousScanSubtitle": "Reduces pause to 1.0s when scanning different codes in a row",
|
||||
"vibrationTitle": "Vibrate on scan",
|
||||
"vibrationSubtitle": "Haptic feedback when a code is decoded",
|
||||
"soundTitle": "Confirmation sound",
|
||||
"soundSubtitle": "Audio beep when a barcode is read",
|
||||
"sectionLanguage": "LANGUAGE",
|
||||
"languageTitle": "App Language",
|
||||
"languageSystem": "System default",
|
||||
"languageItalian": "Italiano",
|
||||
"languageEnglish": "English",
|
||||
"sectionInfo": "ABOUT",
|
||||
"organizationTitle": "Organization",
|
||||
"appVersionTitle": "App Version",
|
||||
"paywallTitle": "Barcode Reader Premium",
|
||||
"paywallSubtitle": "Unlock unlimited PC scanning with zero interruptions.",
|
||||
"paywallBenefitUnlimited": "Unlimited barcode & QR scans forever",
|
||||
"paywallBenefitNoAds": "Zero ads, no waiting timers",
|
||||
"paywallBenefitAllModes": "Standard, Precision & AR Multi-Scan modes",
|
||||
"paywallBenefitMultiPc": "Multi-PC favorites & instant Wi-Fi sync",
|
||||
"paywallPlanYearly": "Yearly",
|
||||
"paywallPlanMonthly": "Monthly",
|
||||
"paywallPlanLifetime": "Lifetime",
|
||||
"paywallPerYear": "/ year",
|
||||
"paywallPerMonth": "/ month",
|
||||
"paywallOneTime": "One-time purchase",
|
||||
"paywallBestValue": "BEST VALUE",
|
||||
"paywallSavePercent": "SAVE {percent}%",
|
||||
"@paywallSavePercent": {
|
||||
"placeholders": {
|
||||
"percent": { "type": "int" }
|
||||
}
|
||||
},
|
||||
"paywallOneTimeBadge": "PAY ONCE",
|
||||
"paywallContinueButton": "Continue",
|
||||
"paywallContinueWithPrice": "Continue — {price}",
|
||||
"@paywallContinueWithPrice": {
|
||||
"placeholders": {
|
||||
"price": { "type": "String" }
|
||||
}
|
||||
},
|
||||
"paywallLoadingPlans": "Loading available plans...",
|
||||
"paywallUnavailableTitle": "Plans temporarily unavailable",
|
||||
"paywallUnavailableSubtitle": "Check your internet connection or Google Play availability and try again.",
|
||||
"paywallRetryButton": "Retry",
|
||||
"paywallPurchaseError": "Purchase could not be completed. Please try again.",
|
||||
"paywallLegalNote": "Subscriptions auto-renew unless cancelled at least 24 hours before the end of the period in Google Play settings.",
|
||||
"premiumManageTitle": "Premium Active",
|
||||
"premiumManageBody": "Your Unlimited Premium plan is active on this account.\n\nTo manage or cancel a subscription, open Google Play Store → Payments & subscriptions → Subscriptions.",
|
||||
"closeButton": "Close"
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
{
|
||||
"@@locale": "it",
|
||||
"appTitle": "Catelli Barcode Reader",
|
||||
"cancel": "Annulla",
|
||||
"remove": "Rimuovi",
|
||||
"connect": "Connetti",
|
||||
"reconnect": "Riconnetti",
|
||||
"active": "Attivo",
|
||||
"activeUppercase": "ATTIVO",
|
||||
"connected": "Connesso",
|
||||
"connecting": "Connessione...",
|
||||
"notConnected": "Non connesso",
|
||||
"pinOrNetworkError": "Errore PIN/Rete",
|
||||
"defaultStorePcName": "PC Negozio",
|
||||
"defaultPcServerName": "PC Server",
|
||||
"enterValidIp": "Inserisci un indirizzo IP valido del PC",
|
||||
"connectingToHost": "Connessione a {ip}:{port} in corso...",
|
||||
"connectingToName": "Connessione a {name}...",
|
||||
"pcConnectionsTitle": "Connessione Postazioni PC",
|
||||
"scanPcQrCode": "Inquadra QR Code sul PC",
|
||||
"savedStoreWorkstations": "Postazioni Salvate nel Negozio",
|
||||
"favoritesCount": "{count, plural, =1{1 preferito} other{{count} preferiti}}",
|
||||
"detectedWifiPcs": "PC Rilevati in Wi-Fi",
|
||||
"refreshDiscoveryTooltip": "Aggiorna ricerca",
|
||||
"searchingPcServers": "Ricerca server PC in corso sulla rete...",
|
||||
"noPcServersFound": "Nessun server PC rilevato automaticamente sulla rete.\nAssicurati che il programma sul PC sia avviato e connesso allo stesso Wi-Fi.",
|
||||
"requiresPin": "Richiede PIN",
|
||||
"withPin": "Con PIN",
|
||||
"manualSetup": "Configurazione Manuale",
|
||||
"workstationNameLabel": "Nome Postazione / PC (opzionale)",
|
||||
"workstationNameHint": "Es. Cassa 1, Magazzino, Ufficio",
|
||||
"pcIpLabel": "Indirizzo IP del PC",
|
||||
"pcIpHint": "Es. 192.168.1.100",
|
||||
"portLabel": "Porta",
|
||||
"pinOptionalLabel": "PIN (se impostato)",
|
||||
"pinHint": "Codice PIN",
|
||||
"saveAndConnectManually": "Salva e Connetti Manualmente",
|
||||
"disconnectFromPc": "Disconnetti dal PC",
|
||||
"disconnectedByInactivity": "Disconnesso per inattività",
|
||||
"disconnectedManually": "Disconnesso manualmente",
|
||||
"qrModalTitle": "Inquadra QR Code del Server",
|
||||
"qrModalSubtitle": "Inquadra il codice QR mostrato nell'app companion sul PC.",
|
||||
"removeWorkstationTitle": "Rimuovere postazione?",
|
||||
"removeWorkstationMessage": "Vuoi eliminare \"{name}\" ({ip}) dai PC preferiti?",
|
||||
"selectPcWorkstation": "Seleziona Postazione PC",
|
||||
"selectPcSubtitle": "Scegli il computer del negozio su cui scrivere",
|
||||
"inactivityAlert": "Disconnesso per inattività. Seleziona la postazione prima di scansionare.",
|
||||
"noFavoritePcs": "Nessun PC preferito salvato",
|
||||
"noFavoritePcsHint": "Aggiungi i computer del negozio per collegarti con 1 tocco ed evitare errori tra colleghi.",
|
||||
"removeFavoriteTooltip": "Rimuovi dai preferiti",
|
||||
"addNewPcButton": "Aggiungi Nuovo PC (Wi-Fi o QR Code)",
|
||||
"autoConnectOnStartup": "Collega automaticamente all'avvio",
|
||||
"autoConnectSubtitleShort": "Disattivato: richiede la selezione del PC (consigliato in negozio)",
|
||||
"unlimitedScansTitle": "Scansioni Illimitate",
|
||||
"unlimitedScansDescription": "Guarda un breve video per sbloccare 15 minuti di scansioni illimitate al PC senza interruzioni.",
|
||||
"unlocked15MinSnackbar": "15 minuti di scansioni illimitate sbloccati!",
|
||||
"loadingVideoRetrySnackbar": "Caricamento video in corso... Riprova tra pochi istanti.",
|
||||
"loadingVideoButton": "Caricamento video...",
|
||||
"watchVideoButton": "Guarda Video (+15 min)",
|
||||
"welcomePremiumSnackbar": "Benvenuto in Premium Illimitato!",
|
||||
"upgradeToPremiumButton": "Passa a Premium Illimitato",
|
||||
"laterButton": "Più tardi",
|
||||
"sentToPcSnackbar": "Inviato al PC: {code}",
|
||||
"savedToHistoryOfflineSnackbar": "Codice salvato in cronologia (PC non connesso)",
|
||||
"torchTooltip": "Torcia",
|
||||
"switchCameraTooltip": "Inverti Fotocamera",
|
||||
"historyTooltip": "Cronologia",
|
||||
"settingsTooltip": "Impostazioni",
|
||||
"premiumBadge": "Premium",
|
||||
"unlimitedSessionLabel": "{time} Illimitati",
|
||||
"freeScansShort": "{count} libere",
|
||||
"unlock15Min": "Sblocca 15 min",
|
||||
"aimModeStandard": "Standard",
|
||||
"aimModePrecision": "Precisione",
|
||||
"aimModeArMulti": "AR Multi",
|
||||
"waitingForCodesCancel": "In attesa dei codici… Tocca per annullare",
|
||||
"freezeFrameCount": "{count, plural, =1{Blocca frame (1 codice)} other{Blocca frame ({count} codici)}}",
|
||||
"freezeAndPick": "Blocca e scegli",
|
||||
"manualButton": "Manuale",
|
||||
"manualFormat": "Manuale",
|
||||
"manualInputTitle": "Digitazione Manuale",
|
||||
"manualInputSubtitle": "Digita o incolla il codice da digitare in tempo reale sul PC:",
|
||||
"manualInputHint": "Es. 8001234567890 o ART-99",
|
||||
"pasteFromClipboardTooltip": "Incolla dagli appunti",
|
||||
"sendToPcButton": "Invia al PC",
|
||||
"precisionHelperText": "Centra il mirino sul codice • Tocca per mettere a fuoco",
|
||||
"standardHelperText": "Inquadra codice a barre o QR • Pizzica per zoomare",
|
||||
"cooldownSent": "Inviato • Pausa {seconds}s",
|
||||
"cooldownNotSent": "Non inviato • Pausa {seconds}s",
|
||||
"notSent": "Non inviato",
|
||||
"copyTooltip": "Copia",
|
||||
"codeCopiedSnackbar": "Codice copiato negli appunti",
|
||||
"resendToPcTooltip": "Invia di nuovo al PC",
|
||||
"frozenFrameCount": "{count, plural, =1{Frame bloccato • 1 codice} other{Frame bloccato • {count} codici}}",
|
||||
"resumeButton": "Riprendi",
|
||||
"tapCodeToSend": "Tocca un codice per inviarlo al PC",
|
||||
"newScanButton": "Nuova scansione",
|
||||
"sentLabel": "Inviato",
|
||||
"sendLabel": "Invia",
|
||||
"clearHistoryTitle": "Cancellare Cronologia?",
|
||||
"clearHistoryMessage": "Tutti i codici salvati nella cronologia su questo dispositivo verranno rimossi.",
|
||||
"clearAllButton": "Cancella Tutto",
|
||||
"scanHistoryTitle": "Cronologia Scansioni",
|
||||
"clearHistoryTooltip": "Cancella cronologia",
|
||||
"searchCodesHint": "Cerca tra i codici...",
|
||||
"noScansInHistory": "Nessuna scansione in memoria",
|
||||
"noResultsForQuery": "Nessun risultato per \"{query}\"",
|
||||
"copyCodeTooltip": "Copia codice",
|
||||
"copiedToClipboardSnackbar": "Copiato negli appunti",
|
||||
"resentCodeSnackbar": "Inviato \"{code}\" al PC",
|
||||
"settingsTitle": "Impostazioni",
|
||||
"sectionPlanSubscription": "PIANO & ABBONAMENTO",
|
||||
"premiumPlanActive": "Piano Premium Attivo",
|
||||
"freeBaseVersion": "Versione Base Gratuita",
|
||||
"unlimitedAndAdFree": "Scansioni illimitate e zero pubblicità",
|
||||
"activeSessionLabel": "Sessione attiva: {time}",
|
||||
"freeScansRemaining": "{count, plural, =1{1 scansione libera rimanente} other{{count} scansioni libere rimanenti}}",
|
||||
"manageButton": "Gestisci",
|
||||
"upgradePremiumShort": "Passa a Premium",
|
||||
"restorePurchasesTitle": "Ripristina Acquisti",
|
||||
"restorePurchasesSubtitle": "Hai già acquistato su un altro dispositivo o reinstallato?",
|
||||
"restorePurchasesSuccess": "Acquisti ripristinati con successo!",
|
||||
"restorePurchasesEmpty": "Nessun acquisto attivo trovato da ripristinare.",
|
||||
"sectionPcConnection": "CONNESSIONE PC & NEGOZIO",
|
||||
"workstationStatusTitle": "Stato Postazione",
|
||||
"connectedToName": "Connesso a {name}",
|
||||
"notConnectedWithIp": "Non connesso ({ip})",
|
||||
"noPcConfigured": "Nessun PC configurato",
|
||||
"favoriteWorkstationsTitle": "Postazioni PC Preferite",
|
||||
"registeredComputersCount": "{count, plural, =1{1 computer registrato nel negozio} other{{count} computer registrati nel negozio}}",
|
||||
"noComputersSaved": "Nessun computer salvato",
|
||||
"autoConnectFullTitle": "Autocollegamento all'avvio/risveglio",
|
||||
"autoConnectFullSubtitle": "Disattivato: chiede sempre a quale PC connettersi (evita di sparare codici sul PC del collega)",
|
||||
"inactivityDisconnectTitle": "Disconnessione per inattività",
|
||||
"inactivityDisconnectActive": "Interrompe la connessione dopo {minutes} minuti senza scansioni",
|
||||
"inactivityDisconnectOff": "Disattivata (rimane sempre connesso)",
|
||||
"inactivity5Min": "5 min (Consigliato)",
|
||||
"inactivity10Min": "10 min",
|
||||
"inactivity15Min": "15 min",
|
||||
"disabledOption": "Disattivata",
|
||||
"sendTypingTestTitle": "Invia Test di Digitazione",
|
||||
"sendTypingTestSubtitle": "Digita \"TEST-CATELLI-123\" sul PC attivo",
|
||||
"typingTestSentSnackbar": "Test di digitazione inviato al PC!",
|
||||
"sectionKeyboardEmulation": "EMULAZIONE TASTIERA PC",
|
||||
"suffixEnterTitle": "Tasto Invio (Enter)",
|
||||
"suffixEnterSubtitle": "Preme Invio dopo ogni codice (consigliato per Excel, ERP, gestionali)",
|
||||
"suffixTabTitle": "Tasto Tabulatore (Tab)",
|
||||
"suffixTabSubtitle": "Sposta il cursore al campo/cella successiva",
|
||||
"suffixNoneTitle": "Nessun tasto finale",
|
||||
"suffixNoneSubtitle": "Scrive solo la stringa pura del codice a barre",
|
||||
"sectionScanFeedback": "SCANSIONE E FEEDBACK",
|
||||
"aimModeTitle": "Modalità di mira",
|
||||
"aimModeSubtitle": "Standard, Precisione (mirino + zoom) o AR Multi-Codice",
|
||||
"postScanPauseTitle": "Pausa dopo scansione",
|
||||
"postScanPauseSubtitle": "Attesa di {seconds}s prima della prossima lettura",
|
||||
"cooldown1s": "1,0 sec (Rapida)",
|
||||
"cooldown2s": "2,0 sec",
|
||||
"cooldown25s": "2,5 sec (Consigliata)",
|
||||
"cooldown3s": "3,0 sec",
|
||||
"cooldown4s": "4,0 sec",
|
||||
"cooldown5s": "5,0 sec",
|
||||
"continuousScanTitle": "Scansione Continua",
|
||||
"continuousScanSubtitle": "Riduce la pausa a 1,0s quando inquadri codici diversi in serie",
|
||||
"vibrationTitle": "Vibrazione alla lettura",
|
||||
"vibrationSubtitle": "Feedback aptico alla decodifica del codice",
|
||||
"soundTitle": "Suono di conferma",
|
||||
"soundSubtitle": "Segnale acustico alla lettura del barcode",
|
||||
"sectionLanguage": "LINGUA",
|
||||
"languageTitle": "Lingua App",
|
||||
"languageSystem": "Predefinita di sistema",
|
||||
"languageItalian": "Italiano",
|
||||
"languageEnglish": "English",
|
||||
"sectionInfo": "INFORMAZIONI",
|
||||
"organizationTitle": "Organizzazione",
|
||||
"appVersionTitle": "Versione App",
|
||||
"paywallTitle": "Barcode Reader Premium",
|
||||
"paywallSubtitle": "Sblocca scansioni illimitate verso il PC senza alcuna interruzione.",
|
||||
"paywallBenefitUnlimited": "Scansioni barcode e QR illimitate per sempre",
|
||||
"paywallBenefitNoAds": "Zero pubblicità e nessun timer di attesa",
|
||||
"paywallBenefitAllModes": "Modalità Standard, Precisione e AR Multi-Codice",
|
||||
"paywallBenefitMultiPc": "Postazioni multi-PC preferite e sincronizzazione Wi-Fi",
|
||||
"paywallPlanYearly": "Annuale",
|
||||
"paywallPlanMonthly": "Mensile",
|
||||
"paywallPlanLifetime": "A Vita (Lifetime)",
|
||||
"paywallPerYear": "/ anno",
|
||||
"paywallPerMonth": "/ mese",
|
||||
"paywallOneTime": "Acquisto una tantum",
|
||||
"paywallBestValue": "PIÙ CONVENIENTE",
|
||||
"paywallSavePercent": "RISPARMIA {percent}%",
|
||||
"paywallOneTimeBadge": "PAGHI UNA VOLTA",
|
||||
"paywallContinueButton": "Continua",
|
||||
"paywallContinueWithPrice": "Continua — {price}",
|
||||
"paywallLoadingPlans": "Caricamento piani disponibili...",
|
||||
"paywallUnavailableTitle": "Piani momentaneamente non disponibili",
|
||||
"paywallUnavailableSubtitle": "Verifica la connessione internet o la disponibilità di Google Play e riprova.",
|
||||
"paywallRetryButton": "Riprova",
|
||||
"paywallPurchaseError": "Impossibile completare l'acquisto. Riprova tra poco.",
|
||||
"paywallLegalNote": "Gli abbonamenti si rinnovano automaticamente salvo disdetta almeno 24 ore prima della scadenza nelle impostazioni di Google Play.",
|
||||
"premiumManageTitle": "Premium Attivo",
|
||||
"premiumManageBody": "Il tuo piano Premium Illimitato è attivo su questo account.\n\nPer gestire o disdire un abbonamento, apri Google Play Store → Pagamenti e abbonamenti → Abbonamenti.",
|
||||
"closeButton": "Chiudi"
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,705 @@
|
||||
// ignore: unused_import
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
|
||||
import 'app_localizations.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
/// The translations for English (`en`).
|
||||
class AppLocalizationsEn extends AppLocalizations {
|
||||
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
||||
|
||||
@override
|
||||
String get appTitle => 'Catelli Barcode Reader';
|
||||
|
||||
@override
|
||||
String get cancel => 'Cancel';
|
||||
|
||||
@override
|
||||
String get remove => 'Remove';
|
||||
|
||||
@override
|
||||
String get connect => 'Connect';
|
||||
|
||||
@override
|
||||
String get reconnect => 'Reconnect';
|
||||
|
||||
@override
|
||||
String get active => 'Active';
|
||||
|
||||
@override
|
||||
String get activeUppercase => 'ACTIVE';
|
||||
|
||||
@override
|
||||
String get connected => 'Connected';
|
||||
|
||||
@override
|
||||
String get connecting => 'Connecting...';
|
||||
|
||||
@override
|
||||
String get notConnected => 'Not connected';
|
||||
|
||||
@override
|
||||
String get pinOrNetworkError => 'PIN/Network error';
|
||||
|
||||
@override
|
||||
String get defaultStorePcName => 'Store PC';
|
||||
|
||||
@override
|
||||
String get defaultPcServerName => 'PC Server';
|
||||
|
||||
@override
|
||||
String get enterValidIp => 'Enter a valid PC IP address';
|
||||
|
||||
@override
|
||||
String connectingToHost(String ip, int port) {
|
||||
return 'Connecting to $ip:$port...';
|
||||
}
|
||||
|
||||
@override
|
||||
String connectingToName(String name) {
|
||||
return 'Connecting to $name...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get pcConnectionsTitle => 'PC Workstations Connection';
|
||||
|
||||
@override
|
||||
String get scanPcQrCode => 'Scan QR Code on PC';
|
||||
|
||||
@override
|
||||
String get savedStoreWorkstations => 'Saved Store Workstations';
|
||||
|
||||
@override
|
||||
String favoritesCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count favorites',
|
||||
one: '1 favorite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get detectedWifiPcs => 'PCs Detected on Wi-Fi';
|
||||
|
||||
@override
|
||||
String get refreshDiscoveryTooltip => 'Refresh scan';
|
||||
|
||||
@override
|
||||
String get searchingPcServers => 'Searching for PC servers on the network...';
|
||||
|
||||
@override
|
||||
String get noPcServersFound =>
|
||||
'No PC server detected automatically on the network.\nMake sure the PC companion app is running and connected to the same Wi-Fi.';
|
||||
|
||||
@override
|
||||
String get requiresPin => 'Requires PIN';
|
||||
|
||||
@override
|
||||
String get withPin => 'With PIN';
|
||||
|
||||
@override
|
||||
String get manualSetup => 'Manual Configuration';
|
||||
|
||||
@override
|
||||
String get workstationNameLabel => 'Workstation / PC Name (optional)';
|
||||
|
||||
@override
|
||||
String get workstationNameHint => 'e.g. Register 1, Warehouse, Office';
|
||||
|
||||
@override
|
||||
String get pcIpLabel => 'PC IP Address';
|
||||
|
||||
@override
|
||||
String get pcIpHint => 'e.g. 192.168.1.100';
|
||||
|
||||
@override
|
||||
String get portLabel => 'Port';
|
||||
|
||||
@override
|
||||
String get pinOptionalLabel => 'PIN (if set)';
|
||||
|
||||
@override
|
||||
String get pinHint => 'PIN code';
|
||||
|
||||
@override
|
||||
String get saveAndConnectManually => 'Save and Connect Manually';
|
||||
|
||||
@override
|
||||
String get disconnectFromPc => 'Disconnect from PC';
|
||||
|
||||
@override
|
||||
String get disconnectedByInactivity => 'Disconnected due to inactivity';
|
||||
|
||||
@override
|
||||
String get disconnectedManually => 'Manually disconnected';
|
||||
|
||||
@override
|
||||
String get qrModalTitle => 'Scan Server QR Code';
|
||||
|
||||
@override
|
||||
String get qrModalSubtitle =>
|
||||
'Point the camera at the QR code shown in the PC companion app.';
|
||||
|
||||
@override
|
||||
String get removeWorkstationTitle => 'Remove workstation?';
|
||||
|
||||
@override
|
||||
String removeWorkstationMessage(String name, String ip) {
|
||||
return 'Do you want to remove \"$name\" ($ip) from favorite PCs?';
|
||||
}
|
||||
|
||||
@override
|
||||
String get selectPcWorkstation => 'Select PC Workstation';
|
||||
|
||||
@override
|
||||
String get selectPcSubtitle =>
|
||||
'Choose the computer where codes will be typed';
|
||||
|
||||
@override
|
||||
String get inactivityAlert =>
|
||||
'Disconnected due to inactivity. Select a workstation before scanning.';
|
||||
|
||||
@override
|
||||
String get noFavoritePcs => 'No favorite PC saved';
|
||||
|
||||
@override
|
||||
String get noFavoritePcsHint =>
|
||||
'Add your store computers to connect with 1 tap and avoid typing on a colleague\'s PC.';
|
||||
|
||||
@override
|
||||
String get removeFavoriteTooltip => 'Remove from favorites';
|
||||
|
||||
@override
|
||||
String get addNewPcButton => 'Add New PC (Wi-Fi or QR Code)';
|
||||
|
||||
@override
|
||||
String get autoConnectOnStartup => 'Auto-connect on startup';
|
||||
|
||||
@override
|
||||
String get autoConnectSubtitleShort =>
|
||||
'Disabled: asks to pick a PC (recommended in multi-PC stores)';
|
||||
|
||||
@override
|
||||
String get unlimitedScansTitle => 'Unlimited Scans';
|
||||
|
||||
@override
|
||||
String get unlimitedScansDescription =>
|
||||
'Watch a short video to unlock 15 minutes of uninterrupted unlimited PC scanning.';
|
||||
|
||||
@override
|
||||
String get unlocked15MinSnackbar => '15 minutes of unlimited scans unlocked!';
|
||||
|
||||
@override
|
||||
String get loadingVideoRetrySnackbar =>
|
||||
'Loading video... Please try again in a moment.';
|
||||
|
||||
@override
|
||||
String get loadingVideoButton => 'Loading video...';
|
||||
|
||||
@override
|
||||
String get watchVideoButton => 'Watch Video (+15 min)';
|
||||
|
||||
@override
|
||||
String get welcomePremiumSnackbar => 'Welcome to Unlimited Premium!';
|
||||
|
||||
@override
|
||||
String get upgradeToPremiumButton => 'Upgrade to Unlimited Premium';
|
||||
|
||||
@override
|
||||
String get laterButton => 'Later';
|
||||
|
||||
@override
|
||||
String sentToPcSnackbar(String code) {
|
||||
return 'Sent to PC: $code';
|
||||
}
|
||||
|
||||
@override
|
||||
String get savedToHistoryOfflineSnackbar =>
|
||||
'Code saved to history (PC not connected)';
|
||||
|
||||
@override
|
||||
String get torchTooltip => 'Flashlight';
|
||||
|
||||
@override
|
||||
String get switchCameraTooltip => 'Switch Camera';
|
||||
|
||||
@override
|
||||
String get historyTooltip => 'History';
|
||||
|
||||
@override
|
||||
String get settingsTooltip => 'Settings';
|
||||
|
||||
@override
|
||||
String get premiumBadge => 'Premium';
|
||||
|
||||
@override
|
||||
String unlimitedSessionLabel(String time) {
|
||||
return '$time Unlimited';
|
||||
}
|
||||
|
||||
@override
|
||||
String freeScansShort(int count) {
|
||||
return '$count free';
|
||||
}
|
||||
|
||||
@override
|
||||
String get unlock15Min => 'Unlock 15 min';
|
||||
|
||||
@override
|
||||
String get aimModeStandard => 'Standard';
|
||||
|
||||
@override
|
||||
String get aimModePrecision => 'Precision';
|
||||
|
||||
@override
|
||||
String get aimModeArMulti => 'AR Multi';
|
||||
|
||||
@override
|
||||
String get waitingForCodesCancel => 'Waiting for codes… Tap to cancel';
|
||||
|
||||
@override
|
||||
String freezeFrameCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Freeze frame ($count codes)',
|
||||
one: 'Freeze frame (1 code)',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get freezeAndPick => 'Freeze & pick';
|
||||
|
||||
@override
|
||||
String get manualButton => 'Manual';
|
||||
|
||||
@override
|
||||
String get manualFormat => 'Manual';
|
||||
|
||||
@override
|
||||
String get manualInputTitle => 'Manual Entry';
|
||||
|
||||
@override
|
||||
String get manualInputSubtitle =>
|
||||
'Type or paste the code to send directly to the PC:';
|
||||
|
||||
@override
|
||||
String get manualInputHint => 'e.g. 8001234567890 or ART-99';
|
||||
|
||||
@override
|
||||
String get pasteFromClipboardTooltip => 'Paste from clipboard';
|
||||
|
||||
@override
|
||||
String get sendToPcButton => 'Send to PC';
|
||||
|
||||
@override
|
||||
String get precisionHelperText => 'Center crosshair on code • Tap to focus';
|
||||
|
||||
@override
|
||||
String get standardHelperText => 'Frame barcode or QR • Pinch to zoom';
|
||||
|
||||
@override
|
||||
String cooldownSent(String seconds) {
|
||||
return 'Sent • Pause ${seconds}s';
|
||||
}
|
||||
|
||||
@override
|
||||
String cooldownNotSent(String seconds) {
|
||||
return 'Not sent • Pause ${seconds}s';
|
||||
}
|
||||
|
||||
@override
|
||||
String get notSent => 'Not sent';
|
||||
|
||||
@override
|
||||
String get copyTooltip => 'Copy';
|
||||
|
||||
@override
|
||||
String get codeCopiedSnackbar => 'Code copied to clipboard';
|
||||
|
||||
@override
|
||||
String get resendToPcTooltip => 'Send to PC again';
|
||||
|
||||
@override
|
||||
String frozenFrameCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Frozen frame • $count codes',
|
||||
one: 'Frozen frame • 1 code',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get resumeButton => 'Resume';
|
||||
|
||||
@override
|
||||
String get tapCodeToSend => 'Tap a code to send it to the PC';
|
||||
|
||||
@override
|
||||
String get newScanButton => 'New scan';
|
||||
|
||||
@override
|
||||
String get sentLabel => 'Sent';
|
||||
|
||||
@override
|
||||
String get sendLabel => 'Send';
|
||||
|
||||
@override
|
||||
String get clearHistoryTitle => 'Clear History?';
|
||||
|
||||
@override
|
||||
String get clearHistoryMessage =>
|
||||
'All codes saved in history on this device will be removed.';
|
||||
|
||||
@override
|
||||
String get clearAllButton => 'Clear All';
|
||||
|
||||
@override
|
||||
String get scanHistoryTitle => 'Scan History';
|
||||
|
||||
@override
|
||||
String get clearHistoryTooltip => 'Clear history';
|
||||
|
||||
@override
|
||||
String get searchCodesHint => 'Search codes...';
|
||||
|
||||
@override
|
||||
String get noScansInHistory => 'No scans in history';
|
||||
|
||||
@override
|
||||
String noResultsForQuery(String query) {
|
||||
return 'No results for \"$query\"';
|
||||
}
|
||||
|
||||
@override
|
||||
String get copyCodeTooltip => 'Copy code';
|
||||
|
||||
@override
|
||||
String get copiedToClipboardSnackbar => 'Copied to clipboard';
|
||||
|
||||
@override
|
||||
String resentCodeSnackbar(String code) {
|
||||
return 'Sent \"$code\" to PC';
|
||||
}
|
||||
|
||||
@override
|
||||
String get settingsTitle => 'Settings';
|
||||
|
||||
@override
|
||||
String get sectionPlanSubscription => 'PLAN & SUBSCRIPTION';
|
||||
|
||||
@override
|
||||
String get premiumPlanActive => 'Premium Plan Active';
|
||||
|
||||
@override
|
||||
String get freeBaseVersion => 'Free Basic Version';
|
||||
|
||||
@override
|
||||
String get unlimitedAndAdFree => 'Unlimited scans and zero ads';
|
||||
|
||||
@override
|
||||
String activeSessionLabel(String time) {
|
||||
return 'Active session: $time';
|
||||
}
|
||||
|
||||
@override
|
||||
String freeScansRemaining(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count free scans remaining',
|
||||
one: '1 free scan remaining',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get manageButton => 'Manage';
|
||||
|
||||
@override
|
||||
String get upgradePremiumShort => 'Go Premium';
|
||||
|
||||
@override
|
||||
String get restorePurchasesTitle => 'Restore Purchases';
|
||||
|
||||
@override
|
||||
String get restorePurchasesSubtitle =>
|
||||
'Already purchased on another device or reinstalled?';
|
||||
|
||||
@override
|
||||
String get restorePurchasesSuccess => 'Purchases restored successfully!';
|
||||
|
||||
@override
|
||||
String get restorePurchasesEmpty => 'No active purchases found to restore.';
|
||||
|
||||
@override
|
||||
String get sectionPcConnection => 'PC & STORE CONNECTION';
|
||||
|
||||
@override
|
||||
String get workstationStatusTitle => 'Workstation Status';
|
||||
|
||||
@override
|
||||
String connectedToName(String name) {
|
||||
return 'Connected to $name';
|
||||
}
|
||||
|
||||
@override
|
||||
String notConnectedWithIp(String ip) {
|
||||
return 'Not connected ($ip)';
|
||||
}
|
||||
|
||||
@override
|
||||
String get noPcConfigured => 'No PC configured';
|
||||
|
||||
@override
|
||||
String get favoriteWorkstationsTitle => 'Favorite PC Workstations';
|
||||
|
||||
@override
|
||||
String registeredComputersCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count computers saved',
|
||||
one: '1 computer saved',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get noComputersSaved => 'No computers saved';
|
||||
|
||||
@override
|
||||
String get autoConnectFullTitle => 'Auto-connect on startup/resume';
|
||||
|
||||
@override
|
||||
String get autoConnectFullSubtitle =>
|
||||
'Disabled: always asks which PC to connect to (prevents typing on a colleague\'s PC)';
|
||||
|
||||
@override
|
||||
String get inactivityDisconnectTitle => 'Inactivity disconnect';
|
||||
|
||||
@override
|
||||
String inactivityDisconnectActive(int minutes) {
|
||||
return 'Disconnects after $minutes minutes without scans';
|
||||
}
|
||||
|
||||
@override
|
||||
String get inactivityDisconnectOff => 'Disabled (stays connected)';
|
||||
|
||||
@override
|
||||
String get inactivity5Min => '5 min (Recommended)';
|
||||
|
||||
@override
|
||||
String get inactivity10Min => '10 min';
|
||||
|
||||
@override
|
||||
String get inactivity15Min => '15 min';
|
||||
|
||||
@override
|
||||
String get disabledOption => 'Disabled';
|
||||
|
||||
@override
|
||||
String get sendTypingTestTitle => 'Send Typing Test';
|
||||
|
||||
@override
|
||||
String get sendTypingTestSubtitle =>
|
||||
'Types \"TEST-CATELLI-123\" on the active PC';
|
||||
|
||||
@override
|
||||
String get typingTestSentSnackbar => 'Typing test sent to PC!';
|
||||
|
||||
@override
|
||||
String get sectionKeyboardEmulation => 'PC KEYBOARD EMULATION';
|
||||
|
||||
@override
|
||||
String get suffixEnterTitle => 'Enter Key';
|
||||
|
||||
@override
|
||||
String get suffixEnterSubtitle =>
|
||||
'Presses Enter after each code (recommended for Excel, ERP, POS)';
|
||||
|
||||
@override
|
||||
String get suffixTabTitle => 'Tab Key';
|
||||
|
||||
@override
|
||||
String get suffixTabSubtitle => 'Moves cursor to the next field/cell';
|
||||
|
||||
@override
|
||||
String get suffixNoneTitle => 'No trailing key';
|
||||
|
||||
@override
|
||||
String get suffixNoneSubtitle => 'Types only the raw barcode string';
|
||||
|
||||
@override
|
||||
String get sectionScanFeedback => 'SCANNING & FEEDBACK';
|
||||
|
||||
@override
|
||||
String get aimModeTitle => 'Aiming mode';
|
||||
|
||||
@override
|
||||
String get aimModeSubtitle =>
|
||||
'Standard, Precision (crosshair + zoom), or AR Multi-Code';
|
||||
|
||||
@override
|
||||
String get postScanPauseTitle => 'Post-scan pause';
|
||||
|
||||
@override
|
||||
String postScanPauseSubtitle(String seconds) {
|
||||
return 'Wait ${seconds}s before the next reading';
|
||||
}
|
||||
|
||||
@override
|
||||
String get cooldown1s => '1.0 sec (Fast)';
|
||||
|
||||
@override
|
||||
String get cooldown2s => '2.0 sec';
|
||||
|
||||
@override
|
||||
String get cooldown25s => '2.5 sec (Recommended)';
|
||||
|
||||
@override
|
||||
String get cooldown3s => '3.0 sec';
|
||||
|
||||
@override
|
||||
String get cooldown4s => '4.0 sec';
|
||||
|
||||
@override
|
||||
String get cooldown5s => '5.0 sec';
|
||||
|
||||
@override
|
||||
String get continuousScanTitle => 'Continuous Scanning';
|
||||
|
||||
@override
|
||||
String get continuousScanSubtitle =>
|
||||
'Reduces pause to 1.0s when scanning different codes in a row';
|
||||
|
||||
@override
|
||||
String get vibrationTitle => 'Vibrate on scan';
|
||||
|
||||
@override
|
||||
String get vibrationSubtitle => 'Haptic feedback when a code is decoded';
|
||||
|
||||
@override
|
||||
String get soundTitle => 'Confirmation sound';
|
||||
|
||||
@override
|
||||
String get soundSubtitle => 'Audio beep when a barcode is read';
|
||||
|
||||
@override
|
||||
String get sectionLanguage => 'LANGUAGE';
|
||||
|
||||
@override
|
||||
String get languageTitle => 'App Language';
|
||||
|
||||
@override
|
||||
String get languageSystem => 'System default';
|
||||
|
||||
@override
|
||||
String get languageItalian => 'Italiano';
|
||||
|
||||
@override
|
||||
String get languageEnglish => 'English';
|
||||
|
||||
@override
|
||||
String get sectionInfo => 'ABOUT';
|
||||
|
||||
@override
|
||||
String get organizationTitle => 'Organization';
|
||||
|
||||
@override
|
||||
String get appVersionTitle => 'App Version';
|
||||
|
||||
@override
|
||||
String get paywallTitle => 'Barcode Reader Premium';
|
||||
|
||||
@override
|
||||
String get paywallSubtitle =>
|
||||
'Unlock unlimited PC scanning with zero interruptions.';
|
||||
|
||||
@override
|
||||
String get paywallBenefitUnlimited => 'Unlimited barcode & QR scans forever';
|
||||
|
||||
@override
|
||||
String get paywallBenefitNoAds => 'Zero ads, no waiting timers';
|
||||
|
||||
@override
|
||||
String get paywallBenefitAllModes =>
|
||||
'Standard, Precision & AR Multi-Scan modes';
|
||||
|
||||
@override
|
||||
String get paywallBenefitMultiPc => 'Multi-PC favorites & instant Wi-Fi sync';
|
||||
|
||||
@override
|
||||
String get paywallPlanYearly => 'Yearly';
|
||||
|
||||
@override
|
||||
String get paywallPlanMonthly => 'Monthly';
|
||||
|
||||
@override
|
||||
String get paywallPlanLifetime => 'Lifetime';
|
||||
|
||||
@override
|
||||
String get paywallPerYear => '/ year';
|
||||
|
||||
@override
|
||||
String get paywallPerMonth => '/ month';
|
||||
|
||||
@override
|
||||
String get paywallOneTime => 'One-time purchase';
|
||||
|
||||
@override
|
||||
String get paywallBestValue => 'BEST VALUE';
|
||||
|
||||
@override
|
||||
String paywallSavePercent(int percent) {
|
||||
return 'SAVE $percent%';
|
||||
}
|
||||
|
||||
@override
|
||||
String get paywallOneTimeBadge => 'PAY ONCE';
|
||||
|
||||
@override
|
||||
String get paywallContinueButton => 'Continue';
|
||||
|
||||
@override
|
||||
String paywallContinueWithPrice(String price) {
|
||||
return 'Continue — $price';
|
||||
}
|
||||
|
||||
@override
|
||||
String get paywallLoadingPlans => 'Loading available plans...';
|
||||
|
||||
@override
|
||||
String get paywallUnavailableTitle => 'Plans temporarily unavailable';
|
||||
|
||||
@override
|
||||
String get paywallUnavailableSubtitle =>
|
||||
'Check your internet connection or Google Play availability and try again.';
|
||||
|
||||
@override
|
||||
String get paywallRetryButton => 'Retry';
|
||||
|
||||
@override
|
||||
String get paywallPurchaseError =>
|
||||
'Purchase could not be completed. Please try again.';
|
||||
|
||||
@override
|
||||
String get paywallLegalNote =>
|
||||
'Subscriptions auto-renew unless cancelled at least 24 hours before the end of the period in Google Play settings.';
|
||||
|
||||
@override
|
||||
String get premiumManageTitle => 'Premium Active';
|
||||
|
||||
@override
|
||||
String get premiumManageBody =>
|
||||
'Your Unlimited Premium plan is active on this account.\n\nTo manage or cancel a subscription, open Google Play Store → Payments & subscriptions → Subscriptions.';
|
||||
|
||||
@override
|
||||
String get closeButton => 'Close';
|
||||
}
|
||||
@@ -0,0 +1,713 @@
|
||||
// ignore: unused_import
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
|
||||
import 'app_localizations.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
/// The translations for Italian (`it`).
|
||||
class AppLocalizationsIt extends AppLocalizations {
|
||||
AppLocalizationsIt([String locale = 'it']) : super(locale);
|
||||
|
||||
@override
|
||||
String get appTitle => 'Catelli Barcode Reader';
|
||||
|
||||
@override
|
||||
String get cancel => 'Annulla';
|
||||
|
||||
@override
|
||||
String get remove => 'Rimuovi';
|
||||
|
||||
@override
|
||||
String get connect => 'Connetti';
|
||||
|
||||
@override
|
||||
String get reconnect => 'Riconnetti';
|
||||
|
||||
@override
|
||||
String get active => 'Attivo';
|
||||
|
||||
@override
|
||||
String get activeUppercase => 'ATTIVO';
|
||||
|
||||
@override
|
||||
String get connected => 'Connesso';
|
||||
|
||||
@override
|
||||
String get connecting => 'Connessione...';
|
||||
|
||||
@override
|
||||
String get notConnected => 'Non connesso';
|
||||
|
||||
@override
|
||||
String get pinOrNetworkError => 'Errore PIN/Rete';
|
||||
|
||||
@override
|
||||
String get defaultStorePcName => 'PC Negozio';
|
||||
|
||||
@override
|
||||
String get defaultPcServerName => 'PC Server';
|
||||
|
||||
@override
|
||||
String get enterValidIp => 'Inserisci un indirizzo IP valido del PC';
|
||||
|
||||
@override
|
||||
String connectingToHost(String ip, int port) {
|
||||
return 'Connessione a $ip:$port in corso...';
|
||||
}
|
||||
|
||||
@override
|
||||
String connectingToName(String name) {
|
||||
return 'Connessione a $name...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get pcConnectionsTitle => 'Connessione Postazioni PC';
|
||||
|
||||
@override
|
||||
String get scanPcQrCode => 'Inquadra QR Code sul PC';
|
||||
|
||||
@override
|
||||
String get savedStoreWorkstations => 'Postazioni Salvate nel Negozio';
|
||||
|
||||
@override
|
||||
String favoritesCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count preferiti',
|
||||
one: '1 preferito',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get detectedWifiPcs => 'PC Rilevati in Wi-Fi';
|
||||
|
||||
@override
|
||||
String get refreshDiscoveryTooltip => 'Aggiorna ricerca';
|
||||
|
||||
@override
|
||||
String get searchingPcServers => 'Ricerca server PC in corso sulla rete...';
|
||||
|
||||
@override
|
||||
String get noPcServersFound =>
|
||||
'Nessun server PC rilevato automaticamente sulla rete.\nAssicurati che il programma sul PC sia avviato e connesso allo stesso Wi-Fi.';
|
||||
|
||||
@override
|
||||
String get requiresPin => 'Richiede PIN';
|
||||
|
||||
@override
|
||||
String get withPin => 'Con PIN';
|
||||
|
||||
@override
|
||||
String get manualSetup => 'Configurazione Manuale';
|
||||
|
||||
@override
|
||||
String get workstationNameLabel => 'Nome Postazione / PC (opzionale)';
|
||||
|
||||
@override
|
||||
String get workstationNameHint => 'Es. Cassa 1, Magazzino, Ufficio';
|
||||
|
||||
@override
|
||||
String get pcIpLabel => 'Indirizzo IP del PC';
|
||||
|
||||
@override
|
||||
String get pcIpHint => 'Es. 192.168.1.100';
|
||||
|
||||
@override
|
||||
String get portLabel => 'Porta';
|
||||
|
||||
@override
|
||||
String get pinOptionalLabel => 'PIN (se impostato)';
|
||||
|
||||
@override
|
||||
String get pinHint => 'Codice PIN';
|
||||
|
||||
@override
|
||||
String get saveAndConnectManually => 'Salva e Connetti Manualmente';
|
||||
|
||||
@override
|
||||
String get disconnectFromPc => 'Disconnetti dal PC';
|
||||
|
||||
@override
|
||||
String get disconnectedByInactivity => 'Disconnesso per inattività';
|
||||
|
||||
@override
|
||||
String get disconnectedManually => 'Disconnesso manualmente';
|
||||
|
||||
@override
|
||||
String get qrModalTitle => 'Inquadra QR Code del Server';
|
||||
|
||||
@override
|
||||
String get qrModalSubtitle =>
|
||||
'Inquadra il codice QR mostrato nell\'app companion sul PC.';
|
||||
|
||||
@override
|
||||
String get removeWorkstationTitle => 'Rimuovere postazione?';
|
||||
|
||||
@override
|
||||
String removeWorkstationMessage(String name, String ip) {
|
||||
return 'Vuoi eliminare \"$name\" ($ip) dai PC preferiti?';
|
||||
}
|
||||
|
||||
@override
|
||||
String get selectPcWorkstation => 'Seleziona Postazione PC';
|
||||
|
||||
@override
|
||||
String get selectPcSubtitle =>
|
||||
'Scegli il computer del negozio su cui scrivere';
|
||||
|
||||
@override
|
||||
String get inactivityAlert =>
|
||||
'Disconnesso per inattività. Seleziona la postazione prima di scansionare.';
|
||||
|
||||
@override
|
||||
String get noFavoritePcs => 'Nessun PC preferito salvato';
|
||||
|
||||
@override
|
||||
String get noFavoritePcsHint =>
|
||||
'Aggiungi i computer del negozio per collegarti con 1 tocco ed evitare errori tra colleghi.';
|
||||
|
||||
@override
|
||||
String get removeFavoriteTooltip => 'Rimuovi dai preferiti';
|
||||
|
||||
@override
|
||||
String get addNewPcButton => 'Aggiungi Nuovo PC (Wi-Fi o QR Code)';
|
||||
|
||||
@override
|
||||
String get autoConnectOnStartup => 'Collega automaticamente all\'avvio';
|
||||
|
||||
@override
|
||||
String get autoConnectSubtitleShort =>
|
||||
'Disattivato: richiede la selezione del PC (consigliato in negozio)';
|
||||
|
||||
@override
|
||||
String get unlimitedScansTitle => 'Scansioni Illimitate';
|
||||
|
||||
@override
|
||||
String get unlimitedScansDescription =>
|
||||
'Guarda un breve video per sbloccare 15 minuti di scansioni illimitate al PC senza interruzioni.';
|
||||
|
||||
@override
|
||||
String get unlocked15MinSnackbar =>
|
||||
'15 minuti di scansioni illimitate sbloccati!';
|
||||
|
||||
@override
|
||||
String get loadingVideoRetrySnackbar =>
|
||||
'Caricamento video in corso... Riprova tra pochi istanti.';
|
||||
|
||||
@override
|
||||
String get loadingVideoButton => 'Caricamento video...';
|
||||
|
||||
@override
|
||||
String get watchVideoButton => 'Guarda Video (+15 min)';
|
||||
|
||||
@override
|
||||
String get welcomePremiumSnackbar => 'Benvenuto in Premium Illimitato!';
|
||||
|
||||
@override
|
||||
String get upgradeToPremiumButton => 'Passa a Premium Illimitato';
|
||||
|
||||
@override
|
||||
String get laterButton => 'Più tardi';
|
||||
|
||||
@override
|
||||
String sentToPcSnackbar(String code) {
|
||||
return 'Inviato al PC: $code';
|
||||
}
|
||||
|
||||
@override
|
||||
String get savedToHistoryOfflineSnackbar =>
|
||||
'Codice salvato in cronologia (PC non connesso)';
|
||||
|
||||
@override
|
||||
String get torchTooltip => 'Torcia';
|
||||
|
||||
@override
|
||||
String get switchCameraTooltip => 'Inverti Fotocamera';
|
||||
|
||||
@override
|
||||
String get historyTooltip => 'Cronologia';
|
||||
|
||||
@override
|
||||
String get settingsTooltip => 'Impostazioni';
|
||||
|
||||
@override
|
||||
String get premiumBadge => 'Premium';
|
||||
|
||||
@override
|
||||
String unlimitedSessionLabel(String time) {
|
||||
return '$time Illimitati';
|
||||
}
|
||||
|
||||
@override
|
||||
String freeScansShort(int count) {
|
||||
return '$count libere';
|
||||
}
|
||||
|
||||
@override
|
||||
String get unlock15Min => 'Sblocca 15 min';
|
||||
|
||||
@override
|
||||
String get aimModeStandard => 'Standard';
|
||||
|
||||
@override
|
||||
String get aimModePrecision => 'Precisione';
|
||||
|
||||
@override
|
||||
String get aimModeArMulti => 'AR Multi';
|
||||
|
||||
@override
|
||||
String get waitingForCodesCancel =>
|
||||
'In attesa dei codici… Tocca per annullare';
|
||||
|
||||
@override
|
||||
String freezeFrameCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Blocca frame ($count codici)',
|
||||
one: 'Blocca frame (1 codice)',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get freezeAndPick => 'Blocca e scegli';
|
||||
|
||||
@override
|
||||
String get manualButton => 'Manuale';
|
||||
|
||||
@override
|
||||
String get manualFormat => 'Manuale';
|
||||
|
||||
@override
|
||||
String get manualInputTitle => 'Digitazione Manuale';
|
||||
|
||||
@override
|
||||
String get manualInputSubtitle =>
|
||||
'Digita o incolla il codice da digitare in tempo reale sul PC:';
|
||||
|
||||
@override
|
||||
String get manualInputHint => 'Es. 8001234567890 o ART-99';
|
||||
|
||||
@override
|
||||
String get pasteFromClipboardTooltip => 'Incolla dagli appunti';
|
||||
|
||||
@override
|
||||
String get sendToPcButton => 'Invia al PC';
|
||||
|
||||
@override
|
||||
String get precisionHelperText =>
|
||||
'Centra il mirino sul codice • Tocca per mettere a fuoco';
|
||||
|
||||
@override
|
||||
String get standardHelperText =>
|
||||
'Inquadra codice a barre o QR • Pizzica per zoomare';
|
||||
|
||||
@override
|
||||
String cooldownSent(String seconds) {
|
||||
return 'Inviato • Pausa ${seconds}s';
|
||||
}
|
||||
|
||||
@override
|
||||
String cooldownNotSent(String seconds) {
|
||||
return 'Non inviato • Pausa ${seconds}s';
|
||||
}
|
||||
|
||||
@override
|
||||
String get notSent => 'Non inviato';
|
||||
|
||||
@override
|
||||
String get copyTooltip => 'Copia';
|
||||
|
||||
@override
|
||||
String get codeCopiedSnackbar => 'Codice copiato negli appunti';
|
||||
|
||||
@override
|
||||
String get resendToPcTooltip => 'Invia di nuovo al PC';
|
||||
|
||||
@override
|
||||
String frozenFrameCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Frame bloccato • $count codici',
|
||||
one: 'Frame bloccato • 1 codice',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get resumeButton => 'Riprendi';
|
||||
|
||||
@override
|
||||
String get tapCodeToSend => 'Tocca un codice per inviarlo al PC';
|
||||
|
||||
@override
|
||||
String get newScanButton => 'Nuova scansione';
|
||||
|
||||
@override
|
||||
String get sentLabel => 'Inviato';
|
||||
|
||||
@override
|
||||
String get sendLabel => 'Invia';
|
||||
|
||||
@override
|
||||
String get clearHistoryTitle => 'Cancellare Cronologia?';
|
||||
|
||||
@override
|
||||
String get clearHistoryMessage =>
|
||||
'Tutti i codici salvati nella cronologia su questo dispositivo verranno rimossi.';
|
||||
|
||||
@override
|
||||
String get clearAllButton => 'Cancella Tutto';
|
||||
|
||||
@override
|
||||
String get scanHistoryTitle => 'Cronologia Scansioni';
|
||||
|
||||
@override
|
||||
String get clearHistoryTooltip => 'Cancella cronologia';
|
||||
|
||||
@override
|
||||
String get searchCodesHint => 'Cerca tra i codici...';
|
||||
|
||||
@override
|
||||
String get noScansInHistory => 'Nessuna scansione in memoria';
|
||||
|
||||
@override
|
||||
String noResultsForQuery(String query) {
|
||||
return 'Nessun risultato per \"$query\"';
|
||||
}
|
||||
|
||||
@override
|
||||
String get copyCodeTooltip => 'Copia codice';
|
||||
|
||||
@override
|
||||
String get copiedToClipboardSnackbar => 'Copiato negli appunti';
|
||||
|
||||
@override
|
||||
String resentCodeSnackbar(String code) {
|
||||
return 'Inviato \"$code\" al PC';
|
||||
}
|
||||
|
||||
@override
|
||||
String get settingsTitle => 'Impostazioni';
|
||||
|
||||
@override
|
||||
String get sectionPlanSubscription => 'PIANO & ABBONAMENTO';
|
||||
|
||||
@override
|
||||
String get premiumPlanActive => 'Piano Premium Attivo';
|
||||
|
||||
@override
|
||||
String get freeBaseVersion => 'Versione Base Gratuita';
|
||||
|
||||
@override
|
||||
String get unlimitedAndAdFree => 'Scansioni illimitate e zero pubblicità';
|
||||
|
||||
@override
|
||||
String activeSessionLabel(String time) {
|
||||
return 'Sessione attiva: $time';
|
||||
}
|
||||
|
||||
@override
|
||||
String freeScansRemaining(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count scansioni libere rimanenti',
|
||||
one: '1 scansione libera rimanente',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get manageButton => 'Gestisci';
|
||||
|
||||
@override
|
||||
String get upgradePremiumShort => 'Passa a Premium';
|
||||
|
||||
@override
|
||||
String get restorePurchasesTitle => 'Ripristina Acquisti';
|
||||
|
||||
@override
|
||||
String get restorePurchasesSubtitle =>
|
||||
'Hai già acquistato su un altro dispositivo o reinstallato?';
|
||||
|
||||
@override
|
||||
String get restorePurchasesSuccess => 'Acquisti ripristinati con successo!';
|
||||
|
||||
@override
|
||||
String get restorePurchasesEmpty =>
|
||||
'Nessun acquisto attivo trovato da ripristinare.';
|
||||
|
||||
@override
|
||||
String get sectionPcConnection => 'CONNESSIONE PC & NEGOZIO';
|
||||
|
||||
@override
|
||||
String get workstationStatusTitle => 'Stato Postazione';
|
||||
|
||||
@override
|
||||
String connectedToName(String name) {
|
||||
return 'Connesso a $name';
|
||||
}
|
||||
|
||||
@override
|
||||
String notConnectedWithIp(String ip) {
|
||||
return 'Non connesso ($ip)';
|
||||
}
|
||||
|
||||
@override
|
||||
String get noPcConfigured => 'Nessun PC configurato';
|
||||
|
||||
@override
|
||||
String get favoriteWorkstationsTitle => 'Postazioni PC Preferite';
|
||||
|
||||
@override
|
||||
String registeredComputersCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count computer registrati nel negozio',
|
||||
one: '1 computer registrato nel negozio',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get noComputersSaved => 'Nessun computer salvato';
|
||||
|
||||
@override
|
||||
String get autoConnectFullTitle => 'Autocollegamento all\'avvio/risveglio';
|
||||
|
||||
@override
|
||||
String get autoConnectFullSubtitle =>
|
||||
'Disattivato: chiede sempre a quale PC connettersi (evita di sparare codici sul PC del collega)';
|
||||
|
||||
@override
|
||||
String get inactivityDisconnectTitle => 'Disconnessione per inattività';
|
||||
|
||||
@override
|
||||
String inactivityDisconnectActive(int minutes) {
|
||||
return 'Interrompe la connessione dopo $minutes minuti senza scansioni';
|
||||
}
|
||||
|
||||
@override
|
||||
String get inactivityDisconnectOff => 'Disattivata (rimane sempre connesso)';
|
||||
|
||||
@override
|
||||
String get inactivity5Min => '5 min (Consigliato)';
|
||||
|
||||
@override
|
||||
String get inactivity10Min => '10 min';
|
||||
|
||||
@override
|
||||
String get inactivity15Min => '15 min';
|
||||
|
||||
@override
|
||||
String get disabledOption => 'Disattivata';
|
||||
|
||||
@override
|
||||
String get sendTypingTestTitle => 'Invia Test di Digitazione';
|
||||
|
||||
@override
|
||||
String get sendTypingTestSubtitle =>
|
||||
'Digita \"TEST-CATELLI-123\" sul PC attivo';
|
||||
|
||||
@override
|
||||
String get typingTestSentSnackbar => 'Test di digitazione inviato al PC!';
|
||||
|
||||
@override
|
||||
String get sectionKeyboardEmulation => 'EMULAZIONE TASTIERA PC';
|
||||
|
||||
@override
|
||||
String get suffixEnterTitle => 'Tasto Invio (Enter)';
|
||||
|
||||
@override
|
||||
String get suffixEnterSubtitle =>
|
||||
'Preme Invio dopo ogni codice (consigliato per Excel, ERP, gestionali)';
|
||||
|
||||
@override
|
||||
String get suffixTabTitle => 'Tasto Tabulatore (Tab)';
|
||||
|
||||
@override
|
||||
String get suffixTabSubtitle => 'Sposta il cursore al campo/cella successiva';
|
||||
|
||||
@override
|
||||
String get suffixNoneTitle => 'Nessun tasto finale';
|
||||
|
||||
@override
|
||||
String get suffixNoneSubtitle =>
|
||||
'Scrive solo la stringa pura del codice a barre';
|
||||
|
||||
@override
|
||||
String get sectionScanFeedback => 'SCANSIONE E FEEDBACK';
|
||||
|
||||
@override
|
||||
String get aimModeTitle => 'Modalità di mira';
|
||||
|
||||
@override
|
||||
String get aimModeSubtitle =>
|
||||
'Standard, Precisione (mirino + zoom) o AR Multi-Codice';
|
||||
|
||||
@override
|
||||
String get postScanPauseTitle => 'Pausa dopo scansione';
|
||||
|
||||
@override
|
||||
String postScanPauseSubtitle(String seconds) {
|
||||
return 'Attesa di ${seconds}s prima della prossima lettura';
|
||||
}
|
||||
|
||||
@override
|
||||
String get cooldown1s => '1,0 sec (Rapida)';
|
||||
|
||||
@override
|
||||
String get cooldown2s => '2,0 sec';
|
||||
|
||||
@override
|
||||
String get cooldown25s => '2,5 sec (Consigliata)';
|
||||
|
||||
@override
|
||||
String get cooldown3s => '3,0 sec';
|
||||
|
||||
@override
|
||||
String get cooldown4s => '4,0 sec';
|
||||
|
||||
@override
|
||||
String get cooldown5s => '5,0 sec';
|
||||
|
||||
@override
|
||||
String get continuousScanTitle => 'Scansione Continua';
|
||||
|
||||
@override
|
||||
String get continuousScanSubtitle =>
|
||||
'Riduce la pausa a 1,0s quando inquadri codici diversi in serie';
|
||||
|
||||
@override
|
||||
String get vibrationTitle => 'Vibrazione alla lettura';
|
||||
|
||||
@override
|
||||
String get vibrationSubtitle => 'Feedback aptico alla decodifica del codice';
|
||||
|
||||
@override
|
||||
String get soundTitle => 'Suono di conferma';
|
||||
|
||||
@override
|
||||
String get soundSubtitle => 'Segnale acustico alla lettura del barcode';
|
||||
|
||||
@override
|
||||
String get sectionLanguage => 'LINGUA';
|
||||
|
||||
@override
|
||||
String get languageTitle => 'Lingua App';
|
||||
|
||||
@override
|
||||
String get languageSystem => 'Predefinita di sistema';
|
||||
|
||||
@override
|
||||
String get languageItalian => 'Italiano';
|
||||
|
||||
@override
|
||||
String get languageEnglish => 'English';
|
||||
|
||||
@override
|
||||
String get sectionInfo => 'INFORMAZIONI';
|
||||
|
||||
@override
|
||||
String get organizationTitle => 'Organizzazione';
|
||||
|
||||
@override
|
||||
String get appVersionTitle => 'Versione App';
|
||||
|
||||
@override
|
||||
String get paywallTitle => 'Barcode Reader Premium';
|
||||
|
||||
@override
|
||||
String get paywallSubtitle =>
|
||||
'Sblocca scansioni illimitate verso il PC senza alcuna interruzione.';
|
||||
|
||||
@override
|
||||
String get paywallBenefitUnlimited =>
|
||||
'Scansioni barcode e QR illimitate per sempre';
|
||||
|
||||
@override
|
||||
String get paywallBenefitNoAds => 'Zero pubblicità e nessun timer di attesa';
|
||||
|
||||
@override
|
||||
String get paywallBenefitAllModes =>
|
||||
'Modalità Standard, Precisione e AR Multi-Codice';
|
||||
|
||||
@override
|
||||
String get paywallBenefitMultiPc =>
|
||||
'Postazioni multi-PC preferite e sincronizzazione Wi-Fi';
|
||||
|
||||
@override
|
||||
String get paywallPlanYearly => 'Annuale';
|
||||
|
||||
@override
|
||||
String get paywallPlanMonthly => 'Mensile';
|
||||
|
||||
@override
|
||||
String get paywallPlanLifetime => 'A Vita (Lifetime)';
|
||||
|
||||
@override
|
||||
String get paywallPerYear => '/ anno';
|
||||
|
||||
@override
|
||||
String get paywallPerMonth => '/ mese';
|
||||
|
||||
@override
|
||||
String get paywallOneTime => 'Acquisto una tantum';
|
||||
|
||||
@override
|
||||
String get paywallBestValue => 'PIÙ CONVENIENTE';
|
||||
|
||||
@override
|
||||
String paywallSavePercent(int percent) {
|
||||
return 'RISPARMIA $percent%';
|
||||
}
|
||||
|
||||
@override
|
||||
String get paywallOneTimeBadge => 'PAGHI UNA VOLTA';
|
||||
|
||||
@override
|
||||
String get paywallContinueButton => 'Continua';
|
||||
|
||||
@override
|
||||
String paywallContinueWithPrice(String price) {
|
||||
return 'Continua — $price';
|
||||
}
|
||||
|
||||
@override
|
||||
String get paywallLoadingPlans => 'Caricamento piani disponibili...';
|
||||
|
||||
@override
|
||||
String get paywallUnavailableTitle => 'Piani momentaneamente non disponibili';
|
||||
|
||||
@override
|
||||
String get paywallUnavailableSubtitle =>
|
||||
'Verifica la connessione internet o la disponibilità di Google Play e riprova.';
|
||||
|
||||
@override
|
||||
String get paywallRetryButton => 'Riprova';
|
||||
|
||||
@override
|
||||
String get paywallPurchaseError =>
|
||||
'Impossibile completare l\'acquisto. Riprova tra poco.';
|
||||
|
||||
@override
|
||||
String get paywallLegalNote =>
|
||||
'Gli abbonamenti si rinnovano automaticamente salvo disdetta almeno 24 ore prima della scadenza nelle impostazioni di Google Play.';
|
||||
|
||||
@override
|
||||
String get premiumManageTitle => 'Premium Attivo';
|
||||
|
||||
@override
|
||||
String get premiumManageBody =>
|
||||
'Il tuo piano Premium Illimitato è attivo su questo account.\n\nPer gestire o disdire un abbonamento, apri Google Play Store → Pagamenti e abbonamenti → Abbonamenti.';
|
||||
|
||||
@override
|
||||
String get closeButton => 'Chiudi';
|
||||
}
|
||||
+25
-7
@@ -1,8 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'core/l10n/l10n_extensions.dart';
|
||||
import 'core/services/ad_service.dart';
|
||||
import 'core/services/feedback_service.dart';
|
||||
import 'core/services/subscription_service.dart';
|
||||
@@ -25,6 +27,7 @@ import 'features/settings/data/datasources/settings_local_datasource.dart';
|
||||
import 'features/settings/data/repositories/settings_repository_impl.dart';
|
||||
import 'features/settings/domain/repositories/settings_repository.dart';
|
||||
import 'features/settings/presentation/cubit/settings_cubit.dart';
|
||||
import 'features/settings/presentation/cubit/settings_state.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@@ -133,13 +136,28 @@ class BarcodeReaderApp extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
child: MaterialApp(
|
||||
title: 'Catelli Barcode Reader',
|
||||
debugShowCheckedModeBanner: false,
|
||||
themeMode: ThemeMode.dark, // Dark theme provides optimal contrast for scanner viewfinder
|
||||
theme: AppTheme.lightTheme,
|
||||
darkTheme: AppTheme.darkTheme,
|
||||
home: const ScannerScreen(),
|
||||
child: BlocBuilder<SettingsCubit, SettingsState>(
|
||||
buildWhen: (prev, curr) =>
|
||||
prev.settings.languageCode != curr.settings.languageCode,
|
||||
builder: (context, settingsState) {
|
||||
return MaterialApp(
|
||||
onGenerateTitle: (context) => context.l10n.appTitle,
|
||||
debugShowCheckedModeBanner: false,
|
||||
locale: settingsState.settings.locale,
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
themeMode: ThemeMode
|
||||
.dark, // Dark theme provides optimal contrast for scanner viewfinder
|
||||
theme: AppTheme.lightTheme,
|
||||
darkTheme: AppTheme.darkTheme,
|
||||
home: const ScannerScreen(),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
+13
-8
@@ -222,6 +222,11 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
flutter_localizations:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@@ -264,6 +269,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.2"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: intl
|
||||
sha256: "1ca20c894b1717686a2319b8548763d812bc0aabdac580420a44c5178c57a867"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.20.3"
|
||||
jni:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -480,14 +493,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.3"
|
||||
purchases_ui_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: purchases_ui_flutter
|
||||
sha256: "9931ffb9729b61b667f41da213de299cff9993ecaf95f18e455aef78b02b17a8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.3"
|
||||
record_use:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
+5
-2
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.10+11
|
||||
version: 1.1.0+12
|
||||
|
||||
environment:
|
||||
sdk: ^3.13.4
|
||||
@@ -30,6 +30,9 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
intl: any
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
@@ -44,7 +47,6 @@ dependencies:
|
||||
vibration: ^3.2.1
|
||||
google_mobile_ads: ^9.2.0
|
||||
purchases_flutter: ^11.0.3
|
||||
purchases_ui_flutter: ^11.0.3
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@@ -62,6 +64,7 @@ dev_dependencies:
|
||||
|
||||
# The following section is specific to Flutter packages.
|
||||
flutter:
|
||||
generate: true
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:barcode_reader_app/main.dart';
|
||||
import 'package:barcode_reader_app/l10n/generated/app_localizations.dart';
|
||||
import 'package:barcode_reader_app/core/services/ad_service.dart';
|
||||
import 'package:barcode_reader_app/core/services/feedback_service.dart';
|
||||
import 'package:barcode_reader_app/core/services/subscription_service.dart';
|
||||
@@ -43,4 +45,14 @@ void main() {
|
||||
|
||||
expect(find.byType(BarcodeReaderApp), findsOneWidget);
|
||||
});
|
||||
|
||||
test('Localization provides both Italian and English strings', () {
|
||||
final it = lookupAppLocalizations(const Locale('it'));
|
||||
final en = lookupAppLocalizations(const Locale('en'));
|
||||
|
||||
expect(it.settingsTitle, 'Impostazioni');
|
||||
expect(en.settingsTitle, 'Settings');
|
||||
expect(it.scanPcQrCode, 'Inquadra QR Code sul PC');
|
||||
expect(en.scanPcQrCode, 'Scan QR Code on PC');
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user