innosoft_simpletooltip 0.0.1 copy "innosoft_simpletooltip: ^0.0.1" to clipboard
innosoft_simpletooltip: ^0.0.1 copied to clipboard

outdated

Plugin aims to help produce an easily usable implementation of tooltip

innosoft_simpletooltip #

Plugin aims to help produce an easily usable implementation of tooltip

Usage #

To use this plugin, add innosoft_simpletooltip as a dependency in your pubspec.yaml.

Example #

import 'package:flutter/material.dart'; import 'package:innosoft_simpletooltip/innosoft_simpletooltip.dart';

void main() => runApp(App());

class App extends StatelessWidget {

@override Widget build(BuildContext context) { return MaterialApp( home: TooltipExampleStateful(), ); } }

class TooltipExampleStateful extends StatefulWidget { TooltipExampleStateful({Key key}) : super(key: key);

@override _TooltipExampleStateful createState() => _TooltipExampleStateful(); }

class _TooltipExampleStateful extends State

double marginTop = 20; SoftSimpleTooltip tooltipUp, tooltipDown; bool clsTooltipUp = false; bool clsTooltipDown = false;

@override void initState() { super.initState(); tooltipUp = SoftSimpleTooltip( content: Container( //height: 100.0, child:Text("Lorem ipsum dolor sit amet, consetetur sadipscingelitr, " "sed diam nonumy eirmod tempor invidunt ut laboreet dolore magna aliquyam erat, " "sed diam voluptua. At vero eos et accusam et justoduo dolores et ea rebum. ") ), popupDirection: TooltipDirection.up, backgroundColor: Colors.black, radius: 20, arrowHeight: 40, arrowWidth: 50, arrowPos: 200, tooltipStyle: TooltipStyle.border); tooltipDown = SoftSimpleTooltip( content: Container( //height: 100.0, child:Text("Lorem ipsum dolor sit amet, consetetur sadipscingelitr, " "sed diam nonumy eirmod tempor invidunt ut laboreet dolore magna aliquyam erat, " "sed diam voluptua. At vero eos et accusam et justoduo dolores et ea rebum. ") ), popupDirection: TooltipDirection.down, backgroundColor: Colors.black, radius: 20, arrowHeight: 40, arrowWidth: 50, arrowPos: 200, tooltipStyle: TooltipStyle.border); }

@override void dispose() { super.dispose(); }

void showHideTooltipUp(){ clsTooltipUp ? tooltipUp.showTooltip() : tooltipUp.closeTooltip(); setState(() { clsTooltipUp = !clsTooltipUp; }); }

void showHideTooltipDown(){ clsTooltipDown ? tooltipDown.showTooltip() : tooltipDown.closeTooltip(); setState(() { clsTooltipDown = !clsTooltipDown; }); }

@override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: AppBar( backgroundColor: Colors.white, elevation: 0.0, centerTitle: true, title: Text( 'TOOLTIP', style: TextStyle(color: Colors.black), ), ), body: Column( //mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisSize: MainAxisSize.min, children:

0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Plugin aims to help produce an easily usable implementation of tooltip

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on innosoft_simpletooltip