Features

Simple text styles can be implemented instantly. Used Material Design3 Typography. -> https://m3.material.io/styles/typography/type-scale-tokens

Basic Properties:

  • display
  • headline
  • title
  • body
  • caption
  • button
  • overline

Getting started

In your flutter project add the dependency:

dependencies: 
  instant_text_styles: ^<version>

Import package:

import 'package:instant_text_styles/instant_text_styles.dart';

Usage

The simplest example:

Text('Title Large', style: TextStyles.title.large),

Example of changing colors:

Text('Title Large Black', style: TextStyles.title.black),
Text('Title Large White', style: TextStyles.title.white),

Example of changing color according to status:

//Color(0xFF34C759)
Text('Success!!', style: TextStyles.body.success),

//Color(0xFFFF3B30)
Text('Error!!', style: TextStyles.body.error),

//Color(0xFFFF9500)
Text('Warning!!', style: TextStyles.body.warning),

Example of text decoration:

// Draw a line underneath each line of text
Text('Underline', style: TextStyles.body.underline),

// Draw a line through each line of text
Text('LineThrough', style: TextStyles.body.lineThrough),

// Draw a line above each line of text
Text('Overline', style: TextStyles.body.overline),

If you want to adjust parameters:

Text('Use copyWith', style: TextStyles.body.copyWith(color: Colors.amber)),