easytext 0.1.8

  • Readme
  • Changelog
  • Example
  • Installing
  • new68

txt #

Avoid Text boilerplate with this awesome library full of helper constructors to create styled text easily.

Getting Started #

Include the package at your source code import 'package:easytext/easytext.dart

then #

This
Text("Hello World!!", style: TextStyle(fontWeight: FontWeight.bold))
became
Txt("Hello World!!", weight: FontWeight.bold)
or
Txt.b("Hello World!!")

And this
Text("Hello World!!", style: TextStyle(fontStyle: FontStyle.italic));
became
Txt("Hello World!!", italic: true);
or
Txt.i("Hello World!!");

And also this
Txt("Hello World!!", style: TextStyle(color: Colors.red, fontSize: 22))
became
Txt("Hello World!!", size: 22, color: Colors.red)
or
Txt.sc("Hello World!!",22, Colors.red)

Want to change just the color? Use this Txt.c("Hello World!!",Colors.red)
or just the size? Try Txt.s("Hello World!!",22).

You can also work with themes #

Where this
Txt("Hello World!!", style: Theme.of(context).textTheme.headline)
became
Txt.headline("Hello World!!")
Same for all other themes.

[0.1.8] - 03/10/2020. #

  • Documentation update

[0.1.7] - 03/10/2020. #

  • Sample file

[0.1.6] - 03/10/2020. #

  • Documentation update

[0.1.0] - 03/08/2020. #

  • Initial Release

example/README.md

Examples #

Bold Text
Txt("Hello World!!", weight: FontWeight.bold)
or
Txt.b("Hello World!!")

Italic Text
Txt("Hello World!!", italic: true);
or
Txt.i("Hello World!!");

Red text
Txt.c("Hello World!!",Colors.red)
Text with font size 22
Txt.s("Hello World!!",22)

Red text with font size 22
Txt("Hello World!!", size: 22, color: Colors.red)
or
Txt.sc("Hello World!!",22, Colors.red)

A text with headline theme
Txt.headline("Hello World!!")
Headline with custom color
Txt.headline("Hello World!!", color: Colors.red)
...and custom size
Txt.headline("Hello World!!", color: Colors.red, size: 22)

Use this package as a library

1. Depend on it

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


dependencies:
  easytext: ^0.1.8

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:easytext/easytext.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
36
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Dependencies

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