mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 22:39:34 +00:00
更改appName等常量为全局变量
This commit is contained in:
parent
896f8837bd
commit
e2aa73c01c
35 changed files with 167 additions and 216 deletions
|
|
@ -1,14 +1,12 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:logging_appenders/logging_appenders.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:vaani/globals.dart';
|
||||
import 'package:vaani/shared/extensions/duration_format.dart';
|
||||
|
||||
Future<String> getLoggingFilePath() async {
|
||||
final Directory directory = await getApplicationDocumentsDirectory();
|
||||
return '${directory.path}/vaani.log';
|
||||
// final Directory directory = await getApplicationDocumentsDirectory();
|
||||
return '${appStorageDir.path}/$appName.log';
|
||||
}
|
||||
|
||||
Future<void> initLogging() async {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:vaani/features/logging/providers/logs_provider.dart';
|
||||
import 'package:vaani/main.dart';
|
||||
import 'package:vaani/globals.dart';
|
||||
|
||||
class LogsPage extends HookConsumerWidget {
|
||||
const LogsPage({super.key});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue