peckish_animated_hand_tutorial 1.0.3 copy "peckish_animated_hand_tutorial: ^1.0.3" to clipboard
peckish_animated_hand_tutorial: ^1.0.3 copied to clipboard

A package to guide users through tutorials with animated hands.

example/lib/main.dart

import 'dart:async';

import 'package:peckish_animated_hand_tutorial/peckish_animated_hand_tutorial.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  final GlobalKey buttonKey = GlobalKey();

  final GlobalKey menuKey = GlobalKey();
  //  late Function? triggerTutorial;

  @override
  void initState() {
    super.initState();
    // Timer(Duration(seconds: 10), () {
    //   if (triggerTutorial != null) {
    //     triggerTutorial!();
    //   }
    // });
  }

  @override
  Widget build(BuildContext context) {

    return PeckishHandTutorial(
      initiallyHide: false,
// triggerWhen: (trigger) {
//          triggerTutorial = trigger;
//       },
      initialAlignment: Alignment.topCenter,
        toolTip: const ToolTip(
          toolTipType: ToolTipType.bubble,
          toolTipMessage: "This is a button",
          toolTipStyle: ToolTipStyle(
            backgroundColor: Colors.blue,
          ),
        ),
        haveRippleEffect: true,
        handColor: Colors.green,
        items: [
          ShowcaseItem(

            key: buttonKey,
            tooltip: const ToolTip(toolTipMessage: "button", toolTipType: ToolTipType.cloud),
          ),
          ShowcaseItem(
            key: menuKey,
            tooltip: const ToolTip(
              toolTipType: ToolTipType.bubble,
              toolTipMessage: "drawer", toolTipStyle: ToolTipStyle(backgroundColor: Colors.green)),
          ),
        ],
        child: Scaffold(
          appBar: AppBar(
            actions: [
              IconButton(
                key: menuKey,
                icon: Icon(Icons.menu),
                onPressed: () {},
              ),
            ],
          ),
          body: Center(
            child: ElevatedButton(
              key: buttonKey,
              onPressed: () {},
              child: Text('Start'),
            ),
          ),
        ),
      
    );
  }
}
6
likes
140
points
96
downloads

Publisher

unverified uploader

Weekly Downloads

A package to guide users through tutorials with animated hands.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, logger

More

Packages that depend on peckish_animated_hand_tutorial