Metadata-Version: 2.4
Name: lain-flutter-practicals
Version: 0.2.0
Summary: A CLI tool that generates Dart files for 11 highlighted Flutter practicals.
Author: Lain
License: MIT
Keywords: flutter,dart,practical,education,cli
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Environment :: Console
Classifier: Topic :: Education
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

1. Hello World & Flutter setup
3. StatefulWidget lifecycle
4. Navigator.push() and Navigator.pop()
6. Parent-child state management
9. Login form and validation
11. Popup menu
13. DropdownButton with dynamic data
16. GridView
17. ListView with custom widgets
19. Expanded and Flexible
20. Audio playback
21. GestureDetector and button callbacks

## Install locally

From this project directory:

```bash
python -m pip install .
```

Or install in editable/development mode:

```bash
python -m pip install -e .
```

## Run

```bash
lain
```

Choose a practical number. Lain writes a Dart file into the current working directory, for example `practical_16.dart`.

## Other commands

```bash
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`:

```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:

```bash
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

```bash
python -m pip install -e .
lain --list
```

## License

MIT
