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

A Flutter package that provides an advanced tooltip with custom positioning, styling, animations, extended display durations, and optional background blurring. This widget can be used to replace the d [...]

example/main.dart

import 'package:feature_tooltip/src/feature_tooltip.dart';
import 'package:flutter/material.dart';

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

/// Demonstrates the usage of [FeatureTooltip].
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'FeatureTooltip Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('FeatureTooltip Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            FeatureTooltip(
              message: 'This tooltip appears above. Tap to toggle.',
              direction: TooltipDirection.up,
              triggerMode: ToolTipTriggerMode.tap,
              backgroundColor: Colors.black87,
              borderRadius: BorderRadius.circular(8),
              displayDuration: const Duration(seconds: 3),
              child: const Icon(Icons.info, size: 32),
            ),
            const SizedBox(height: 40),
            FeatureTooltip(
              content: Row(
                mainAxisSize: MainAxisSize.min,
                children: const [
                  Icon(Icons.star, color: Colors.yellow),
                  SizedBox(width: 4),
                  Text(
                    'Custom content with blur',
                    style: TextStyle(color: Colors.white),
                  ),
                ],
              ),
              direction: TooltipDirection.down,
              triggerMode: ToolTipTriggerMode.longPress,
              backgroundColor: Colors.deepPurple,
              blurBackground: true,
              arrowWidth: 16,
              arrowLength: 12,
              child: const Text(
                'Long press me',
                style: TextStyle(fontSize: 18),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
6
likes
150
points
11
downloads

Publisher

verified publisherjatinchaudhary.com

Weekly Downloads

A Flutter package that provides an advanced tooltip with custom positioning, styling, animations, extended display durations, and optional background blurring. This widget can be used to replace the default Tooltip widget and offers more flexibility for building tooltips in your apps.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on feature_tooltip