animated_mouse_cursor
This Flutter package create beautiful custom mouse cursor on flutter web
Demo
Installation
Add this to your pubspec.yaml
file:
dependencies:
animated_mouse_cursor: <latest-version>
or
flutter pub add animated_mouse_cursor
Implementation
Import the package in your Dart file:
import 'package:animated_mouse_cursor/animated_mouse_cursor.dart';
Usage
The AnimatedCursor widget allows you to create a defualt cursor for your mouse you can wrap this widget in MaterialApp
or a single Widget
.
MaterialApp(
title: 'Animated Cursor Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true),
home: const AnimatedCursor(
enableBlendMask: false,
child: MyHomePage(title: 'Animated Cursor Demo')));
The AnimatedCursorMouseRegion widget create a custom animation for your selected widget by wraping that widget.
AnimatedCursorMouseRegion(
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
child: Text(
'custom effect to cursor',
style: Theme.of(context).textTheme.headlineMedium,
),
),