GithubHelp home page GithubHelp logo

Comments (6)

xvrh avatar xvrh commented on July 26, 2024

Hi,
Thanks for the report.
I'm not familiar with the CustomScrollView widget. Could you post a small reproduction of your problem so I can reproduce it locally?

Thanks.

from lottie-flutter.

mslalith avatar mslalith commented on July 26, 2024

when I use the same Lottie file for multiple times, it doesn't cause an error.

CustomScrollView(
    slivers: <Widget>[
        SliverToBoxAdapter(
            child: Container(
                height: 180.0,
                child: Lottie.asset('assets/loading.json'),
            ),
        ),
        SliverToBoxAdapter(
            child: Container(
                height: 180.0,
                child: Lottie.asset('assets/loading.json'),
            ),
        ),
    ],
);

but when I use different Lottie files, it crashes saying state: No element The relevant error-causing widget was Container.

CustomScrollView(
    slivers: <Widget>[
        SliverToBoxAdapter(
            child: Container(
                height: 180.0,
                child: Lottie.asset('assets/loading.json'),
            ),
        ),
        SliverToBoxAdapter(
            child: Container(
                height: 180.0,
                child: Lottie.asset('assets/shoot.json'),
            ),
        ),
    ],
);

from lottie-flutter.

xvrh avatar xvrh commented on July 26, 2024

I tried this program, but I'm not able to reproduce the error you have.

import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';

void main() => runApp(App());

class App extends StatelessWidget {
  const App({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: CustomScrollView(
          slivers: <Widget>[
            for (var i = 0; i < 10; i++)
              SliverToBoxAdapter(
                child: Container(
                  height: 180.0,
                  child: Lottie.asset('assets/AndroidWave.json'),
                ),
              ),
          ],
        ),
      ),
    );
  }
}

Can you paste here (or provide a link) a fully executable version of your code?

Thanks.

from lottie-flutter.

mslalith avatar mslalith commented on July 26, 2024

Instead of using same Lottie file, run using different Lottie files

from lottie-flutter.

xvrh avatar xvrh commented on July 26, 2024

Oh sorry, I miss read the problem.
But even with different files I'm not able to reproduce it. Can you provide a standalone program? Maybe also with your json files?
What version of Flutter do you use?

Thanks.

from lottie-flutter.

xvrh avatar xvrh commented on July 26, 2024

I'll close it since it's not actionable without a simple reproducible program.

from lottie-flutter.

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.