parallax_bg 1.0.2 copy "parallax_bg: ^1.0.2" to clipboard
parallax_bg: ^1.0.2 copied to clipboard

outdated

Create beautiful & interactive parallax backgrounds

parallax_bg #

Create beautiful & interactive parallax backgrounds.

pub package

Usage #

Add following command in your pubspec.yaml & install package

parallax_bg:1.0.2

Import in your dart page

import 'package:parallax_bg/parallax_bg.dart';

Add following to create background wrapper

    ParallaxBackground(
      backgroundImage: "assets/images/galaxy.jpg",
      parallaxType: _parallaxType,
      foregroundChilds: [
        ParallaxItem(
            child: Image.asset("assets/images/planet.png"),
            offset: _planetOffset),
        ParallaxItem(
            child: Image.asset("assets/images/meteor.png"),
            offset: _meteorOffset),
      ],
      // fallback: true,
    );

Change/Add/Remove ParallaxItem for foreground items

    ParallaxItem(
    child: Image.asset("assets/images/meteor.png"),
    offset: _meteorOffset),

ParallaxBackground

PROPERTY TYPE REQUIRED DETAILS
backgroundImage string yes Image path from asset folder
foregroundChilds List yes Widgets to create foreground layers
child Widget no Child widget to draw over all parallax widgets
reverse boolean no Move foreground items in reverse direction. Default false
fallback boolean no If true render the items normally when there are no sensors available. If false, it will show a error message in visible area. Default false

ParallaxItem

PROPERTY TYPE REQUIRED DETAILS
child Widget yes Child widget to draw over background as parallax item
offset boolean no Offset values to calculate distance to move items when moving device. Need separate value for each item. Default 5

LICENSE #

MIT LICENSE

29
likes
0
points
47
downloads

Publisher

verified publisherakidevelops.com

Weekly Downloads

Create beautiful & interactive parallax backgrounds

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_sensors

More

Packages that depend on parallax_bg