dialog_spinner 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 69

dialog_spinner #

A Flutter package to make dialog mode of spinner in android available in flutter

Installing #

Example #

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

void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
  final List<String> spinnerList = ["Item 1", "Item 2","Item 3", "Item 4", "Item 5"];

  @override
  State<StatefulWidget> createState() {
    return _MyAppState();
  }
}

class _MyAppState extends State<MyApp> {
  String currentItem;

  @override
  void initState() {
    super.initState();
    currentItem = widget.spinnerList[0];
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Dialog Spinner Example"),
      ),
      body: Column(
        children: <Widget>[
          DialogSpinner(
            spinnerList: widget.spinnerList,
            onValueChanged: (int index) {
              setState(() {
                currentItem = widget.spinnerList[index];
              });
            },
          ),
          Expanded(
            child: Center(
              child: Text(
                currentItem + " is selected.",
              ),
            ),
          )
        ],
      ),
    );
  }
}

[0.0.1]

  • Initial Release

[0.1.0]

  • Improved spinner styling features

[0.1.1]

  • Added example in recomended format

[0.1.2]

  • Updated README.md and example/README.md

[0.1.3]

  • Updated link in README.md

example/README.md

Dialog Spinner Example #

An example flutter project to show working of package dialog_spinner.

Using this example #

  • Download example project or use following code in your project.

Example #

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

void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
  final List<String> spinnerList = ["Item 1", "Item 2","Item 3", "Item 4", "Item 5"];

  @override
  State<StatefulWidget> createState() {
    return _MyAppState();
  }
}

class _MyAppState extends State<MyApp> {
  String currentItem;

  @override
  void initState() {
    super.initState();
    currentItem = widget.spinnerList[0];
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Dialog Spinner Example"),
      ),
      body: Column(
        children: <Widget>[
          DialogSpinner(
            spinnerList: widget.spinnerList,
            onValueChanged: (int index) {
              setState(() {
                currentItem = widget.spinnerList[index];
              });
            },
          ),
          Expanded(
            child: Center(
              child: Text(
                currentItem + " is selected.",
              ),
            ),
          )
        ],
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  dialog_spinner: ^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:dialog_spinner/dialog_spinner.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
37
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
69
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test