custom_text_view 1.0.1 copy "custom_text_view: ^1.0.1" to clipboard
custom_text_view: ^1.0.1 copied to clipboard

A customizable TextView widget for Flutter with font styling, padding, and layout support.

custom_text_view #

A lightweight, highly customizable TextViewWidget for Flutter, designed to reduce boilerplate when styling text. It supports font styling, spacing, alignment, overflow control, padding, and fixed dimensions.


✨ Features #

  • ✅ Set text color, size, weight, and style
  • ✅ Apply custom font families and line height
  • ✅ Add padding and fixed width/height to the text container
  • ✅ Control max lines, text overflow, and alignment
  • ✅ Clean and reusable widget for scalable UI code

📦 Installation #

Add to your pubspec.yaml:

dependencies:
  custom_text_view: ^1.0.0
  • flutter pub get

  • import 'package:custom_text_view/custom_text_view.dart';

  • Example

    TextViewWidget(
    text: "Welcome to custom_text_view!",
    fontSize: 16,
    textColor: Colors.blueGrey,
    fontWeight: FontWeight.w600,
    textAlign: TextAlign.center,
    fontFamily: 'Roboto',
    maxLines: 2,
    overflow: TextOverflow.ellipsis,
    paddingEdgeInsets: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
    sizedBoxWidth: 200,
    sizedBoxHeight: 50,
    fontStyle: FontStyle.italic,
    letterSpacing: 1.2,
    lineHeight: 1.5,
    )
    
  | Parameter           | Type            | Default           | Description                  |
  | ------------------- | --------------- | ----------------- | ---------------------------- |
  | `text`              | `String`        | *(required)*      | The main text to display     |
  | `textColor`         | `Color`         | `Colors.black`    | Color of the text            |
  | `fontWeight`        | `FontWeight`    | `FontWeight.w700` | Weight of the font           |
  | `fontFamily`        | `String?`       | `null`            | Optional font family         |
  | `fontSize`          | `double?`       | `14`              | Font size                    |
  | `overflow`          | `TextOverflow?` | `null`            | Text overflow strategy       |
  | `textAlign`         | `TextAlign?`    | `null`            | Text alignment               |
  | `maxLines`          | `int?`          | `null`            | Max number of lines          |
  | `paddingEdgeInsets` | `EdgeInsets`    | `EdgeInsets.zero` | Padding around the text      |
  | `sizedBoxWidth`     | `double?`       | `null`            | Width of the text container  |
  | `sizedBoxHeight`    | `double?`       | `null`            | Height of the text container |
  | `fontStyle`         | `FontStyle?`    | `null`            | Font style (e.g., italic)    |
  | `letterSpacing`     | `double?`       | `null`            | Space between letters        |
  | `lineHeight`        | `double?`       | `null`            | Line height multiplier       |

2
likes
140
points
37
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable TextView widget for Flutter with font styling, padding, and layout support.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on custom_text_view