and_game 1.0.1 copy "and_game: ^1.0.1" to clipboard
and_game: ^1.0.1 copied to clipboard

A dart package to append either & or and at the end of a List.

And Game #

A dart package to append either & or and at the end of a List.

Features #

  • Appends & or and at the end of the list.
  • Available as method or extension.
  • Both dart & flutter projects are supported.

Getting started #

Add it under dependencies to pubspec.yaml to use it.

Usage #

import 'package:and_game/and_game.dart';

void main() {
  final input = ['Jalebi', 'Fafda', 'Dhokla'];

  // using method
  print(
    AndGame.parse(
      input,
      andGameSymbol: AndGameSymbol.ampersand,
    ),
  ); // Jalebi, Fafda, & Dhokla
  print(
    AndGame.parse(
      input,
      andGameSymbol: AndGameSymbol.and,
    ),
  ); // Jalebi, Fafda, and Dhokla
  print(AndGame.parse(input)); // Jalebi, Fafda, and Dhokla

  // using extension
  print(
    input.andGameParse(
      andGameSymbol: AndGameSymbol.ampersand,
    ),
  ); // Jalebi, Fafda, & Dhokla
  print(
    input.andGameParse(
      andGameSymbol: AndGameSymbol.and,
    ),
  ); // Jalebi, Fafda, and Dhokla
  print(input.andGameParse()); // Jalebi, Fafda, and Dhokla
}

Additional information #

Inspired by and-game created by Apoorv Taneja. Enjoy :P

1
likes
160
pub points
0%
popularity

Publisher

unverified uploader

A dart package to append either & or and at the end of a List.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on and_game