lorem_cutesum

A Flutter package for obtaining cute baby animal image url strings and lorem ipsum styled filler text.

cute black kitten

Getting Started

This project is intended to allow developers of Flutter apps, during the design phase and beyond, the opportunity to have fun with their placeholder text and images.

Lorem Cutesum gifts users with the opportunity to get a copyright-free image url String of an adorable baby animal with the call of a static method.

Need filler text? You can get a single word, a sentence, or a paragraphs worth of words consisting of the actual names of baby animals, like puggles, piglets, and pups!

What constructors / methods / constants are in the API?

  • Current features:
    • randomImageUrl() static method, which returns a random copyright-free image url String of a cute animal baby
    • loremCutesum({int words = 10}) static method, which returns a formatted String with a randomly selected number of animal baby names:
      • dependent on the int value passed to the optional named parameter
      • default optional named parameter assigned a value of 10
      • formatted String begins with an Uppercase letter, and ends with a period
  • Current limitations:
    • static image url list contains only 100 entries
    • static animal baby name list is also limited in choice
  • Improvements planned for next release:
    • add to the list of baby animal images and nbaby animal names
    • expose a method for returning a random list of images, based on user input

How do I use Lorem Cutesum?

First, incorporate this plugin into your Flutter project by adding it as a dependency to your app's pubspec.yaml file:

name: example
description: A Flutter app.

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2

  lorem_cutesum: ^1.0.0

You can also reference the git repo directly if you want:

dependencies:
    lorem_cutesum:
        git: git://github.com/JDVila/lorem_cutesum.git

You should then run flutter packages upgrade or update your packages in your IDE.

Next, import the package into your app:

import 'package:lorem_cutesum/lorem_cutesum.dart';

Then, call the necessary methods statically from the Cutesum class - for example:

Image.network(Cutesum.randomImageUrl());

Text(${Cutesum.loremCutesum(words: 50)});

For more examples, check out the sample app in the example directory within this repository.

License

MIT License, Copyright (c) 2019 Jose Vila. You're a wizard, Harry.

Libraries

lorem_cutesum