Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
branches:
- dev
pull_request:
branches:
- main

jobs:
analyze:
name: Analyze & Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Check formatting
run: dart format --output=none --set-exit-if-changed .

- name: Analyze code
run: flutter analyze

- name: Run tests
run: flutter test

build-example:
name: Build Example
runs-on: ubuntu-latest
needs: analyze

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Get dependencies
working-directory: example
run: flutter pub get

- name: Build web
working-directory: example
run: flutter build web
56 changes: 56 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release & Publish

on:
pull_request:
types: [ closed ]
branches: [ main ]

jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Read version
id: version
run: |
VERSION=$(grep '^version:' pubspec.yaml | awk '{print $2}')
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Ensure tag does not already exist
run: |
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
echo "❌ Version already published"
exit 1
fi

- name: Install dependencies
run: flutter pub get

- name: Analyze
run: flutter analyze

- name: Dry run publish
run: flutter pub publish --dry-run

- name: Create tag
run: |
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}

- name: Publish to pub.dev
run: flutter pub publish --force
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
## 0.1.1

### Fixed
* **Physical keyboard handling** - Virtual keyboard now correctly hides when `allowPhysicalKeyboard: true`
* **Layout persistence on close** - Keyboard maintains its layout during close animation instead of resetting to default
* **Selection handling** - `insertText()` and `deleteBackward()` now properly handle text selections

### Added
* `selectAll()` method to `VirtualKeypadController` for selecting all text
* Stricter lint rules for better code quality
* Comprehensive documentation in `doc/` folder
- API Reference
- Custom Layouts Guide
- Adding Languages Guide
- Theming Guide

### Improved
* Enhanced `VirtualKeypadController` selection awareness
* Better scope state management for physical keyboard mode
* Professional README with cleaner structure

---

## 0.1.0

* Initial release
### Initial Release
* **VirtualKeypadScope** - Manages keyboard-to-textfield connections
* **VirtualKeypadTextField** - Text field with virtual keyboard integration
* **VirtualKeypad** - Customizable on-screen keyboard widget
Expand Down
98 changes: 98 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Contributing to Virtual Keypad

Thank you for your interest in contributing! This guide will help you get started.

## Getting Started

1. **Fork the repository** on GitHub
2. **Clone your fork** locally:
```bash
git clone https://github.com/YOUR_USERNAME/virtual_keypad.git
cd virtual_keypad
```
3. **Install dependencies**:
```bash
flutter pub get
cd example && flutter pub get && cd ..
```

## Development Workflow

### Running Tests

```bash
flutter test
```

### Running the Example App

```bash
cd example
flutter run
```

### Code Style

- Follow [Dart style guide](https://dart.dev/guides/language/effective-dart/style)
- Run `dart format .` before committing
- Ensure `flutter analyze` passes with no errors

## Making Changes

### Branch Naming

- `feature/description` - New features
- `fix/description` - Bug fixes
- `docs/description` - Documentation updates

### Commit Messages

Use clear, descriptive commit messages:

```
feat: add haptic feedback support
fix: keyboard layout reset on close
docs: update README installation section
```

### Pull Request Process

1. Create a feature branch from `main`
2. Make your changes with tests
3. Ensure all tests pass
4. Update documentation if needed
5. Submit a PR with a clear description

## Adding Features

### New Keyboard Layout

See [Adding Languages Guide](doc/adding-languages.md)

### New Theme

See [Theming Guide](doc/theming.md)

### New Actions

1. Add to `KeyAction` enum in `lib/src/enums.dart`
2. Handle in `_handleAction()` in `lib/src/widgets/keyboard.dart`
3. Add icon/label in `_buildKeyContent()`
4. Update documentation

## Reporting Issues

- Use the [issue tracker](https://github.com/Masum-MSNR/virtual_keypad/issues)
- Include Flutter version (`flutter --version`)
- Provide minimal reproduction code
- Include screenshots/videos if UI-related

## Code of Conduct

- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow

## License

By contributing, you agree that your contributions will be licensed under the MIT License.
Loading
Loading