Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piedcipher/and_game
:end: A dart package to append either `&` or `and` at the end of a List.
https://github.com/piedcipher/and_game
dart flutter
Last synced: about 1 month ago
JSON representation
:end: A dart package to append either `&` or `and` at the end of a List.
- Host: GitHub
- URL: https://github.com/piedcipher/and_game
- Owner: piedcipher
- License: mit
- Created: 2021-09-21T14:01:32.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-21T23:37:58.000Z (about 3 years ago)
- Last Synced: 2024-10-08T14:22:09.163Z (about 1 month ago)
- Topics: dart, flutter
- Language: Dart
- Homepage: https://pub.dev/packages/and_game
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```dart
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](https://twitter.com/apoorv_taneja/status/1440030799579938821?s=20) created by [Apoorv Taneja](https://github.com/plxity). Enjoy :P