awesome_style_field 0.0.5 copy "awesome_style_field: ^0.0.5" to clipboard
awesome_style_field: ^0.0.5 copied to clipboard

Awesome Text Field With Rich text !!

🌈 Awesome Style Field #

IMB_y1h90e

Features #

  • AwesomeStyleField
  • AwesomeStyleFormField
  • AwesomeTextController
  • AwesomeKeyword

Support Platforms #

  • Flutter Android
  • Flutter iOS
  • Flutter Web
  • Flutter Desktop

IMB_IcS3h3


Usage #

Add the package to pubspec.yaml

dependencies:
  awesome_style_field: ^<latest-version>

After that import the package

import 'package:awesome_style_field/awesome_style_field.dart';

TextField or TextFormField #

  • AwsomeStyleField is inherited from TextField.
  • AwsomeStyleFormField is inherited from TextFormField.
  • Tags and style, added to AwsomeStyleField and AwsomeStyleFormField, can be customised.

New Parameters #

  • AwesomeTextController is inherited from TextEditingController.
  • List<AwesomeKeyword> is for your awesome styles !
  final AwesomeTextController? controller;
  final List<AwesomeKeyword>? keywords;

AwesomeKeyword #

  • Your keyword is passed to text parameter which is required.
  • Your own style is passed to style parameter which is optional. Without passing, your style will be set as parent style.
  • isDuplicate sets whether or not to duplicate style. (Default value allows duplication.)
  • isLetterCase enables upper or lower case to be separated. (Default value is not case-sensitive.)
class AwesomeKeyword {
  final String text;
  final TextStyle? style;
  final bool isDuplicate;
  final bool isLetterCase;

  const AwesomeKeyword({
    required this.text,
    this.style,
    this.isDuplicate = true,
    this.isLetterCase = true,
  });
}

AwesomeTextController #

AwesomeTextController controller = AwesomeTextController(initValue: "Tyger");

Example #

IMB_j8IGEq

Tags #

  • You add AwesomeKeyword class including style and tags to list.
List<AwesomeKeyword> keywords = [
  AwesomeKeyword(
    text: "Created",
    style: TextStyle(
      color: Colors.indigo,
      fontWeight: FontWeight.bold,
    ),
  ),
  AwesomeKeyword(
    text: "Tyger",
    style: TextStyle(
      color: Colors.pink,
      fontWeight: FontWeight.bold,
    ),
  ),
],

Style #

  • You create your own style.
AwesomeKeyword(
  text: "Created",
  style: TextStyle(
    color: Colors.limeAccent,
    fontSize: 24,
    fontStyle: FontStyle.italic,
    fontWeight: FontWeight.bold,
  ),
),

isDupicate #

IMB_YSLyVK

isLetterCase #

IMB_8rpj3m

Created by Tyger Github

10
likes
120
pub points
26%
popularity

Publisher

unverified uploader

Awesome Text Field With Rich text !!

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on awesome_style_field