Giter Site home page Giter Site logo

imsujan276 / flutter_input_chips Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 3.0 920 KB

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

License: MIT License

Kotlin 0.23% Swift 2.19% Objective-C 0.07% Dart 16.46% CMake 35.34% C++ 39.57% C 2.70% HTML 3.44%

flutter_input_chips's Introduction

flutter_input_chips

FlutterInputChips is a Flutter widget that builds the input field with input chips options

Pub Version GitHub

Demo

Demo

Import

import 'package:flutter_input_chips/flutter_input_chips.dart';

Example

import 'package:flutter_input_chips/flutter_input_chips.dart';


FlutterInputChips(
    initialValue: const [],
    maxChips: 5,
    onChanged: (v) {
        setState(() {
            values = v;
        });
    },
    padding: const EdgeInsets.all(10),
    decoration: BoxDecoration(
        border: Border.all(color: Colors.grey),
        borderRadius: BorderRadius.circular(10),
        ),
    inputDecoration: const InputDecoration(
        border: InputBorder.none,
        hintText: "Enter text here",
    ),
    chipTextStyle: const TextStyle(
        fontWeight: FontWeight.bold,
        color: Colors.white,
    ),
    chipSpacing: 8,
    chipDeleteIconColor: Colors.white,
    chipBackgroundColor: Colors.blueGrey,
),

Available properties

  /// list of Strings to prepopulate the chips with
  final List<String> initialValue;

  /// returns a list of string on inout field submitted
  final ValueChanged<List<String>> onChanged;

  /// number of maximum chips
  final int? maxChips;

  /// enables the input field and chip delete ability
  final bool enabled;

  /// inout field action
  final TextInputAction inputAction;

  /// keyboard appearance
  final Brightness keyboardAppearance;

  /// autofocus the inout field
  final bool autofocus;

  /// text capitalization type for the input field keyboard
  final TextCapitalization textCapitalization;

  /// text input decoration
  final InputDecoration inputDecoration;

  /// text overflow behaviour
  final TextOverflow textOverflow;

  /// keyboard input type
  final TextInputType inputType;

  /// parent container padding
  final EdgeInsets padding;
  
  /// padding container decoration
  final BoxDecoration? decoration;

  /// spacing between chips
  final double chipSpacing;
  // style for chip text/label
  final TextStyle? chipTextStyle;

  /// backhround color of the chip
  final Color? chipBackgroundColor;

  /// custom delete icon
  final Widget? chipDeleteIcon;

  /// if true, displays a delete icon in the chip
  final bool chipCanDelete;

  /// Color for delete icon in the chip
  final Color? chipDeleteIconColor;

Support

If you lik this package. Feel free to create pull request or report issues.

flutter_input_chips's People

Stargazers

sphynxlee avatar

Watchers

Sujan Gainju avatar

flutter_input_chips's Issues

Add chip via an

I have a custom implementation for your widget. Instead of pressing the Submit from keyboard, there will be a list of items just below the field.

However, I am not sure how to add them as chips when the user taps on the items on the list.

image

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.