Skip to main content

keyboard_controller 0.1.1 copy "keyboard_controller: ^0.1.1" to clipboard
keyboard_controller: ^0.1.1 copied to clipboard

iOS-style interactive keyboard dismiss, a keyboard-stable chat list, a composer that rides the keyboard, and AI chat behaviours for Flutter on iOS and Android.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:keyboard_controller/keyboard_controller.dart';

import 'ai_chat_screen.dart';
import 'messenger_screen.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'keyboard_controller',
      // The demo is recorded for the README; the debug ribbon would cover the app bar action.
      debugShowCheckedModeBanner: false,
      theme: ThemeData(colorSchemeSeed: Colors.indigo),
      // One scope above the navigator serves every chat route.
      builder: (context, child) => KeyboardScope(child: child!),
      home: const HomeScreen(),
    );
  }
}

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

  void _open(BuildContext context, Widget screen) {
    Navigator.of(context).push(MaterialPageRoute<void>(builder: (_) => screen));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('keyboard_controller')),
      body: ListView(
        children: [
          ListTile(
            leading: const Icon(Icons.forum_outlined),
            title: const Text('Messenger'),
            subtitle: const Text('200 messages, lift: always'),
            onTap: () => _open(context, const MessengerScreen()),
          ),
          ListTile(
            leading: const Icon(Icons.auto_awesome_outlined),
            title: const Text('AI chat'),
            subtitle: const Text(
              'Pinned prompt, streaming answer, four lift modes',
            ),
            onTap: () => _open(context, const AiChatScreen()),
          ),
        ],
      ),
    );
  }
}
4
likes
160
points
0
downloads
screenshot

Documentation

API reference

Publisher

verified publisherarefmozafari.com

Weekly Downloads

iOS-style interactive keyboard dismiss, a keyboard-stable chat list, a composer that rides the keyboard, and AI chat behaviours for Flutter on iOS and Android.

Repository (GitHub)
View/report issues

Topics

#keyboard #chat #scroll #gestures #llm

License

MIT (license)

Dependencies

flutter

More

Packages that depend on keyboard_controller

Packages that implement keyboard_controller