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:

  instant_text_styles: ^<version>

Import package:

import 'package:instant_text_styles/instant_text_styles.dart';


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:

Text('Success!!', style: TextStyles.body.success),

Text('Error!!', style: TextStyles.body.error),

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)),