Photo view in CMC
parent
5e383e57d9
commit
205b4d6b21
@ -0,0 +1,51 @@
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
|
||||
class PhotoViewPage extends StatelessWidget {
|
||||
String image;
|
||||
|
||||
PhotoViewPage(this.image);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: PhotoView(
|
||||
imageProvider: AssetImage(image),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: SafeArea(
|
||||
child: Container(
|
||||
decoration: containerColorRadiusBorder(
|
||||
Colors.black.withOpacity(0.2),
|
||||
1000,
|
||||
Colors.white,
|
||||
),
|
||||
margin: EdgeInsets.all(12),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue