tag_form_field 0.0.2 copy "tag_form_field: ^0.0.2" to clipboard
tag_form_field: ^0.0.2 copied to clipboard

TagFormField is a customizable Flutter widget that allows users to input and display tags in a form field.

example/lib/main.dart

import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:tag_form_field/tag_field.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Tag Field'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Container(
          margin: const EdgeInsets.all(16.0),
          child: TagFormField(
            decoration: const InputDecoration(
              hintText: 'Enter TAG separate with comma (,)',
            ),
            onValueChanged: (value) {
              log('$value');
            },
          ),
        ),
      ),
    );
  }
}
0
likes
160
points
28
downloads

Publisher

verified publisherredlinesoft.net

Weekly Downloads

TagFormField is a customizable Flutter widget that allows users to input and display tags in a form field.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on tag_form_field