A smart and adaptive text field for Flutter applications that processes natural language to automatically create events and tasks from user input.
- 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
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
"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"
"remind me to wash my car in the garage at 5pm"
"remind me to call my grandpa at 9am"
# 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 runTo use the natural language processing features, you need to:
- Obtain an API key from Google's Generative AI (Gemini)
- Add your key to the
apikeyvariable in thecheckInputType.dartfile
String apikey = "YOUR_API_KEY_HERE";flutter: UI toolkithttp: Network requestsgoogle_fonts: Typography
Contributions are welcome! Please feel free to submit a Pull Request.
