upgrade to flutter 3.29.2
Some checks are pending
Flutter Test / test (push) Waiting to run

This commit is contained in:
Dr.Blank 2025-04-03 23:07:00 +05:30
parent 2fd4650bb8
commit edf7b2790f
No known key found for this signature in database
GPG key ID: BA5F87FF0560C57B
9 changed files with 141 additions and 189 deletions

View file

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:archive/archive_io.dart';
import 'package:flutter/foundation.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
@ -28,11 +29,23 @@ class Logs extends _$Logs {
}
Future<String> getZipFilePath() async {
final String targetZipPath = await generateZipFilePath();
var encoder = ZipFileEncoder();
encoder.create(await generateZipFilePath());
encoder.addFile(File(await getLoggingFilePath()));
encoder.close();
return encoder.zipPath;
encoder.create(targetZipPath);
final logFilePath = await getLoggingFilePath();
final logFile = File(logFilePath);
if (await logFile.exists()) {
// Check if log file exists before adding
await encoder.addFile(logFile);
} else {
// Handle case where log file doesn't exist? Maybe log a warning?
// Or create an empty file inside the zip? For now, just don't add.
debugPrint(
'Warning: Log file not found at $logFilePath, creating potentially empty zip.',
);
}
await encoder.close();
return targetZipPath;
}
}

View file

@ -6,7 +6,7 @@ part of 'logs_provider.dart';
// RiverpodGenerator
// **************************************************************************
String _$logsHash() => r'901376741d17ddbb889d1b7b96bc2882289720a0';
String _$logsHash() => r'aa9d3d56586cba6ddf69615320ea605d071ea5e2';
/// See also [Logs].
@ProviderFor(Logs)