搜索插件、代码仓与 APP 分类

GitHub 代码仓DarshakDesai199/animated_cursor

animated_cursor

DarshakDesai199/animated_cursor open-source repository details.

animated_cursor 项目封面
星标
1
复刻
0
最近推送(UTC)
2024年2月8日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

Alt Text

View on GitHub View on GitHub View on Linkedin View on Github

Preview

Alt Text

Animated Cursor Package

Welcome to the Animated Cursor package for Flutter! This package provides a customizable animated cursor widget that you can easily integrate into your Flutter projects.

Installing

Add dependency to pubspec.yaml To use the latest version of animated_cursor, add the following line to your pubspec.yamlfile:

dependencies:
  animated_cursor: ^1.0.5

Install it You can install packages from the command line: with Flutter:

$ flutter pub get

Import the package

import 'package:animated_cursor/animated_cursor.dart';

Usage

AnimatedCursor
(
circleColor: Colors.red,
dotColor: Colors.red,
backgroundColor: Colors.black,
borderWidth: 2,
child: Container(color: Colors.black)
);

Properties of Animated Cursor:

Name Type Default Behaviour Description
child Widget The child widget beneath the animated cursor.
cursor MouseCursor? SystemMouseCursors.basic The cursor to be displayed when the mouse is over the child widget
circleColor Color? Color(0xFF4CAF50) Color of the animated circle.
dotColor Color? Color(0xFF4CAF50) Color of the animated dot.
backgroundColor Color? Colors.transparent Background color of the cursor.
circleDuration Duration? 100 Duration of the animated circle's appearance.
dotDuration Duration? 350 Duration of the animated dot's appearance.
borderWidth double? 1 Width of the cursor's border.
shape CursorShape? BoxShape.circle Shape of the cursor (Circle or Rectangle).
borderRadius BorderRadius? 100 Border radius for the cursor (applicable when shape is set to Rectangle).

Example

import 'package:animated_cursor/animated_cursor.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Animated Cursor',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.red,
      ),
      home: AnimatedCursor(
        // cursor: SystemMouseCursors.alias,
        circleColor: Colors.red,
        dotColor: Colors.red,
        backgroundColor: Colors.black,
        borderWidth: 1,
        child: Container(color: Colors.black),
      ),
    );
  }
}

Additional Information

👍 If you appreciate our solution's value and positive impact on your project,✨ show your support with a thumbs up! 🌟 Your feedback fuels our commitment to excellence.💫 Thank you for choosing us!

-Darshak Desai

Darshak Desai GitHub avatar
GitHub 作者

Darshak Desai ↗

Flutter Developer

语言C++CMakeDartHTMLSwiftCShellObjective-CJavaKotlinPureBasic

此仓库发布的插件

使用的依赖

依赖清单 4 项

  • flutter{"sdk":"flutter"}
  • provider^6.1.1
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_lints开发依赖^2.0.0

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗