and_game 1.0.1 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
&
orand
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