|
|
|
@ -15,6 +15,7 @@ import 'package:permission_handler/permission_handler.dart'; |
|
|
|
import 'package:app_settings/app_settings.dart'; |
|
|
|
import 'package:deep_voice/core/utils/logger.dart'; |
|
|
|
import 'package:path_provider/path_provider.dart'; |
|
|
|
import 'package:photo_view/photo_view.dart'; |
|
|
|
|
|
|
|
class Message { |
|
|
|
final bool isUser; //标识信息是否来自用户还是AI |
|
|
|
@ -959,4 +960,28 @@ class AgentController extends GetxController { |
|
|
|
void openNavigation(String start, String end, String ntype) { |
|
|
|
_navigationManager.open(start, end, ntype); |
|
|
|
} |
|
|
|
|
|
|
|
// 打开图片查看器 |
|
|
|
void openImageViewer(BuildContext context, String imagePath) { |
|
|
|
Navigator.push( |
|
|
|
context, |
|
|
|
MaterialPageRoute( |
|
|
|
builder: (context) => Scaffold( |
|
|
|
appBar: AppBar( |
|
|
|
backgroundColor: Colors.black, |
|
|
|
iconTheme: IconThemeData(color: Colors.white), |
|
|
|
), |
|
|
|
body: Container( |
|
|
|
color: Colors.black, |
|
|
|
child: PhotoView( |
|
|
|
imageProvider: FileImage(File(imagePath)), |
|
|
|
minScale: PhotoViewComputedScale.contained, |
|
|
|
maxScale: PhotoViewComputedScale.covered * 2, |
|
|
|
backgroundDecoration: BoxDecoration(color: Colors.black), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|