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

GitHub 代码仓What-the-Flutter/wtf_rotary_dial

wtf_rotary_dial

What-the-Flutter/wtf_rotary_dial open-source repository details.

wtf_rotary_dial 项目封面
星标
4
复刻
0
最近推送(UTC)
2023年4月6日
项目状态
未归档

原始 README

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

Rotary Dial

A Widget that allows you to dial numbers by rotating the dial.

demo1

Click here to view the full example.

Inspired by this.

Installing

Add it to your pubspec.yaml file:

dependencies:
  wtf_rotary_dial: ^0.1.0

Install packages from the command line

flutter pub get

If you like this package, consider supporting it by giving it a star on GitHub and a like on pub.dev ❤️

Usage

You can use the Rotary Dial widget in the following way:

@override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'WTF Rotary Dial',
      home: Scaffold(
        body: Center(
          child: RotaryDial(
            onDigitSelected: (value) {
              // The value is entered number.
            },
            rotaryDialThemeData: RotaryDialThemeData(
              spinnerColor: const Color(0xFFFFFFFF),
              rotaryDialColor: const Color(0xFF1871F0),
              dialColor: const Color(0xFF529AFF),
              numberColor: const Color(0xFFFFFFFF),
              margin: null,
              dialBorderRadius: null,
            ),
            duration: const Duration(milliseconds: 500),
            curve: Curves.decelerate,
          ),
        ),
      ),
    );
  }
Result:

demo1

Theme

You can customize the widget to your liking. There is a helper RotaryDialThemeData class for this.

Parameter Description
rotaryDialColor This parameter is responsible for assigning the color of the main circle.
spinnerColor This parameter is responsible for assigning the color of the rotating part.
dialColor This parameter is responsible for assigning the color of the circle inside which the number is located.
numberColor This parameter is responsible for assigning the color of numbers.
margin This parameter is responsible for setting the outer padding.
dialBorderRadius This parameter is responsible for assigning the radius of the circle inside which the number is located.
flutter.wtf GitHub avatar
GitHub 作者

flutter.wtf ↗

Leading Flutter development agency 🚀

flutter.wtfTallinn
语言DartC++CMakeHTMLCSwiftKotlinObjective-C

使用的依赖

依赖清单 2 项

  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

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

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

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

来源与维护

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

GitHub Docs — About repositories ↗