Profile View
This commit is contained in:
@@ -1,28 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||
import 'package:le_kiosque_by_gcs/ui/view/pdf_reader.dart';
|
||||
|
||||
class ItemMagLarge extends StatelessWidget {
|
||||
const ItemMagLarge({
|
||||
Key key,
|
||||
this.magazine,
|
||||
@required this.magazine,
|
||||
}) : super(key: key);
|
||||
|
||||
final Magazine magazine;
|
||||
|
||||
void showPdfReader(BuildContext context, String magazineUrl) {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return PdfReader(
|
||||
pdfUrl: magazine.magazineUrl,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 235,
|
||||
width: 168,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5)
|
||||
),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(
|
||||
"https://miningandbusiness.com/wp-content/uploads/2021/02/03f19c3a-1d92-4be7-ac54-f52b37e626ad-561x771.jpg"),
|
||||
fit: BoxFit.cover,
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
showPdfReader(context, magazine.magazineUrl);
|
||||
},
|
||||
child: Container(
|
||||
height: 235,
|
||||
width: 168,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5),
|
||||
),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(magazine.urlCover),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user