GithubHelp home page GithubHelp logo

danger-ahead / simple_chips_input Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 10.0 5.49 MB

Flutter chips. Demo: https://simplechipsinput.vercel.app

Home Page: https://pub.dev/packages/simple_chips_input

License: MIT License

Kotlin 0.17% Swift 1.38% Objective-C 0.05% Dart 46.96% CMake 22.42% C++ 25.06% C 1.70% HTML 2.25%
dart dart-package dartlang flutter flutter-package package chips chip-select input-chips hacktoberfest

simple_chips_input's Introduction

simple_chips_input

Features ๐Ÿš€

The working screen captures might be outdated.

Please refer to the demo: https://simplechipsinput.vercel.app

  • Create chips from user's text input and get the value after form submission.
  • Select chips and get the values of the selection.
  • Select only one chip at a time and get the value (acts as a toggle/radio button).
  • Ability to keep some/all/none pre-selected chips (that can be later changed according to user input).
  • Full customisability of the chips - keeping prefix/suffix icons (that can be changed when a particular chip is selected).
  • Full customisability of the chips design - change the background color, border color, text color, etc of the chips (can be two sets of designs - one for selected chips and one for unselected chips).
  • Much more!

Contents ๐Ÿ“š

  • Create chips from user's text input and get the value after form submission. Read the API reference for full documentation.
  • Select pre-defined chips to get the value of selected chips. Read the API reference for full documentation.

Importing the package โฌ‡๏ธ

import 'package:simple_chips_input/simple_chips_input.dart';
import 'package:simple_chips_input/select_chips_input.dart';

Working โš™๏ธ

For example usage, refer pub.dev example

Author

@danger-ahead

simple_chips_input's People

Contributors

danger-ahead avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

simple_chips_input's Issues

UI design

Hi, I would like to give some UI design for this app using Figma.
Figma is a designing tool where web and app designs can be created.

Update README with all the features

Go through the code in /lib/src/simple_chips_input.dart and /lib/src/text_form_field_style.dart. And list all the features currently available in README.md by means of checkboxes.

How to init value?

SimpleChipsInput(
paddingInsideWidgetContainer: const EdgeInsets.symmetric(horizontal: 16, vertical: 5),
formKey: formKeyEmail,
textFormFieldStyle: TextFormFieldStyle(keyboardType: TextInputType.emailAddress, cursorColor: Theme.of(context).primaryColor),
separatorCharacter: ",",
validateInput: true,
validateInputMethod: (String value) {
final emailRegExp = RegExp(r'^[\w-.]+@([\w-]+.)+[\w-]{2,4}$');
if (!emailRegExp.hasMatch(value)) {
return 'Enter a valid email address';
}
},
onChanged: (value) {},
onSubmitted: (p0) {},
onChipDeleted: (p0, p1) {},
onSaved: ((p0) {
onChangeEmail!(p0);
}),
chipTextStyle: text14(context),
deleteIcon: Padding(
padding: const EdgeInsets.only(left: 5),
child: CircleAvatar(
maxRadius: 10,
backgroundColor: Theme.of(context).bgColor8063(context),
child: const Icon(Icons.close_rounded, size: 14.0, color: Colors.white),
),
),
marginBetweenChips: const EdgeInsets.symmetric(vertical: 4),
widgetContainerDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
border: Border.all(color: Theme.of(context).bgColorCC3A(context)),
),
chipContainerDecoration: BoxDecoration(
color: Theme.of(context).bgColorB356(context).withOpacity(0.2),
borderRadius: BorderRadius.circular(30.0),
),
placeChipsSectionAbove: true,
),

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.