tailstyle 0.0.1 copy "tailstyle: ^0.0.1" to clipboard
tailstyle: ^0.0.1 copied to clipboard

Agnostic WindiCSS-style builder for prototype construction

tail-icon TailStyle #

Pub Version Github Action

Live Demo

🌼 TailStyle is a Flutter utility for speeding up Prototype Apps.

Shrink code #

Type less from the detailed code below:

Text(
  "Hello World",
  style: TextStyle(
    decoration: TextDecoration.lineThrough,
    fontSize: 20,
    fontWeight: FontWeight.bold,
  ),
);

to

TailTypo().line_through().text_xl().Text("Hello World");

And also keep friendly to Dart Formatter and Code Readability.

TailBox().mb_2().p_2().border().rounded().as((styled) {
  return styled.Container(
    child: TailTypo().line_through().text_xl().Text("Hello World"),
  );
});

Follows WindiCSS 💨 #

TailStyle model follows naming of WindiCSS and links styles between sementic keywords and flutter views as possible.

// Generate Text from Typography Style Model
TailTypo().Text("Hello World");

// Generate Container from Box Style Model
TailBox().Container(width: 100, height: 100);
// Generate SizedBox from Box Style Model
TailBox().SizedBox(width: 100, height: 100);

Extend Tail model on demand #

Since TailStyle models based on builder are plain object. You can extend them by yourself.

import 'package:flutter/widgets.dart' show Padding;
import 'package:tailstyle/tailstyle.dart';

typedef StyledPadding = Padding;

extension TailBox2PaddingExt on TailBox {
  Padding() {
    return StyledPadding(
      padding: EdgeInsets.only(
        left: paddingL ?? 0,
        top: paddingT ?? 0,
        right: paddingR ?? 0,
        bottom: paddingB ?? 0,
      ),
    );
  }
}

The case not suggested to use TailStyle #

It is not suggested to use TailStyle to replace Constant widgets.

const Text(
  "Constant Widgets for performance optimize",
  style: TextStyle(
    decoration: TextDecoration.lineThrough,
    fontSize: 16,
    fontWeight: FontWeight.bold,
  ),
);

Acknowledgement #

Github WindiCSS

0
likes
120
pub points
17%
popularity

Publisher

unverified uploader

Agnostic WindiCSS-style builder for prototype construction

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on tailstyle