astextfield 0.0.9

  • Readme
  • Changelog
  • Installing
  • 56

astextfield #

Creating UITextField Package for use globally

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Example #

//Initialize TextEditingController
var userName = TextEditingController();

//Define validator
String validateName(String value) {
     if (value.length == 0) {
       return enterUserName;
     return null;

//Input formatter for name text field
List<TextInputFormatter> nameInputFormatter = [

   final userNameField = ASTextField(
       "User name",                             //Required hint name
       'assets/images/ic_user.png',             //Required prefix icon path
       userName,                                //Required TextEditingController
       validateName,                            //Required validator
       keyboardType: InputType.normal,          //Optional Keyboard type
       currentFocus: focusUserName,             //Optional current focus
       nextFocus: focusEmail,                   //Optional next focus
       txtInputFormatter: nameInputFormatter,   //Optional Input formatter
       keyboardAction: InputAction.done,        //Optional Keyboard action next/done
       txtColor:,                  //Optional text colors
       txtFontFamily: "Roboto",                 //Optional text font family 
       txtFontSize: 20,                         //Optional text font size 
       txtErrorFontStyle: FontStyle.normal,     //Optional text font style 
       txtErrorFontWeight: FontWeight.normal,   //Optional text font weight 
       txtErrorColor:,              //Optional text error color 
       txtHintColor: Colors.grey);              //Optional text hint color 

[0.0.1] - 24/03/2020 #

  • Custom textField Library Written in dart.

[0.0.2] - 26/03/2020 #

  • Provide more arguments for Keyboard and colorcode

[0.0.3] - 27/03/2020 #

  • Added Validation for Textfield

[0.0.4] - 27/03/2020 #

  • Changed Typo

[0.0.5] - 06/04/2020 #

  • Added custom style
  • Added Dynamic validator for ASTextfield
  • Setup of text field input type method and constructor
  • Removed General function and Constant from ASTextfield

[0.0.6] - 06/04/2020 #

  • Solved error

[0.0.7] - 27/04/2020 #

  • Added Next and Done actions to Keyboard.
  • Now can specify Custom Text Style, hint and error text.

[0.0.8] - 28/04/2020 #

  • Now can specify input formatter to textfield

[0.0.9] - 14/05/2020 #

  • Updated readme file.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  astextfield: ^0.0.9

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:astextfield/astextfield.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [astextfield] that is in a package requiring null.

Health suggestions

Fix lib/astextfield.dart. (-0.50 points)

Analysis of lib/astextfield.dart reported 1 hint:

line 8 col 7: This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: ASTextField.txtColor, ASTextField.txtHintColor, ASTextField.txtErrorColor, ASTextField.keyboardType, ASTextField.txtValidator, ASTextField.txtInputFormatter, ASTextField.txtFontFamily, ASTextField.txtHintFontFamily, ASTextField.txtErrorFontFamily, ASTextField.txtFontWeight, ASTextField.txtHintFontWeight, ASTextField.txtErrorFontWeight, ASTextField.txtFontStyle, ASTextField.txtHintFontStyle, ASTextField.txtErrorFontStyle, ASTextField.txtFontSize, ASTextField.txtHintFontSize, ASTextField.txtErrorFontSize, ASTextField.keyboardAction, ASTextField.currentFocus, ASTextField.nextFocus, ASTextField.defaultTxtColor, ASTextField.defaultHintColor, ASTextField.defaultErrorColor

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

The package description is too short. (-15 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and astextfield.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies