You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
healthcare-frontend/lib/Reports/finding_images.dart

80 lines
2.6 KiB

import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/common/zoom_image.dart';
class FindingImages extends StatefulWidget {
var imageDetails;
FindingImages({this.imageDetails});
@override
State<FindingImages> createState() => _FindingImagesState();
}
class _FindingImagesState extends State<FindingImages> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Finding Images'),
body:Container(
padding: EdgeInsets.all(12.0),
child: GridView.builder(
itemCount:widget.imageDetails.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 2.0,
mainAxisSpacing: 2.0,
),
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Findings',imageDetails:widget.imageDetails[index]['url'])));
/*gridOntap(index);*/
},
child: Container(
width: MediaQuery.of(context).size.width * .30,
height: MediaQuery.of(context).size.height * .15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
widget.imageDetails[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(
children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
),
onPressed: () async {
},
),
/* color: Colors.pinkAccent,
width: 35,
height: 35,*/
),
)]),
),
//Image.network(widget.imageDetails[index]['url']),
);
},
)),
);
}
}