Bubble Lens

pub package

A reproduction of the Apple Watch UI animation

Example

Usage

Import the package

import 'package:bubble_lens/bubble_lens.dart';

Use the package

BubbleLens(
    width: 250,
    height: 250,
    widgets: [
        Container(
            width: 100,
            height: 100,
            color: Colors.red
        ),
        ...
    ]
);

Required Parameters

PropTypeDefaultDescription
widthdoubleN/AWidth of the container.
heightdoubleN/AHeight of the container.
widgetsListN/AList of widgets to display.

Optional Parameters

PropTypeDefaultDescription
sizedouble100Maximum size of a widget.
paddingXdouble10Horizontal padding between widgets.
paddingYdouble0Vertical padding between widgets.
durationDurationDuration(milliseconds: 100)Animation's duration.
radiusRadiusRadius.circular(999)Widget's radius.
highRatiodouble0High ratio, should be >= 0.
lowRatiodouble0Low ratio, should be >= 0.

Example

Find the example wiring in the Bubble Lens example application.

Details

See the bubble_lens.dart for more details.

Issues and feedback

Please file issues to send feedback or report a bug. Thank you!

Libraries

bubble_lens