Giter Club home page Giter Club logo

tuoku / photox Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 6.45 MB

๐Ÿ“ธ An all-in-one solution for displaying interactive images

Home Page: https://pub.dev/packages/photox

License: BSD 3-Clause "New" or "Revised" License

Java 1.18% Kotlin 0.17% Ruby 3.66% Swift 2.36% Objective-C 1.51% Dart 25.57% CMake 27.53% C++ 31.32% C 2.76% HTML 2.50% Shell 1.43%
dart flutter flutter-package gallery photos photoview swipe-to-dismiss swipetodismiss widget

photox's Introduction

PhotoX

An all-in-one solution for displaying interactive images

ย ย ย 

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 as a dependency in your pubspec.yaml file

flutter pub add photox

Import PhotoX:

import 'package:photox/photox.dart';

Usage

@override
Widget build(BuildContext context) {
  return Container(
    height: 400,
    width: 400,
    child: PhotoX(
      items: [
        PhotoXItem(
          id: "1", resource: "assets/img1.jpg", isAsset: true),
        PhotoXItem(
          id: "2", resource: "assets/img2.jpeg", isAsset: true),
      ]
    )
  );
}

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.