4 Best Flutter Packages to Generate Lorem Ipsum and Placeholder

Lorem Ipsum is simply dummy text used in many programming applications, while placeholder is shown before rendering a widget in order to keep space. Following are the best Flutter packages which can generate lorem ispum text and set placeholder.

Lorem Ispum Packages

faker

Faker is a popular fake data generator plugin which has many implementations in different language. This is a Dart port.

var faker = new Faker();
faker.internet.email();
faker.internet.ipv6Address();
faker.internet.userName();
faker.person.prefix();
faker.person.name();
faker.lorem.sentence();

lipsum

This is a lorem ipsum text generator which is based off of Andres Araujo’s lorem-dart plugin.

Placeholder Packages

flutter_placeholder_textlines

This package can create placeholder lines that emulates text in a widget. It is useful to display remote data widgets, while waiting for them to complete loading.

PlaceholderLines(
        count: 3,
        animate: true,
        color: Colors.grey,
      )

flutter_blurhash

This shows a compact representation of a placeholder for an image. The image is encoded into a blurry image under 30 characters for instant display.

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text("BlurHash")),
        body: SizedBox.expand(
          child: Center(
            child: AspectRatio(
              aspectRatio: 1.6,
              child: BlurHash(hash: "D5H2DC-PM+pV12g-m.wH2c712POv"),
            ),
          ),
        ),
      ),
    );
  }
}

Leave a Comment

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close