apptomate_custom_tooltip 0.0.1
apptomate_custom_tooltip: ^0.0.1 copied to clipboard
A highly customizable and interactive tooltip widget for Flutter applications with smooth animations and flexible styling options.
example/lib/main.dart
import 'package:apptomate_custom_tooltip/apptomate_custom_tooltip.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const CustomToolTipWidget(),
);
}
}
class CustomToolTipWidget extends StatelessWidget {
const CustomToolTipWidget({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Custom ToolTip'),
centerTitle: true,
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CustomToolTip(
message: 'This is a custom tooltip with long text that wraps properly',
backgroundColor: Colors.deepPurple,
textStyle: const TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.bold,
),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
borderRadius: 12.0,
arrowColor: Colors.deepPurple,
showDuration: const Duration(seconds: 3),
waitDuration: const Duration(milliseconds: 500),
child: ElevatedButton(
onPressed: () {},
child: const Text('Hover or Long press'),
),
),
const SizedBox(height: 20),
CustomToolTip(
message: 'Another tooltip example',
child: const Icon(Icons.info, size: 40),
),
],
),
),
);
}
}