photo_opener 0.3.2 copy "photo_opener: ^0.3.2" to clipboard
photo_opener: ^0.3.2 copied to clipboard

Telegram-style full-screen image viewer for Flutter. Pinch to zoom, swipe between images, thumbnails, swipe-down to dismiss. Supports network, assets, and local files.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:photo_opener/extensions/screen_util.dart';
import 'package:photo_opener/photo_opener.dart';

void main() {
  runApp(MaterialApp(
    home: App(),
    debugShowCheckedModeBanner: false,
  ));
}

class App extends StatelessWidget {
  App({super.key});

  final imageList = [
    'https://picsum.photos/seed/mp03/800/800',
    'https://picsum.photos/seed/mp04/800/800',
    'https://picsum.photos/seed/mp05/800/800',
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
          backgroundColor: Colors.white,
          title: const Text('Photo Opener Example')),
      body: Center(
        child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
          ...List.generate(3, (index) {
            return GestureDetector(
              onTap: () {
                onOpenPhoto(
                    context: context,
                    images: imageList,
                    type: PhotoType.network,
                    initialIndex: index);
              },
              child: Padding(
                padding: const EdgeInsets.all(6.0),
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(12.r),
                  child: Image.network(
                    imageList[index],
                    width: 82,
                    fit: BoxFit.cover,
                    height: 85,
                  ),
                ),
              ),
            );
          })
        ]),
      ),
    );
  }
}
19
likes
160
points
584
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Telegram-style full-screen image viewer for Flutter. Pinch to zoom, swipe between images, thumbnails, swipe-down to dismiss. Supports network, assets, and local files.

Repository (GitHub)
View/report issues

Topics

#image #gallery #viewer #zoom #fullscreen

License

MIT (license)

Dependencies

cached_network_image, flutter, photo_view

More

Packages that depend on photo_opener