Code Monkey home page Code Monkey logo

Comments (4)

renancaraujo avatar renancaraujo commented on June 1, 2024 1

Micro tutorial after 0.2.0:

  1. setup a custom PhotoViewController
  2. Use its reset method when needed
  3. The end

from photo_view.

lucasjinreal avatar lucasjinreal commented on June 1, 2024

@renancaraujo It seems can be done be add a gesture detector on PhotoView... But Dont know how to go back..... any thoughts?

class HeroPhotoViewWrapper extends StatelessWidget {
  const HeroPhotoViewWrapper(
      {this.imageProvider,
      this.loadingChild,
      this.backgroundDecoration,
      this.minScale,
      this.maxScale});

  final ImageProvider imageProvider;
  final Widget loadingChild;
  final Decoration backgroundDecoration;
  final dynamic minScale;
  final dynamic maxScale;

  @override
  Widget build(BuildContext context) {
    return Container(
        constraints: BoxConstraints.expand(
          height: MediaQuery.of(context).size.height,
        ),
        child: GestureDetector(
          child: PhotoView(
          imageProvider: imageProvider,
          loadingChild: loadingChild,
          backgroundDecoration: backgroundDecoration,
          minScale: minScale,
          maxScale: maxScale,
          heroTag: "someTag",
          ),
          onTap: () {
            // pop up this
          },
        ));
  }
}

from photo_view.

renancaraujo avatar renancaraujo commented on June 1, 2024

@jinfagang A gesture detector to reset internal state of a widget? 🤔

It does not seem to be right.

from photo_view.

lucasjinreal avatar lucasjinreal commented on June 1, 2024

@renancaraujo Haha, waiting for your creative method, I am also stuck on this.. By the way, this hero animation on iOS not seems smooth as Android, it has a left to right animation which makes hero transition not simple enlarge animation ... I don't sure if you can understand this, but you will fill it if you have both iOS and Android device to test it.

from photo_view.

Related Issues (20)

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.