ellipsis_overflow_text 1.0.1+1 copy "ellipsis_overflow_text: ^1.0.1+1" to clipboard
ellipsis_overflow_text: ^1.0.1+1 copied to clipboard

Flutter widget that automatically sets the number of lines to be shown on a text with the Ellipsis text overflow type.

example/main.dart

import 'package:ellipsis_overflow_text/ellipsis_overflow_text.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const App());
}

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final size = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: Colors.black,
      body: Center(
        child: Container(
          width: size.width * .3,
          height: size.height * .25,
          color: Colors.white,
          child: const EllipsisOverflowText(
            'This string will automatically fit within the bounds of the container.',
            style: TextStyle(color: Colors.white),
          ),
        ),
      ),
    );
  }
}
7
likes
150
points
13
downloads

Publisher

verified publisherreikodev.com

Weekly Downloads

Flutter widget that automatically sets the number of lines to be shown on a text with the Ellipsis text overflow type.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ellipsis_overflow_text