https://github.com/thatlinuxguyyouknow/adaptive-textfield
This textfield automatically adapts to your input using AI
https://github.com/thatlinuxguyyouknow/adaptive-textfield
Last synced: about 2 months ago
JSON representation
This textfield automatically adapts to your input using AI
- Host: GitHub
- URL: https://github.com/thatlinuxguyyouknow/adaptive-textfield
- Owner: ThatLinuxGuyYouKnow
- Created: 2025-03-04T08:18:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-04T12:27:16.000Z (over 1 year ago)
- Last Synced: 2025-03-04T13:24:33.619Z (over 1 year ago)
- Language: Dart
- Size: 1.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Adaptive TextField




A smart and adaptive text field for Flutter applications that processes natural language to automatically create events and tasks from user input.
## Features
- **Natural Language Processing**: Converts everyday language into structured data
- **Adaptive UI**: Changes border color based on detected input type
- **Preview Cards**: Dynamic rendering of event and task cards
- **Debounced Input**: Optimized API calls with debounced text input
## Demo

## How It Works
The application uses a text field that monitors user input and sends it to a language model (Gemini) for processing. Based on the response, it identifies whether the input describes:
- **Events**: Social gatherings, meetings, dates (pink UI elements)
- **Tasks**: Reminders, to-dos, and personal activities (blue UI elements)
- **Normal text**: Regular input that doesn't fit the above categories
## Input Examples
### Event Examples
```
"schedule lunch for me with Sarah at 9:00 pm, we'll discuss project ideas"
"schedule a date for Jenny and I at Central Park tomorrow at 5pm"
```
### Task Examples
```
"remind me to wash my car in the garage at 5pm"
"remind me to call my grandpa at 9am"
```
## Installation
```bash
# Clone this repository
git clone https://github.com/thatlinuxguyyouknow/adaptive-textfield.git
# Navigate to the project
cd adaptive-textfield
# Install dependencies
flutter pub get
# Run the app
flutter run
```
## Configuration
To use the natural language processing features, you need to:
1. Obtain an API key from Google's Generative AI (Gemini)
2. Add your key to the `apikey` variable in the `checkInputType.dart` file
```dart
String apikey = "YOUR_API_KEY_HERE";
```
## Dependencies
- `flutter`: UI toolkit
- `http`: Network requests
- `google_fonts`: Typography
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.