photox_pro 0.2.5 copy "photox_pro: ^0.2.5" to clipboard
photox_pro: ^0.2.5 copied to clipboard

An all-in-one solution for displaying interactive images.

PhotoX_Pro #

An all-in-one solution for displaying interactive images (Added new features)

   

Features #

  • Smoothly animate images into fullscreen and back
  • Swipe to dismiss images
  • Pinch to zoom
  • Automatically generate swipeable gallery when given multiple images

Getting started #

Add photox_pro as a dependency in your pubspec.yaml file

flutter pub add photox_pro

Import PhotoX:

import 'package:photox_pro/photox_pro.dart';

Usage #

@override
Widget build(BuildContext context) {
  return Container(
    height: 400,
    width: 400,
    child: PhotoX(
      dismissMode: DismissMode.swipeVertical,
      placeholder: (context, url) => const Center(child: CircularProgressIndicator()),
      items: [
        PhotoXItem(
            id: "1",
            resource: "assets/img1.jpeg",
            isAsset: true
        ),
        PhotoXItem(
            id: "2",
            resource: "https://picsum.photos/1020/1020",
            isAsset: false
        ),
        PhotoXItem(
            id: "3",
            resource: "https://picsum.photos/1021/1021",
            isAsset: false
        ),
      ]
    )
  );
}

Additional parameters #

dismissMode #

DismissMode.swipeAny DismissMode.swipeVertical

⚠️ DismissMode.swipeAny can only be used when provided with a single PhotoXItem

showPageIndicator #

Whether to show the page indicator in the thumbnail gallery for multiple PhotoXItems

pageIndicatorAlignment #

The alignment of the page indicator relative to the gallery

pageIndicatorActiveColor #

The color of the active bubble in the page indicator

pageIndicatorInactiveColor #

The color of the inactive bubbles in the page indicator

pageIndicatorBackgroundColor #

The background color of the page indicator

pageIndicatorBubbleRadius #

The radius of the indicator bubbles in the page indicator

pageIndicatorBubblePadding #

The padding between the bubbles in the page indicator

fullscreenGalleryTitleTextStyle #

The TextStyle for the AppBar title in the fullscreen gallery

fullscreenGalleryAppBarLeadingWidget #

A custom widget to use as the leading widget in the fullscreen gallery AppBar

4
likes
130
points
57
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

An all-in-one solution for displaying interactive images.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

cached_network_image, collection, flutter, photo_view

More

Packages that depend on photox_pro