/
main.dart
36 lines (34 loc) · 1011 Bytes
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import 'package:flutter/material.dart';
import 'package:pinch_zoom_image_last/pinch_zoom_image_last.dart';
import 'package:cached_network_image/cached_network_image.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Pinch Zoom Image',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(
title: Text('Pinch Zoom Image'),
),
body: ListView(
children: <Widget>[
Container(
padding: EdgeInsets.all(16.0),
child: PinchZoomImage(
image: CachedNetworkImage(
imageUrl: 'https://i.imgur.com/tKg0XEb.jpg',
),
zoomedBackgroundColor: Color.fromRGBO(240, 240, 240, 1.0),
),
),
],
),
),
);
}
}