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

12
likes
130
points
53
downloads

Publisher

unverified uploader

Weekly Downloads

Awesome Text Field With Rich text !!

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on awesome_style_field