123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import 'package:auto_route/annotations.dart';
- import 'package:cached_network_image/cached_network_image.dart';
- import 'package:eitc_erm_dental_flutter/funcs.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:photo_view/photo_view.dart';
- ///在线图片查看页面
- @RoutePage(name: "onlinePictureViewRoute")
- class OnlinePictureViewPage extends StatelessWidget {
- final String url;
- const OnlinePictureViewPage({super.key, required this.url});
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: Text(getS().viewPicture),
- centerTitle: true,
- ),
- body: SafeArea(
- child: Container(
- color: Colors.black,
- child: PhotoView(
- imageProvider: CachedNetworkImageProvider(url),
- errorBuilder: (ctx, obj, stacktrack) {
- logd("在线查看图片,图片加载异常", error: obj, stackTrace: stacktrack);
- return Center(
- child: Icon(
- size: 100.r,
- Icons.image_not_supported_outlined,
- color: Colors.white,
- ),
- );
- },
- ),
- )),
- );
- }
- }
|