animated_mouse_cursor 1.1.0 copy "animated_mouse_cursor: ^1.1.0" to clipboard
animated_mouse_cursor: ^1.1.0 copied to clipboard

Platformweb

Flutter package for using custom mouse cursor on flutter web

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:animated_mouse_cursor/animated_mouse_cursor.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(
      title: 'Animated Cursor Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Animated Cursor Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return AnimatedMouseCursor(
      child: Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: Text(widget.title),
        ),
        body: Center(
          child: Text(
            "Animated cursor",
            style: Theme.of(context).textTheme.titleLarge,
          ),
        ),
      ),
    );
  }
}