All Projects → mdg-iitr → scrollytell

mdg-iitr / scrollytell

Licence: MIT license
Cross-platform Scrolly Telling library built using Flutter.

Programming Languages

dart
5743 projects
swift
15916 projects
kotlin
9241 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to scrollytell

glass kit
💎 A package containing widgets to implement glass morphism in flutter apps
Stars: ✭ 50 (+8.7%)
Mutual labels:  flutter-package
getwidget-docs
Get Widgets UI library docs.
Stars: ✭ 17 (-63.04%)
Mutual labels:  flutter-package
loadany
Flutter load more package , support ListView、GridView、Slivers
Stars: ✭ 25 (-45.65%)
Mutual labels:  flutter-package
dgraph
Dgraph Dart client which communicates with the server using gRPC.
Stars: ✭ 27 (-41.3%)
Mutual labels:  flutter-package
stop watch timer
This is Stop Watch Timer for flutter plugin.🏃‍♂️
Stars: ✭ 76 (+65.22%)
Mutual labels:  flutter-package
flutter syntax view
Flutter Syntax Highlighter
Stars: ✭ 88 (+91.3%)
Mutual labels:  flutter-package
flutter ume
UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance
Stars: ✭ 1,792 (+3795.65%)
Mutual labels:  flutter-package
flutter pytorch mobile
A flutter plugin for pytorch model inference. Supports image models as well as custom models.
Stars: ✭ 57 (+23.91%)
Mutual labels:  flutter-package
bloc
A predictable state management library that helps implement the BLoC design pattern
Stars: ✭ 12 (-73.91%)
Mutual labels:  flutter-package
seo renderer
A Flutter Web Plugin to display Text Widget as Html for SEO purpose
Stars: ✭ 103 (+123.91%)
Mutual labels:  flutter-package
barcode.flutter
barcode generate library for Flutter
Stars: ✭ 58 (+26.09%)
Mutual labels:  flutter-package
syntax highlighter
Syntax Highlighter for Dart/Flutter Code
Stars: ✭ 28 (-39.13%)
Mutual labels:  flutter-package
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+200%)
Mutual labels:  flutter-package
flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+2119.57%)
Mutual labels:  flutter-package
time ago provider
library for generating fuzzy timestamp for example ("9 minutes ago")
Stars: ✭ 16 (-65.22%)
Mutual labels:  flutter-package
alphabet scroll view
A Scrollable ListView Widget with the dynamic vertical Alphabet List on the Side which you can drag and tap to scroll to the first item starting with that letter in the list.
Stars: ✭ 21 (-54.35%)
Mutual labels:  flutter-package
flutter auth buttons
Auth Buttons is a flutter widget library, include buttons for authenticating with the most popular social networks.
Stars: ✭ 23 (-50%)
Mutual labels:  flutter-package
rx shared preferences
🌀 Shared preferences with RxDart Stream observation ⚡️ Reactive shared preferences for Flutter 🌸Reactive stream wrapper around SharedPreferences 🍄 Lightweight and easy-to-use 🌱 A reactive key-value store for Flutter projects. Like shared_preferences, but with Streams 📕 Rx Shared Preferences for Flutter 🌿 rx_shared_preferences 🌰 rx_shared_prefere…
Stars: ✭ 36 (-21.74%)
Mutual labels:  flutter-package
Free-RASP-Flutter
Flutter library for improving app security and threat monitoring on Android and iOS mobile devices.
Stars: ✭ 62 (+34.78%)
Mutual labels:  flutter-package
advance image picker
Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.
Stars: ✭ 91 (+97.83%)
Mutual labels:  flutter-package

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].