Giter Club home page Giter Club logo

touch_indicator's Introduction

touch_indicator

When you are recording a screencast of your app, you often want to give visual indication of where your fingers are touching the screen. Showing that on Android is easy. On iOS it's less intuitive. touch_indicator makes it easier and consistent on both platforms.

You add this widget as the main widget where you want to display user touches. Usually this will be the direct child of your MaterialApp. It will show an indicator on every touching finger and is completely customizable.

Installation

Add the plugin to your pubspec.yaml:

dependencies:
  touch_indicator: ^2.0.0

Usage

Import the package in your Dart code:

import 'package:touch_indicator/touch_indicator.dart';

Wrap all routes in your app in the TouchIndicator widget:

class MyApp extends StatelessWidget {
  MaterialApp(
    title: 'Touch indicator example',
    builder: (context, child) => TouchIndicator(child: child!),
    home: MyHomePage(title: 'Flutter Demo Home Page'),
  );
}

Customization options

indicatorColor

Changes the color of the backdrop and icon. Default is Colors.blueGrey.

indicatorSize

Changes the size of the indicator. Default is 40.0.

indicator

By adding a Widget here, you can change the complete look of the touch indicators. Make sure to supply a proper indicatorSize in order for the indicators to be positioned at the center of your touchpoints.

forceInReleaseMode

When you want to show indicators when the app is running in release mode, make sure to enable this option. Default is false.

enabled

You can enable or disable display of the indicators on the fly with this option. Default is true.

touch_indicator's People

Contributors

gabeschine avatar mardaneus86 avatar sybrands-place avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

touch_indicator's Issues

Issue with drag and drop

TouchIndicator don't play nice with DropTarget making use of drag'n drop impossible.

Regards,

Do not show touch indicators in release mode

By default it should not show touch indicators when the app is in release mode. Use the kReleaseMode constant to determine if an app is running in release mode.

A forceInReleaseMode option can be added to force indicators in release mode for whoever wants to show them.

Touch Indicator Position

I want the touch indicator slightly above the touch point. How can I achieve that?

Thanks for the package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.