Cross-platform Scrolly Telling library built using Flutter.

Overview

Scrollytell Flutter

platform License: MIT By-MDG

A flutter package to implement ScrollyTelling in your flutter app. Using ScrollyTell you can have the background changing dynamically as you scroll. ScrollyTell provides a mechanism to fully control this behaviour. Visit our medium blog.

🎖 Installing

dependencies:
  scrollytell: ^1.0.4

⚡️ Import

import 'package:scrollytell/scrollytell.dart';

Props

props type default value Description
panels (required) List Widget A list of panel widgets
panelStartCallback Function(num, Function) Called on start of new panel
panelEndCallback Function(num, Function) Called on end of existing panel
panelProgressCallback Function(num, double, Function) Called every frame
opacity double 1 Set opacity of the panels
lastPanelForceComplete bool false Set true if the last panel hits bottom of the screen and can't be scrolled through
initialOverlayWidget Widget none Overlay widget before start of scrolling
guidelinePosition GuidelinePosition GuidelinePosition.top Set position of guideline
stickyChartIndex int null The panel of corresponding index will dock at center when scrolled past the center
showDebugConsole bool false show debug console (activePanelIndex, progress) and debug line (guideline)

At least one of the panelStartCallback, panelProgressCallback, panelEndCallback must be non-null.

Terminology and Explanation

Panel

Panel is a widget. The list of panels form a scrolling sequence. In simple words, each panel is widget that remains in foreground while scrolling.

OverlayWidget

The overlay widget is what you want to be dynamically changed as you scroll. For example: In a simple story telling app, the panel will consist of a text portion of the story, while the OverlayWidget shows a corresponding graphic.

guideline

Guideline is an imaginary reference line. When the panel's top coincide with the guideline we say panel has been 'started' or the panel is 'active' and panelStartCallback is called. Similarily when panel's bottom touch guideline we say panel is ended andpanelEndCallback is called. You can choose the guidelinePosition to be either at ScrollyWidget's top, center, bottom.

activePanelIndex

An integer value corresponding to the panel that is "active"(coincides with the guideline).

progress (0,1)

A double value that depicts how much the panel has been scrolled past the guideline. For example: When the center of panel reaches guideline progress is half.

🎮 How To Use

Declare a List of Widgets

List<Widget> panelList = [Text('Hello Scrollytell'), Text('Hello Flutter')];

Declare an Overlay Widget

Widget overlayWidget;

Declare a ScrollyWidget

Widget _scrollyWidget = ScrollyWidget(
		   showDebugConsole: true,
  	           guidelinePosition: GuidelinePosition.center,
                   panels: panelList,
                   panelStartCallback: (activePanelNumber, func){},
                   panelEndCallback: (endingPanelNumber, func){},
                   panelProgressCallback: (activePanelNumber, progress, func){
    
                // set properties of overlay widget using activePanelNumber and progress
        
                       double rad = (progress <= 0.5) ? progress * 200 : 200 - progress * 200;
                       overlayWidget = Center(
                           child: Container(
                               width: 200,
                               height: 200,
                               decoration: BoxDecoration(
                                   borderRadius: BorderRadius.all(
                                       Radius.circular(rad),
                                   ),
                               color: Colors.red,
                               ),
                           ),
                       );
        
                // then pass it into the function
        
                       func(overlayWidget)
                   },
               )

Now Wrap it in either Expanded, Flexible or Container

Option 1 : Wrap in Expanded for covering the remaining screen.

Expanded(child: _scrollyWidget)

Option 2 : Wrap in Flexible

Flexible(child: _scrollyWidget)

Option 3 : Wrap in container to give it desired size.

Container(height: 500, width: 300, child: _scrollyWidget)

OR Use it directly as body of Scaffold.

Scaffold(body: _scrollyWidget)

For more info, refer to the basic_usage app in the example.

Some usage tips for beginners

Setting the overlay widget.

  • The overlayWidget will continue to be the one which was last set in the callback(s) unless you explicitly change it.
  • When you do not want to display anything at overlayWidget set it to be Container()

adding a "fake panel"

  • Sometimes you may want to include want to include containers at start (maybe a heading) and want it to scroll with your actual panels. The best option is to add it as a panel in the panelList and not manipulate the overlayWidget when activePanelIndex is 1.
  • A similar approach can be applied when you want include containers (like large empty spaces) in between you actual panels (like, text portions of story). Just include the container at the appropriate position in the panelList and not manipulate the overlayWidget when activePanelIndex is corresponding index.

🚀 Showcase


🐛 Bugs/Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a issue(label:enhancement) on Github and we will look into it. Pull requests are most welcome.

🤝 Guidelines for Contributors

If you want to contribute to improve this library, please read our guidelines. Feel free to open an issue.

⭐️ License

MIT License view license

This project draws inspiration from @google's Scrollytell.

You might also like...

A cross-platform Flutter home workout app that respects your privacy. THIS IS A GITLAB MIRROR, file issues and contribute there.

A cross-platform Flutter home workout app that respects your privacy. THIS IS A GITLAB MIRROR, file issues and contribute there.

Feeel Feeel is an open-source workout app for doing simple at-home exercises. This is a rewrite of the original app in Flutter, to make development ea

Dec 26, 2022

A cross platform mobile application developed in flutter

A cross platform mobile application developed in flutter

A cross platform mobile application 📱 developed in flutter to keep track of dai

Dec 16, 2021

A cross-platform Flutter widget for displaying websites. Optional navigation buttons.

Overview Gives you a cross-platform Flutter widget for displaying websites and other web content. Licensed under the Apache License 2.0. Links Github

Oct 23, 2022

This repo contains a collection of permission related Flutter plugins which can be used to request permissions to access device resources in a cross-platform way.

Flutter Permission Plugins Deprecation Notice This repository has been replaced by the Flutter permission_handler plugin and will not longer be mainta

Dec 13, 2021

Cross-platform flutter plugin for reading and writing NFC tags. Not maintained anymore - not looking for new maintainer, fork instead.

Cross-platform flutter plugin for reading and writing NFC tags. Not maintained anymore - not looking for new maintainer, fork instead.

nfc_in_flutter NFC in Flutter is a plugin for reading and writing NFC tags in Flutter. It works on both Android and iOS with a simple stream interface

Sep 28, 2022

A cross-platform Fediverse client for micro-blogging services written in Flutter/Dart.

A cross-platform Fediverse client for micro-blogging services written in Flutter/Dart.

Kaiteki A 快適 (kaiteki) Fediverse client for microblogging instances, made with Flutter and Dart. Currently, Kaiteki is still in a proof-of-concept/alp

Jan 5, 2023

Cross Platform app in Flutter with Firebase Auth and Firestore. Available for Mobile,Web,Desktop

Cross Platform app in Flutter with Firebase Auth and Firestore. Available for Mobile,Web,Desktop

NavokiNotes Navoki Notes, a note app app, will sync data to cloud and on all devices. We have application for Android, iOS, Web App, PWA, Windows, mac

Dec 27, 2022

FlutterFire-note - A Flutter based simple cross platform note application

FlutterFire-note - A Flutter based simple cross platform note application

FlutterFire Note Overview FlutterFire Note is a Flutter based simple cross platf

Jan 31, 2022

A beautiful cross platform mobile web app use this and ENJOY (2 page) - Flutter UI from scratch

course_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Feb 9, 2022
Comments
  • A White Background While Scrolling???

    A White Background While Scrolling???

    Great work!

    However, I may be doing something wrong. Attached is a gif file depicting the issue. You see, I would think the background would remain will actually scrolling---better yet move dynamically. And yet, as you can see in the attach gif file, the background only returns after I've finished scrolling. It's now at its new background image value, but during the scrolling, the background disappears and turned white?!

    The code is available here for your download and review.

    What am I doing wrong??

    testTelling

    opened by Andrious 1
  • Implement Sticky Charts and Sticky Canvas

    Implement Sticky Charts and Sticky Canvas

    It'd be great to have sticky charts, in other words a sticky chart is a panel that sticks to the center of the screen as a background once it reaches the center of the screen upon scrolling. The chart can be the size of a single panel, or it may also be like the canvas .

    Simple, sticky chart example: https://google.github.io/scrollytell/examples/sticky_chart.html Fancy panels with sticky fullsize canvas example: https://google.github.io/scrollytell/examples/segmented_sticky_fullsize.html

    opened by KarthikRIyer 1
Releases(v1.0.4)
Owner
Mobile Development Group
Mobile Development Group create products to make experience of people at IITR easy.
Mobile Development Group
Flutter-for-Wordpress-App - Cross platform wordpress news app built with Flutter and WP REST API

Flutter for Wordpress A flutter app for a wordpress websites with clean and elegant design. This app is available in free and pro version. You can cho

Madhav Poudel 243 Dec 23, 2022
Flutter-Wordpress-App - Cross platform wordpress news app built with Flutter

Flutter for Wordpress A flutter app for a wordpress websites with clean and elegant design. This app is available in free and pro version. You can cho

Madhav Poudel 243 Dec 23, 2022
A Cross-Platform Wisdom Generator built with Flutter

Wisgen ?? A small Cross-Platform Wisdom Generator, built using Flutter and a combination of external APIs This Wisdom Generator combines random advice

Sebastian Faust 31 Dec 6, 2022
Aditya 93 Dec 25, 2022
Blood Bank is cross platform mobile application that is developed using technologies like Flutter/Dart for frontend and Firebase for data storage

Blood Bank is cross platform mobile application that is developed using technologies like Flutter/Dart for frontend and Firebase for data storage. The sole goal of this application is to make blood donation resourceful and accessible all round the world.

Sajan Poudel 4 Nov 5, 2022
A feature-rich cross-platform webview using webview_flutter for mobile and iframe for web. JS interop-ready.

A feature-rich cross-platform webview using webview_flutter for mobile and iframe for web. JS interop-ready. Getting started Gallery Basic usage Featu

null 2 Mar 17, 2022
A comprehensive guide on learning how to code cross platform mobile applications with the Flutter framework, from the ground up.

✳️ The Ultimate Guide to App Development with Flutter ✳️ A complete and comprehensive guide to learning Flutter with explanations, screenshots, tips,

Anthony 243 Jan 1, 2023
A cross-platform flutter package to convert your links into rich beautiful previews.

Link Preview Generator A cross-platform flutter package to convert your links into rich beautiful previews. This package is inspired from Any Link Pre

Pranav Bedre 12 Oct 21, 2022
Open-source, cross-platform, hassle-free file sharing with AES-256 encryption made with Flutter & Dart.

Odin ⚡ Open source easy file sharing for everyone. ⚡ Cross-platform hassle-free file sharing with AES-256 encryption made with Flutter & Dart. Getting

Odin 111 Dec 22, 2022
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

Flutter permission_handler plugin The Flutter permission_handler plugin is build following the federated plugin architecture. A detailed explanation o

Baseflow 1.7k Dec 31, 2022