ai_textfield 0.0.1 copy "ai_textfield: ^0.0.1" to clipboard
ai_textfield: ^0.0.1 copied to clipboard

A smart AI-powered TextField with auto suggestions.

example/lib/main.dart

import 'services/OpenAIService .dart';
import 'package:flutter/material.dart';
import 'package:ai_textfield/ai_textfield.dart';

void main() => runApp(const MyApp());

final ai = GeminiService(apiKey: 'YOUR_API_KEY_HERE');

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text("AI TextField Example")),
        body: Padding(
          padding: EdgeInsets.all(16),
          child: AISmartTextField(
            getSuggestions: ai.getSuggestions,
            decoration: InputDecoration(labelText: "AI TextField"),
          ),
        ),
      ),
    );
  }
}
2
likes
130
points
58
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A smart AI-powered TextField with auto suggestions.

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ai_textfield