A Flutter package allows you to Showcase/Highlight your widgets step by step.

Overview

Showcaes View - Simform LLC.

ShowCaseView

Build showcaseview

A Flutter package allows you to Showcase/Highlight your widgets step by step.

Preview

The example app running in Android

Installing

  1. Add dependency to pubspec.yaml

    Get the latest version in the 'Installing' tab on pub.dev

dependencies:
  showcaseview:
    git:
      url: https://github.com/kirill-21/flutter_showcaseview
      ref: master
  1. Import the package
import 'package:showcaseview/showcaseview.dart';
  1. Adding a ShowCaseWidget widget.
ShowCaseWidget(
  builder: Builder(
    builder : (context)=> Somewidget()
  ),
),
  1. Adding a Showcase widget.
GlobalKey _one = GlobalKey();
GlobalKey _two = GlobalKey();
GlobalKey _three = GlobalKey();

...

Showcase(
  key: _one,
  title: 'Menu',
  description: 'Click here to see menu options',
  child: Icon(
    Icons.menu,
    color: Colors.black45,
  ),
),

Some more optional parameters

Showcase(
  key: _two,
  title: 'Profile',
  description: 'Click here to go to your Profile',
  disableAnimation: true,
  shapeBorder: CircleBorder(),
  radius: BorderRadius.all(Radius.circular(40)),
  showArrow: false,
  tipBorderRadius: BorderRadius.all(Radius.circular(8)),
  overlayPadding: EdgeInsets.all(5),
  slideDuration: Duration(milliseconds: 1500),
  tooltipColor: Colors.blueGrey,
  blurValue: 2,
  disableDefaultTargetGestures: true,
  initialAnimationCurve: Curves.easeIn,
  initialAnimationDuration: const Duration(milliseconds: 300),
  initialAnimationAlignment: Alignment.center,
  child: ...,
),
  1. Using a Showcase.withWidget widget.
Showcase.withWidget(
  key: _three,
  cHeight: 80,
  cWidth: 140,
  shapeBorder: CircleBorder(),
  container: Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: <Widget>[
      ...
    ],
  ),
  child: ...,
),
  1. Starting the ShowCase
someEvent(){
    ShowCaseWidget.of(context).startShowCase([_one, _two, _three]);
}
  1. onFinish method for ShowCase
ShowCaseWidget(
  onFinish: () {
    // Your code goes here
  },
  builder: Builder(
    builder : (context) ()=> Somewidget()
  ),
),
  1. Go to next ShowCase
someEvent(){
  ShowCaseWidget.of(context).next();
}
  1. Go to previous ShowCase
someEvent(){
  ShowCaseWidget.of(context).previous();
}

If you want to start the ShowCaseView as soon as your UI built up then use below code.

WidgetsBinding.instance.addPostFrameCallback((_) =>
  ShowCaseWidget.of(context).startShowCase([_one, _two, _three])
);

If you want to disable barrier interaction then set disableBarrierInteraction parameter to true.

ShowCaseWidget(
  disableBarrierInteraction: true,
),

If you want to disable default gestures of target widget then set disableDefaultTargetGestures parameter to true in Showcase. Note: Make sure to dismiss current showcase with ShowCaseWidget.of(context).dismiss() if you are navigating to other screen. This will be handled by default if disableDefaultTargetGestures is set to false.

ShowCase(
  disableDefaultTargetGestures: true,
),

How to use

Check out the example app in the example directory or the 'Example' tab on pub.dartlang.org for a more complete example.

Scrolling to active showcase

Scrolling to active showcase feature will not work properly in scroll views that renders widgets on demand(ex, ListView, GridView).

In order to scroll to a widget it needs to be attached with widget tree. So, If you are using a scrollview that renders widgets on demand, it is possible that the widget on which showcase is applied is not attached in widget tree. So, flutter won't be able to scroll to that widget.

So, If you want to make a scroll view that contains less number of children widget then prefer to use SingleChildScrollView.

If using SingleChildScrollView is not an option, then you can assign a ScrollController to that scrollview and manually scroll to the position where showcase widget gets rendered. You can add that code in onStart method of ShowCaseWidget.

Example,

// This controller will be assigned to respected sctollview.
final _controller = ScrollController();

ShowCaseWidget(
  onStart: (index, key) {
    if(index == 0) {
      WidgetsBinding.instance.addPostFrameCallback((_) {
       // If showcase widget is at offset 1000 in the listview.
       // If you don't know the exact position of the showcase widget,
       // You can provide nearest possible location.
       // 
       // In this case providing 990 instead of 1000 will work as well.
        _controller.jumpTo(1000);
      });
    }
  },
);

Enable Auto Scrolling

By default, auto-scrolling behavior is off, you can enable it by setting enableAutoScroll flag to true in showCaseWidget.

ShowCaseWidget(
  enableAutoScroll: true,
);

Main Contributors


Birju Vachhani

Devarsh Ranpara

Ankit Panchal

Kashifa Laliwala

Vatsal Tanna

Sanket Kachhela

Parth Baraiya

Shweta Chauhan

Mehul Kabaria

Dhaval Kansara

Note

We have updated license of flutter_showcaseview from BSD 2-Clause "Simplified" to MIT.

License

MIT License

Copyright (c) 2021 Simform Solutions

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...

Flutter's core Dropdown Button widget with steady dropdown menu and many options you can customize to your needs.

Flutter's core Dropdown Button widget with steady dropdown menu and many options you can customize to your needs.

Flutter DropdownButton2 Intro Flutter's core Dropdown Button widget with steady dropdown menu and many options you can customize to your needs. Featur

Jan 4, 2023

A flutter package which will help you to generate pin code fields with beautiful design and animations

A flutter package which will help you to generate pin code fields with beautiful design and animations

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs 🤓 🤓

Dec 23, 2022

A collection of Screens and attractive UIs built with Flutter ready to be used in your applications. No external libraries are used. Just download, add to your project and use.

A collection of Screens and attractive UIs built with Flutter ready to be used in your applications. No external libraries are used. Just download, add to your project and use.

Flutter Screens A collection of Login Screens, Buttons, Loaders and Widgets with attractive UIs, built with Flutter, ready to be used in your applicat

Dec 31, 2022

A package to display blinking point to your mobile app in Flutter

A package to display blinking point to your mobile app in Flutter

Blinking point Easy way to create a blinking point for your Flutter project. Installation Add this to your package's pubspec.yaml file: dependencies:

Apr 18, 2022

This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter for Android and IOS

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

Nov 13, 2022

Writing custom Widgets in Flutter

Writing custom Widgets in Flutter

Flutter - Custom Widgets Part 1 - EllipsizedText / LeafRenderObjectWidget Writing custom Widgets in Flutter (Part 1) — EllipsizedText Part 2 - ChildSi

Dec 9, 2022

Flutter ListView and GridView that shows Loading Widgets before the real data is loaded.

Flutter ListView and GridView that shows Loading Widgets before the real data is loaded.

loadinglistview This package provide an easy way to show loading indicator(Widget) in a listview or a gridview while the app is still fetching the rea

Dec 8, 2021

Flutter Login interface using basic widgets such as Row, Column

Flutter Login interface using basic widgets such as Row, Column

Login UI - Flutter Descrição do Projeto 📳 Interface de login utilizando widgets

Oct 25, 2022

Simple to use yet powerfull style widgets with syntax inspired by CSS.

Simple to use yet powerfull style widgets with syntax inspired by CSS.

Division Simple to use yet powerfull style widgets with syntax inspired by CSS. Please check out styled_widget which is a replacement of Division! The

Nov 20, 2022
Owner
kirill
kirill
Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's heart when you like something and animation effects to increase like count.

like_button Language: English | 中文简体 Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's h

FlutterCandies 357 Dec 27, 2022
This package helps you daily usable function and ready-made Widgets with ease.

Show some love and like to support the project Documentation API Docs are available. Platform Support Android iOS MacOS Web Linux Windows ✔️ ✔️ ✔️ ✔️

Bhoomin Naik 51 Dec 23, 2022
Widgets for creating Hero-like animations between two widgets within the same screen.

flutter_sidekick Widgets for creating Hero-like animations between two widgets within the same screen. Features Hero-like animations. Allow you to spe

Romain Rastel 291 Oct 21, 2022
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.

Motion Tab Bar A beautiful animated widget for your Flutter apps Preview: | | Getting Started Add the plugin: dependencies: motion_tab_bar: ^0.1.5 B

Rezaul Islam 237 Nov 15, 2022
Loading widget based on a Flare animation, allow you to create beautiful custom loading widgets or dialogs

flare_loading Loading widget based on a Flare animation, allow you to create custom loading widgets or dialogs If you're using Rive instead of Flare p

Jimmy Aumard 25 Apr 16, 2021
Clip your widgets with custom shapes provided.

clippy_flutter Clip your widgets with custom shapes provided. #Arc, #Arrow, #Bevel, #ButtCheek, #Chevron, #Diagonal, #Label, #Message, #Paralellogram,

Figen Güngör 238 Dec 11, 2022
A Flutter package that two widgets switch with clipper.

Flutter Switch Clipper A Flutter package that two widgets switch with clipper. 使用 使用FillClipper并自定义相关参数 View code SwitchCipper( initSelect: true,

FlutterCandies 23 Jan 3, 2023
A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it.

progress_dialog A light weight package to show progress dialog. As it is a stateful widget, you can change the text shown on the dialog dynamically. T

Mohammad Fayaz 202 Dec 11, 2022
A Flutter library that makes animation easer. It allows for separation of animation setup from the User Interface.

animator This library is an animation library for Flutter that: makes animation as simple as the simplest widget in Flutter with the help of Animator

MELLATI Fatah 225 Dec 22, 2022
Sample Flutter Drawing App which allows the user to draw onto the canvas along with color picker and brush thickness slider.

DrawApp Sample Flutter Drawing App which allows the user to draw onto the canvas along with color picker and brush thickness slider. All code free to

Jake Gough 226 Nov 3, 2022