Giter Club home page Giter Club logo

floating_bubbles's Introduction

I am a Software Engineer specialised in application development (both web and mobile)

  • ๐Ÿ›  Building apps using React-TypeScript, NodeJs, Flutter
  • ๐ŸŒฑ Exploring Blockchain Technology and Go Lang
  • ๐Ÿ“ฉ Reach me out on LinkedIn

Technologies I work with

Languages

TS JS Dart Solidity Python c++ Java html css markdown

Frameworks, Platforms and Libraries

React nextjs flutter react native nodejs Redux hardhat express saas yarn
Click here to see my Github stats

Stats



floating_bubbles's People

Contributors

chappie74 avatar lenawirtz avatar mhbdev avatar poujhit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

floating_bubbles's Issues

Number of Bubbles less than 10

Why is it not allowed to have less than 10 bubbles?
I only wanted to use 4 large bubbles, and commenting out this part worked without any problems.
assert( noOfBubbles >= 10, 'Number of Bubbles Cannot be less than 10', ),

Bubbles only work on debug build (Android)

When I test using the debug build everything shows up as expected,
both on the emulator and when installed on a real device (Android)

When I build and install the release apk, the bubbles do not show at all.

images inside bubbles?

hello thanks for the cool bubble effect! wondering if it's possible to pull images from a list and populate the bubbles with them?

setState after the widget being disposed

Steps to reproduce:

  1. Create a basic flutter application
  2. Create a StatefulWidget and use this snippet inside a Scaffold body
return Scaffold(
      body: SafeArea(
        child: Stack(
          children: [
            Positioned.fill(
              child: FloatingBubbles(
                noOfBubbles: 25,
                colorsOfBubbles: const [
                  Colors.orange,
                  Colors.red,
                  Colors.blue,
                ],
                sizeFactor: 0.16,
                duration: 5, // in seconds
                opacity: 10,
                paintingStyle: PaintingStyle.fill,
                strokeWidth: 8,
                speed: BubbleSpeed.slow, // normal is the default
              ),
            ),
            Center(
              child: Text('Hello World!')
            ),
          ],
        ),
      ),
    );
  1. before the duration you passed to FloatingBubbles widget navigate to another page.
void initState() {
    Future.delayed(Duration(seconds: 2)).then((_) => Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const Scaffold(body: Placeholder(),),)));
    super.initState();
}
  1. After completing the duration of FloatingBubbles widget you can see this error log.
โ•โ•โ•ก EXCEPTION CAUGHT BY FLUTTER FRAMEWORK โ•žโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
The following assertion was thrown:
setState() called after dispose(): _FloatingBubblesState#7a888(lifecycle state: defunct, not
mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in
the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error
can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose()
callback. Another solution is to check the "mounted" property of this object before calling
setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is
retaining a reference to this State object after it has been removed from the tree. To avoid memory
leaks, consider breaking the reference to this object during dispose().

When the exception was thrown, this was the stack:
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49  throw_
packages/flutter/src/widgets/framework.dart 1097:9                                                                         <fn>
packages/flutter/src/widgets/framework.dart 1131:14                                                                        setState
packages/floating_bubbles/src/bubbles.dart 142:11                                                                          <fn>
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1390:47                                          _rootRun
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1300:19                                          run
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1208:7                                           runGuarded
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1248:23                                          <fn>
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1398:13                                          _rootRun
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1300:19                                          run
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1232:23                                          <fn>
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:19       internalCallback
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

It is happening because inside the widget after finishing the Timer, setState is being called but unfortunately in this example, the state is gone and we cannot call setState.

Control Movement Speed

Hi there, would it be possible to add parameters for controlling (1) the speed at which bubbles appear/disappear and (2) the speed at which bubbles move? Great package by the way!

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.