Kenburns effect on flutter

Overview

KenBurns

The Ken Burns effect is a type of panning and zooming effect used in video production from still imagery.

Wrap your image with a KenBurns widget

Container(
      height: 300,
      child: KenBurns(
        child: Image.network("https://lemag.nikonclub.fr/wp-content/uploads/2017/07/08.jpg", fit: BoxFit.cover,),
      ),
),

screen

Configuration

You can configure KenBurns Widget

KenBurns(
    minAnimationDuration : Duration(milliseconds: 3000),
    maxAnimationDuration : Duration(milliseconds: 10000),
    maxScale : 8,
    child: ...
  });

Multiple images

You can display multiple child in KenBurns with a CrossFade animation

Container(
    height: 300,
    child: KenBurns.multiple(
      childLoop: 3,
      children: [
        Image.network(
          "https://www.photo-paysage.com/?file=pic_download_link/picture&pid=3100",
          fit: BoxFit.cover,
        ),
        Image.network(
          "https://cdn.getyourguide.com/img/location_img-59-1969619245-148.jpg",
          fit: BoxFit.cover,
        ),
        Image.network(
          "https://www.theglobeandmail.com/resizer/vq3O7LI3hvsjTP2N0m9NwU4W3Eg=/1500x0/filters:quality(80)/arc-anglerfish-tgam-prod-tgam.s3.amazonaws.com/public/4ETF3GZR3NA3RDDW23XDRBKKCI",
          fit: BoxFit.cover,
        ),
      ],
    ),
),

Download

pub package

dependencies:
  kenburns: ^1.0.5

License

Copyright 2019 florent37, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...

Flutter package for creating awesome animations.

Flutter package for creating awesome animations.

🎬 Simple Animations Simple Animations is a powerful package to create beautiful custom animations in no time. 💪 fully tested 📝 well documented 💼 e

Dec 31, 2022

Fun canvas animations in Flutter based on time and math functions.

Fun canvas animations in Flutter based on time and math functions.

funvas Flutter package that allows creating canvas animations based on time and math (mostly trigonometric) functions. The name "funvas" is based on F

Jan 9, 2023

A flutter package that adds support for vector data based animations.

animated_vector Description and inspiration A package that adds support for vector data based animations. The data format is heavily inspired from the

Apr 26, 2022

Flutter UI Challenges

Flutter UI Challenges

Introduction 🐼 Zoo is a small, simple and beautiful app that lists 3d model of animals. Before we start, you can take a look at the app: Usage 🎨 To

Dec 22, 2022

A Flutter app with flip animation to view profiles of friends. 🌟

A Flutter app with flip animation to view profiles of friends. 🌟

Flip View Made with 🔥 in India This flutter app is based on the design made Dmytro Prudnikov for Yalantis on Dribble.He describes the design as: Just

Sep 23, 2022

Simple reactive animations in your Flutter apps.

just.motion Flutter package to create organic motion transitions. Why? The Motion Value stateless hot reload status notifier Ease Motion Spring Motion

Nov 14, 2022

Timer UI animation challenge from 'Flutter Animations Masterclass'

stopwatch_flutter An IOS stopwatch challenge from Flutter Animations Masterclass - Full Course What I learned; Use timer Use ticker Create custom shap

Jan 4, 2023

💙 Google Classroom Clone using Flutter, GCP

💙 Google Classroom Clone using  Flutter, GCP

Introduction 🚀 Classroom is a Google Classroom clone built using 💙 Flutter. Before we start, you can take a look at the app: Screenshots 🗻 Key Feat

Dec 14, 2022

Animated Menu in Flutter using radial.

Animated Menu in Flutter using radial.

Animated_radial_Menu_in_Flutter Animated Menu in Flutter using radial. Getting Started This project is a starting point for a Flutter application. A f

Jul 18, 2022
Comments
  • Images getting out from the view.

    Images getting out from the view.

    started showing white background while changing position. KenBurns.multiple( minAnimationDuration: Duration(milliseconds: 3000), maxAnimationDuration: Duration(milliseconds: 5000),

              maxScale: 1.5,
              children: [
                Image.asset(
                  'assets/img/girl.png',
                  fit: BoxFit.cover,
                ),
                Image.asset(
                  'assets/img/SliderLogin2.png',
                  fit: BoxFit.cover,
                ),
                Image.asset(
                  'assets/img/SliderLogin3.png',
                  fit: BoxFit.cover,
                ),
                Image.asset(
                  'assets/img/SliderLogin4.png',
                  fit: BoxFit.cover,
                ),
              ],
            ),
    
    opened by Ajit121 3
  • _KenBurnsState didn't handle widget update

    _KenBurnsState didn't handle widget update

    If parent/holder of KenBurns widget will change single to multiple or vise versa there will be some errors related with animation loops and missed handling of widget update.

    single -> multiple:

    #0      List.[] (dart:core-patch/growable_array.dart:177:60)
    #1      _KenBurnsState._buildChild (package:kenburns/kenburns.dart:313:63)
    #2      _KenBurnsState.build.<anonymous closure> (package:kenburns/kenburns.dart:296:20)
    

    multiple -> single

    NoSuchMethodError: The method '%' was called on null. Receiver: null Tried calling: %()
    _KenBurnsState.fire (_KenBurnsState.java:259)
    

    I fixed it in PR https://github.com/florent37/Flutter-KenBurns/pull/5.

    opened by sanekyy 1
  • _KenBurnsState didn't handle widget update when number of children change

    _KenBurnsState didn't handle widget update when number of children change

    Number of children change from 6 to 3 and RangeError appear

    I/flutter (12049): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
    I/flutter (12049): The following RangeError was thrown building LayoutBuilder:
    I/flutter (12049): RangeError (index): Invalid value: Not in inclusive range 0..2: 6
    I/flutter (12049): 
    I/flutter (12049): The relevant error-causing widget was:
    I/flutter (12049):   LayoutBuilder
    I/flutter (12049):   file:///Users/yuriy.dorofeev/.pub-cache/hosted/pub.dartlang.org/kenburns-1.0.4/lib/kenburns.dart:301:12
    I/flutter (12049): 
    I/flutter (12049): When the exception was thrown, this was the stack:
    I/flutter (12049): #0      List.[] (dart:core-patch/growable_array.dart:177:60)
    I/flutter (12049): #1      _KenBurnsState._buildChild (package:kenburns/kenburns.dart:330:35)
    

    I fixed it in PR #6 .

    opened by sanekyy 0
A Flutter plugin to create views using concentric transition effect.

Concentric Transition A Flutter plugin to create views using Concentric Transition Clipper. Useful for onboarding, page transitions, custom clippers,

Vladyslav Korniienko 202 Jan 7, 2023
A custom Flutter value slider that makes a wave effect when dragged.

A Flutter slider that makes a wave effect when dragged. Does a little bounce when dropped. Demo Getting Started To use this plugin, add wave_slider as

Gordon Hayes 33 Dec 21, 2022
Thanos snap effect in Flutter

snappable Thanos effect library in Flutter Check out blog post describing the package on Fidev. Examples Getting Started Import it import 'package:sna

Marcin Szałek 332 Dec 6, 2022
🔔 A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]

Animated Text Kit A flutter package which contains a collection of some cool and awesome text animations. Recommended package for text animations in C

Ayush Agarwal 1.4k Jan 6, 2023
This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter for Android and IOS

AwesomeFlutterUI The purpose of this repository is to demonstrate the use of different widgets and tricks in flutter and how to use them in your proje

Subir Chakraborty 132 Nov 13, 2022
This is a Flutter URL preview plugin for Flutter that previews the content of a URL

flutter_link_preview This is a URL preview plugin that previews the content of a URL Language: English | 中文简体 Special feature Use multi-processing to

yung 67 Nov 2, 2022
Flutter liquid swipe - Liquid Swipe Animation Built With Flutter

Flutter Liquid Swipe liquid Swipe animation is amazing and its Created for iOS P

Jahongir Anvarov 6 Dec 1, 2022
A candy sorter game made with Flutter for the march flutter challenge.

A candy sorter game made with Flutter for the march flutter challenge.

Debjeet Das 1 Apr 9, 2022
✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

✨ Flutter Spinkit A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit. ?? Installing dependencies:

Jeremiah Ogbomo 2.7k Dec 30, 2022
A Flutter library for gradually painting SVG path objects on canvas (drawing line animation).

drawing_animation From static SVG assets See more examples in the showcasing app. Dynamically created from Path objects which are animated over time m

null 442 Dec 27, 2022