feat: i18n (en/tr), zoom orijinal cozunurluk + max 20x + gaplessPlayback, app id com.softmediadesign.imajviewer, CI analyze+test
Build & Release / build-linux (push) Has been cancelled
Build & Release / build-windows (push) Has been cancelled
Build & Release / create-release (push) Has been cancelled

This commit is contained in:
Alhan committed 2026-08-07 00:16:48 +03:00
1 parent b9e433d032
commit 504d84f6f6
19 files changed
+408 -48

No files matched your search

+9 -6
View File
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
import '../l10n/app_localizations.dart';
class ImageCanvas extends StatefulWidget {
final String filePath;
@@ -203,7 +204,7 @@ class _ImageCanvasState extends State<ImageCanvas> {
final double cy = (vy - _ty) / _sc;
const double factor = 1.1;
final double rawSc = _sc * (e.scrollDelta.dy < 0 ? factor : 1.0 / factor);
final double newSc = rawSc.clamp(1.0, 10.0);
final double newSc = rawSc.clamp(1.0, 20.0);
if (_angle == 0) {
_tx = _tx + cx * _sc - cx * newSc;
_ty = _ty + cy * _sc - cy * newSc;
@@ -373,7 +374,7 @@ class _ImageCanvasState extends State<ImageCanvas> {
Widget _buildImage() {
final longest = _vpSize.longestSide;
final cacheWidth = longest > 0 ? (longest * 2).round() : null;
final cacheWidth = longest > 0 ? (longest * _sc * 2).round() : null;
if (_cachedPath != widget.filePath || _cachedCacheWidth != cacheWidth) {
_cachedPath = widget.filePath;
_cachedCacheWidth = cacheWidth;
@@ -388,6 +389,7 @@ class _ImageCanvasState extends State<ImageCanvas> {
image: provider,
fit: _isFilled ? BoxFit.cover : BoxFit.contain,
filterQuality: FilterQuality.high,
gaplessPlayback: true,
errorBuilder: (_, _, _) => _errorWidget(),
);
}
@@ -494,13 +496,14 @@ class _ImageCanvasState extends State<ImageCanvas> {
}
Widget _errorWidget() {
return const Center(
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.broken_image, size: 48, color: Colors.white38),
SizedBox(height: 8),
Text('Resim yüklenemedi', style: TextStyle(color: Colors.white38)),
const Icon(Icons.broken_image, size: 48, color: Colors.white38),
const SizedBox(height: 8),
Text(AppLocalizations.of(context)!.imageLoadError,
style: const TextStyle(color: Colors.white38)),
],
),
);