custom_text_view 1.0.0
custom_text_view: ^1.0.0 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 textString(required) The main text to display textColorColorColors.blackColor of the text fontWeightFontWeightFontWeight.w700Weight of the font fontFamilyString?nullOptional font family fontSizedouble?14Font size overflowTextOverflow?nullText overflow strategy textAlignTextAlign?nullText alignment maxLinesint?nullMax number of lines paddingEdgeInsetsEdgeInsetsEdgeInsets.zeroPadding around the text sizedBoxWidthdouble?nullWidth of the text container sizedBoxHeightdouble?nullHeight of the text container fontStyleFontStyle?nullFont style (e.g., italic) letterSpacingdouble?nullSpace between letters lineHeightdouble?nullLine height multiplier