feat: add localisation

This commit is contained in:
2026-07-31 21:46:05 +02:00
parent b58c9a8722
commit f5b2041612
30 changed files with 4099 additions and 326 deletions
+4 -1
View File
@@ -3,6 +3,8 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:kooltab2/models/product.dart';
import '../../l10n/app_localizations.dart';
class ProductTile extends StatelessWidget {
final Product product;
final bool enabled;
@@ -20,6 +22,7 @@ class ProductTile extends StatelessWidget {
Widget build(BuildContext context) {
final theme = Theme.of(context);
final scheme = theme.colorScheme;
final l10n = AppLocalizations.of(context);
final outOfStock = product.stockQuantity <= 0;
final lowStock =
@@ -101,7 +104,7 @@ class ProductTile extends StatelessWidget {
borderRadius: BorderRadius.circular(999),
),
child: Text(
'OUT OF STOCK',
l10n.outOfStock,
style: TextStyle(
color: scheme.onError,
fontWeight: FontWeight.w800,