spkersten / flutter_coast

PageView wrapper that supports Hero-like animations
https://pub.dev/packages/coast
MIT License
22 stars 11 forks source link

Does not work on Flutter Web #8

Closed RhinoInani closed 3 years ago

RhinoInani commented 3 years ago

Hello, I found your package after looking for a solution to using hero animation in page view. This seemed to work perfectly, but when I tried it on my web application, there was no animation displaying. For privacy reasons, I cannot provide screenshots of the problem but I can share my code. Here is the code:

**Home page/Holder page:**

final _coastController = CoastController();

Coast(
        controller: _coastController,
        scrollDirection: Axis.vertical,
        dragStartBehavior: DragStartBehavior.down,
        beaches: [
          Beach(builder: (context) => IntroPage(size: size)),
          Beach(builder: (context) => BiWeeklyReadingsPage(size: size)),
          Beach(builder: (context) => UpcomingEventsPage(size: size)),
          Beach(builder: (context) => ContactUsPage(size: size)),
        ],
        observers: [
          CrabController(),
        ],
      ),

**Inro Page**
return Container(
      height: size.height - size.height * 0.08,
      width: size.width,
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Crab(
              tag: "text",
              child: Container(
                child: RichText(
                  text: TextSpan(
                      style: TextStyle(
                          fontSize: size.height * 0.075,
                          color: mainColor),
                      children: [
                      ...

**The rest of the pages have about the same code, using the SAME tag.**

I hope you can fix this issue/let me know why the error is occurring.

Keep up the great work.

Thanks, Rhino

RhinoInani commented 3 years ago

Never mind a full restart solved the problem jumped the gun on this one. Sorry about that. Great package keep up the great work!