Lain — Flutter Practicals CLI
Lain is a small Python command-line tool that generates Dart source files for the 11 highlighted Flutter practicals.
Included practicals
- Hello World & Flutter setup
- StatefulWidget lifecycle
- Navigator.push() and Navigator.pop()
- Parent-child state management
- Login form and validation
- Popup menu
- DropdownButton with dynamic data
- GridView
- ListView with custom widgets
- Expanded and Flexible
- Audio playback
- GestureDetector and button callbacks
Install locally
From this project directory:
python -m pip install .
Or install in editable/development mode:
python -m pip install -e .
Run
lain
Choose a practical number. Lain writes a Dart file into the current working directory, for example practical_16.dart.
Other commands
lain --list
lain --show 16
lain --output ./generated
To write the selected practical directly into an existing Flutter project's lib/main.dart, run lain --flutter from the Flutter project root. Lain checks for pubspec.yaml and asks before overwriting lib/main.dart.
Practical 20 setup
The audio practical uses the audioplayers Flutter plugin and an audio asset. Add this to the Flutter project's pubspec.yaml:
dependencies:
flutter:
sdk: flutter
audioplayers: ^6.0.0
flutter:
assets:
- assets/audio/music.mp3
Place an audio file at assets/audio/music.mp3, then run:
flutter pub get
The generated Dart file is named practical_20.dart. For plugin-based practicals, additional Flutter dependencies and assets may be required; see comments in the generated file.
Development
python -m pip install -e .
lain --list
License
MIT
Metadata
Release files for lain-flutter-practicals 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lain_flutter_practicals-0.2.0.tar.gz | 9.4 kB | Without provenance | Details for lain_flutter_practicals-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lain_flutter_practicals-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for lain_flutter_practicals-0.2.0-py3-none-any.whl |
Total release size: 24.0 kB
Release files / lain_flutter_practicals-0.2.0.tar.gz
| Download URL | lain_flutter_practicals-0.2.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23cb2a7f54d260045580a33b435c9e3b6d65e1c68519e1b0c002999d20aeaf75
|
|
BLAKE2b-256 checksum How to use checksums |
0112cb7cfd2de1fe33d4796722da3317c477dd6f21fe7b9bfc9656255e75ecce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / lain_flutter_practicals-0.2.0-py3-none-any.whl
| Download URL | lain_flutter_practicals-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a89b5f8a79fba12fe8335f8720dc5d57bcfce04895a40ef27c752de49cfe44c
|
|
BLAKE2b-256 checksum How to use checksums |
6e7c0272e89912b6aa972546d3c5af108c235634706c113d5b0ff30183c14847
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for lain-flutter-practicals 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.