Skip to content

Get started with Style

Inspired by the famous TailwindCSS library, Style is a better way to customize the UI appearence of your Flutter widgets.

  1. Include the dependency in your pubspec.yaml:

    pubspec.yaml
    dependencies:
    style:
    hosted: https://pub.mariuti.com
    version: ^1.0.0 # Replace with the latest version
  2. Add style_lint to your analysis_options.yaml:

    analysis_options.yaml
    plugins:
    style_lint:
    hosted: https://pub.mariuti.com
    version: ^1.0.0 # Replace with the latest version

    style_lint flags unknown classes and variants as you type and gives you the “Wrap with Style” and “Style: Sort classes” assists.

  3. Import the library in your dart files:

    main.dart
    import 'package:style/style.dart';
  4. Use it in your widgets.

    main.dart
    Style('text-2xl font-medium', child: Text('Hello from Style')),