सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
TypeMate एक Flutter प्लगइन है जिसे ऐप में वास्तविक समय में लेखन सहायता के साथ टेक्स्ट इनपुट को बढ़ावा देने के लिए डिज़ाइन किया गया है। यह स्क्रीन पर ओवरले बबल्स प्रदर्शित करता है जो वर्तनी जाँच, व्याकरण संशोधन और अन्य लेखन उपकरण प्रदान करते हैं। Android के लिए बनाया गया, यह मौजूदा फॉर्म और टेक्स्ट फील्ड में बिना किसी बाधा के एकीकृत होता है, जिससे उपयोगकर्ताओं को अपने कार्यप्रवाह के बिना तुरंत प्रतिक्रिया मिलती है। उत्पादकता-केंद्रित एप्लिकेशन के लिए आदर्श, यह सिस्टम-वाइड उपयोग का समर्थन करता है ताकि टाइपिंग की सटीकता और स्पष्टता में सुधार हो। प्लगइन ओपन-सोर्स है और ratulicious.me द्वारा बनाए रखा जाता है।
उपयोग
फॉर्म में रियल-टाइम वर्तनी जाँच
पाठ इनपुट के दौरान व्याकरण सुधार
उपयोगकर्ता टाइपिंग सटीकता में सुधार करना
गैर-मातृभाषी लोगों के लिए पहुँच सुधारना
सामग्री निर्माण ऐप का समर्थन करना
मुख्य विशेषताएँ
सिस्टम-व्यापी ओवरले बबल्स
सुझाव के साथ वर्तनी जाँचें
व्याकरण त्रुटि निर्देशन
हल्का Android एकीकरण
ओपन-सोर्स और कस्टमाइज़ेबल
इनके लिए उपयुक्त
उत्पादकता ऐप्स
शैक्षिक उपकरण
सामग्री निर्माण प्लेटफॉर्म
एक्सेसिबिलिटी-फोकस्ड एप्लिकेशन
सॉफ्टवेयर लिखना और संपादित करना
विचार योग्य बातें
Android-केवल समर्थन
ओवरले आधारित UI तक सीमित
प्रणाली ओवरले के लिए अनुमति की आवश्यकता हो सकती है
कम शक्ति वाले डिवाइस पर प्रदर्शन प्रभाव
iOS या डेस्कटॉप के लिए समर्थन नहीं है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
TypeMate
A Flutter plugin for system-wide writing assistance with overlay bubbles that appear when typing in text fields across all applications.
Features
🔵 System-wide overlay - Works across all Android apps
📱 Text field detection - Automatically detects when you focus on text fields
✍️ Writing assistance - Provides spell check and grammar fix options
🔐 Permission management - Handles overlay and accessibility permissions
⚡ Foreground service - Runs reliably in the background
🎨 Customizable - Configure bubble appearance and behavior
Platform Support
Platform
Support
Android
✅ Full support
iOS
❌ Not supported (iOS limitations)
Web
❌ Not applicable
Desktop
❌ Not supported
Getting Started
Installation
Add this to your package's pubspec.yaml file:
dependencies:type_mate:^1.0.0
Android Setup
Add permissions to your android/app/src/main/AndroidManifest.xml:
Add services to your AndroidManifest.xml inside the <application> tag:
<!-- Overlay Service --><serviceandroid:name="com.ratulhasanruhan.type_mate.OverlayService"android:enabled="true"android:exported="false"android:foregroundServiceType="mediaProjection" /><!-- Accessibility Service --><serviceandroid:name="com.ratulhasanruhan.type_mate.TextAccessibilityService"android:enabled="true"android:exported="true"android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"><intent-filter><actionandroid:name="android.accessibilityservice.AccessibilityService" /></intent-filter><meta-dataandroid:name="android.accessibilityservice"android:resource="@xml/accessibility_service_config" /></service>
Usage
Basic Usage
import'package:type_mate/type_mate.dart';
classMyAppextendsStatefulWidget{
@override_MyAppStatecreateState() => _MyAppState();
}
class_MyAppStateextendsState<MyApp> {
@overridevoidinitState() {
super.initState();
_setupTypeMate();
}
Future<void> _setupTypeMate() async {
// Initialize the pluginawaitTypeMate.instance.initialize();
// Listen to text field focus eventsTypeMate.instance.textFieldFocusedStream.listen((_) {
print('Text field focused in external app');
});
// Quick setup with all necessary stepsfinal result = awaitTypeMate.instance.quickSetup();
if (result['serviceStarted'] == true) {
print('TypeMate is ready!');
}
}
}
Advanced Usage
// Check permissionsbool hasOverlayPermission = awaitTypeMate.instance.checkOverlayPermission();
bool hasAccessibilityService = awaitTypeMate.instance.checkAccessibilityService();
// Request permissionsif (!hasOverlayPermission) {
awaitTypeMate.instance.requestOverlayPermission();
}
if (!hasAccessibilityService) {
awaitTypeMate.instance.openAccessibilitySettings();
}
// Start/Stop overlay serviceawaitTypeMate.instance.startOverlayService();
awaitTypeMate.instance.stopOverlayService();
// Test the overlayawaitTypeMate.instance.testOverlay();
// Get comprehensive statusMap<String, dynamic> status = awaitTypeMate.instance.getStatus();
print('Status: $status');
Configuration
You can customize the overlay behavior using OverlayConfig:
final config = OverlayConfig(
autoShow: true,
autoHideDuration: 3000, // milliseconds
enableVibration: false,
bubbleSize: 56.0,
bubbleOpacity: 0.9,
enableSpellCheck: true,
enableGrammarCheck: true,
initialX: 100,
initialY: 200,
);
// Use config when starting the service (planned for future versions)
How It Works
TypeMate consists of three main components:
Flutter Plugin Interface - Provides Dart API for controlling the overlay
Overlay Service - Android foreground service that displays the bubble
Accessibility Service - Detects text field focus events across all apps
Architecture Flow
User types in any app
↓
AccessibilityService detects text input
↓
TriggersOverlayService
↓
Bubble appears with writing assistance options
↓
User can check spelling/grammar or close bubble
Permissions Required
Overlay Permission (SYSTEM_ALERT_WINDOW)
Purpose: Allows the app to draw over other applications
User Action: Must be granted manually in Android settings
Automatic Request: Plugin can open the settings page
Accessibility Service (BIND_ACCESSIBILITY_SERVICE)
Purpose: Detects text field focus events across all applications
User Action: Must be enabled manually in Android Accessibility settings
Automatic Request: Plugin can open the accessibility settings page
Example App
The plugin comes with a complete example app that demonstrates all features:
cd example
flutter run
The example app includes:
Permission status checking
Quick setup functionality
Manual service control
Test overlay feature
Live status updates
API Reference
TypeMate
Main plugin class providing all functionality.
Methods
Method
Return Type
Description
initialize()
Future<bool>
Initialize the plugin
checkOverlayPermission()
Future<bool>
Check if overlay permission is granted
requestOverlayPermission()
Future<void>
Request overlay permission
checkAccessibilityService()
Future<bool>
Check if accessibility service is enabled
openAccessibilitySettings()
Future<void>
Open accessibility settings
startOverlayService()
Future<void>
Start the overlay service
stopOverlayService()
Future<void>
Stop the overlay service
testOverlay()
Future<void>
Show test bubble for 3 seconds
quickSetup()
Future<Map<String, bool>>
Perform complete setup
getStatus()
Future<Map<String, dynamic>>
Get comprehensive status
Streams
Stream
Type
Description
textFieldFocusedStream
Stream<void>
Notifies when text fields are focused
textFieldUnfocusedStream
Stream<void>
Notifies when text fields lose focus
Troubleshooting
Common Issues
Bubble not appearing:
Check if overlay permission is granted
Verify accessibility service is enabled
Ensure the overlay service is running
Try the test overlay function
Accessibility service not working:
Disable and re-enable the service in Android settings
Restart the app
Check Android logs for accessibility events
Permission requests failing:
Ensure your app targets API level 23 or higher
Check if the device supports overlay permissions
Try manually granting permissions in Android settings
Debugging
Enable verbose logging to see what's happening:
// Check status regularlyTimer.periodic(Duration(seconds: 5), (timer) async {
final status = awaitTypeMate.instance.getStatus();
print('TypeMate Status: $status');
});
Limitations
Android Only: iOS doesn't allow system-wide overlays for security reasons
Manual Permissions: Users must manually grant overlay and accessibility permissions
Android Version: Requires Android API level 21+ for overlay functionality
Performance: May affect battery life when running continuously
Contributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests to help improve TypeMate.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Based on the focus_bubble project architecture and inspired by system-wide writing assistance tools.
🚀 Happy Coding with TypeMate!
If you find this plugin useful, please consider giving it a star ⭐ on GitHub and sharing it with the Flutter community!