Code Monkey home page Code Monkey logo

Comments (6)

WieFel avatar WieFel commented on May 26, 2024 2

@daadu @LorenzoVianello @seco560
actually I did find a workaround just now:

class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Backdrop Demo',
      home: BackdropScaffold(
        ...
        controller: AnimationController(
            vsync: this, duration: Duration(milliseconds: 200), value: 0),
      ),
    );
  }
}

Use a StatefulWidget, use with TickerProviderStateMixin with your State and set the BackdropScaffold controller's initial value to 0, so the backdrop starts in an open state.

@daadu but I think we can still add the property revealBackLayerAtStart, right? For better readability and easier use...

from backdrop.

seco560 avatar seco560 commented on May 26, 2024 1

I'd also benefit from this feature. My current workaround is to simply swap the front and back layers, but it's a bit iffy.

from backdrop.

daadu avatar daadu commented on May 26, 2024 1

Yes, I forgot that custom controller can be passed (also we should rename to animationController, along with Backdrop.of(context).animationController).

revealBackLayerAtStart i think should still be added.

from backdrop.

WieFel avatar WieFel commented on May 26, 2024

@LorenzoVianello ok, I think we can add a property revealBackLayerAtStart or similar, which defaults to false.
I couldn't find any other workaround.

@daadu what do you think?

from backdrop.

daadu avatar daadu commented on May 26, 2024

@WieFel go ahead with revealBackLayerAtStart idea.

from backdrop.

daadu avatar daadu commented on May 26, 2024

This feature has landed with v0.5.2 on pub.dev.

@LorenzoVianello Thank you for suggesting this. Please check yourself in repo README.

from backdrop.

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.