flutter_photo_view 1.0.2 copy "flutter_photo_view: ^1.0.2" to clipboard
flutter_photo_view: ^1.0.2 copied to clipboard

PlatformAndroidiOS
outdated

PhotoView aims to help produce an easily usable implementation of a zooming ImageView.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:photo_view/flutter_photo_view.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(
          children: [
            Padding(
              padding: const EdgeInsets.only(top: 50),
              child: TextButton(
                  onPressed: () {
                    PhotoViewController.presentWithUrls(photos: [
                      'https://placehold.jp/150x150.png',
                      'https://placehold.jp/160x160.png'
                    ], position: 1);
                  },
                  child: const Text('show images')),
            ),
            const Expanded(
                child: PhotoView(src: 'https://placehold.jp/150x150.png'))
          ],
        ),
      ),
    );
  }
}
5
likes
130
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

PhotoView aims to help produce an easily usable implementation of a zooming ImageView.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_photo_view

Packages that implement flutter_photo_view