flutter_ellipsis_text 1.1.0 copy "flutter_ellipsis_text: ^1.1.0" to clipboard
flutter_ellipsis_text: ^1.1.0 copied to clipboard

Expandable Flutter text with a custom ellipsis, responsive layout, text scaling, and right-to-left support.

example/example.dart

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

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

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const ExamplePage(),
    );
  }
}

class ExamplePage extends StatelessWidget {
  const ExamplePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Example')),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            children: const <Widget>[
              EllipsisText(
                text:
                    "Lorem Ipsum is simply dummy text of the printing and typesetting industry. "
                    "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, "
                    "when an unknown printer took a galley of type and scrambled it to make a type specimen book. "
                    "It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",
                ellipsis: "..show more",
                maxLines: 2,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
3
likes
160
points
152
downloads

Documentation

API reference

Publisher

verified publishertyrannoapartment.com

Weekly Downloads

Expandable Flutter text with a custom ellipsis, responsive layout, text scaling, and right-to-left support.

Repository (GitHub)
View/report issues

Topics

#flutter #widget #text

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_ellipsis_text