circle_list 0.1.3

circle_list #

A new Flutter package for Circle List.

Add dependency #

dependencies:
  circle_list: ^0.1.3

Super simple to use #

import 'package:flutter/material.dart';
import 'package:circle_list/circle_list.dart';

class ShowDemoPage extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(backgroundColor: Colors.white,),
      body: Center(
        child: CircleList(
          origin: Offset(0, 0),
          children: List.generate(10, (index) {
            return Icon(
              Icons.details,
              color: index % 2 == 0 ? Colors.blue : Colors.orange,
            );
          }),
        ),
      ),
    );
  }
}

image

If you want to add gradient background #

CircleList(
          gradient: LinearGradient(
            colors: [Colors.redAccent, Colors.blueAccent],
          ),
          origin: Offset(0, 0),
          children: List.generate(10, (index) {
            return Icon(
              Icons.details,
              color: index % 2 == 0 ? Colors.blue : Colors.orange,
            );
          }),
        ),

image

Another background #

CircleList(
          innerCircleColor: Colors.redAccent,
          outerCircleColor: Colors.greenAccent,
          origin: Offset(0, 0),
          children: List.generate(10, (index) {
            return Icon(
              Icons.details,
              color: index % 2 == 0 ? Colors.blue : Colors.orange,
            );
          }),
        )

image

CenterWidget #

CircleList(
          origin: Offset(0, 0),
          children: List.generate(10, (index) {
            return Icon(
              Icons.details,
              color: index % 2 == 0 ? Colors.blue : Colors.orange,
            );
          }),
          centerWidget: ClipRRect(
              borderRadius: BorderRadius.all(Radius.circular(100)),
              child: Image.asset("images/avator.jpg")),
        ),

image

Demo #

image

The Demo Link

Params #

  • double innerRadius;
  • double outerRadius;
  • double childrenPadding:
  • double initialAngle;
  • Color outerCircleColor;
  • Color innerCircleColor;
  • Gradient gradient;
  • Offset origin;
  • List
  • bool isChildrenVertical;
  • bool outerCircleRotateWithChildren;
  • bool innerCircleRotateWithChildren;
  • bool showInitialAnimation;
  • Widget centerWidget;
  • RadialDragStart onDragStart;
  • RadialDragUpdate onDragUpdate;
  • RadialDragEnd onDragEnd;
  • AnimationSetting animationSetting;

[0.0.1] - TODO: Add release date.

[0.0.2] - fix description error

[0.0.3] - add gradient in circle

[0.0.4] - add centerWidget、circleRotateWithChildren..

[0.0.5] - fix a size crash

[0.0.6] - add initial rotate animation

[0.0.7] - cancel an animation variable

[0.0.8] - fix a big mistake

[0.0.9] - fix centerWidget's wrong location

[0.1.0] - add two param in gesture

[0.1.1] - fix a dispose error

[0.1.2] - remove drag print

[0.1.3] - fix initial angel problem

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  circle_list: ^0.1.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:circle_list/circle_list.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

We analyzed this package on Jul 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/circle_list.dart.

Run flutter format to format lib/circle_list.dart.

Format lib/radial_drag_gesture_detector.dart.

Run flutter format to format lib/radial_drag_gesture_detector.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and circle_list.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test

Admin