linklytics_feedback 0.0.3 copy "linklytics_feedback: ^0.0.3" to clipboard
linklytics_feedback: ^0.0.3 copied to clipboard

A Flutter package for collecting user feedback with customizable UI, automatic language detection, and support for 30+ languages.

Linklytics Feedback #

A Flutter package for collecting user feedback with customizable UI and easy integration. This package provides a simple and elegant way to gather user feedback in your Flutter applications.

Features #

  • 🎨 Customizable UI: Customize the feedback form appearance and text
  • 🚀 Easy Integration: Simple API with minimal setup required
  • 📱 Flutter Native: Built specifically for Flutter applications
  • 🔧 Flexible Navigation: Support for custom navigation patterns
  • 🌐 API Integration: Built-in API service for sending feedback data
  • 📦 Lightweight: Minimal dependencies and small package size
  • 🌍 Multi-Language Support: Automatic language detection with 30+ languages
  • 🔄 Auto-Localization: Detects device language and displays UI accordingly

Getting started #

Add this to your package's pubspec.yaml file:

dependencies:
  linklytics_feedback: ^0.0.1

Then run:

flutter pub get

Usage #

Basic Usage (with Automatic Language Detection) #

import 'package:linklytics_feedback/linklytics_feedback.dart';

// Initialize the feedback service
final feedback = LinklyticsFeedback();

// Open feedback form - automatically detects language
await feedback.openFeedback(
  apiKey: 'your-api-key-here',
);

The feedback form will automatically detect the language and display the UI in the appropriate language from 30+ supported languages.

Language Detection Priority:

  1. GetX locale (if you've set Get.updateLocale() in your app)
  2. Device/Platform locale (system language)
  3. English (fallback)

Custom Navigation #

await feedback.openFeedback(
  apiKey: 'your-api-key-here',
  customNavigation: (widget) => Navigator.push(
    context,
    MaterialPageRoute(builder: (context) => widget),
  ),
);

Specific Language #

Force a specific language regardless of device settings:

import 'package:linklytics_feedback/linklytics_feedback.dart';

// Spanish
await feedback.openFeedback(
  apiKey: 'your-api-key-here',
  feedbackStrings: FeedbackStrings.forLanguage('es'),
);

// Arabic
await feedback.openFeedback(
  apiKey: 'your-api-key-here',
  feedbackStrings: FeedbackStrings.forLanguage('ar'),
);

// Japanese
await feedback.openFeedback(
  apiKey: 'your-api-key-here',
  feedbackStrings: FeedbackStrings.forLanguage('ja'),
);

Disable Auto-Detection #

await feedback.openFeedback(
  apiKey: 'your-api-key-here',
  enableAutoLanguageDetection: false, // Disables auto-detection, uses English
);

Custom Strings #

You can also provide completely custom strings:

import 'package:linklytics_feedback/linklytics_feedback.dart';

await feedback.openFeedback(
  apiKey: 'your-api-key-here',
  feedbackStrings: const FeedbackStrings(
    pageTitle: 'Send Feedback',
    feedbackInputLabel: 'Your feedback',
    feedbackInputHint: 'Tell us what you think...',
    feedbackInputValidationError: 'Please enter your feedback.',
    submitButtonLabel: 'Submit',
    sentSuccessfully: 'Thank you for your feedback!',
    sendError: 'Something went wrong. Please try again later.',
  ),
);

Supported Languages #

The package supports 30+ languages with automatic detection:

Language Code Language Name Native Name
en English English
ar Arabic العربية
es Spanish Español
fr French Français
de German Deutsch
zh Chinese (Simplified) 中文
ja Japanese 日本語
ko Korean 한국어
pt Portuguese Português
ru Russian Русский
it Italian Italiano
nl Dutch Nederlands
tr Turkish Türkçe
pl Polish Polski
sv Swedish Svenska
da Danish Dansk
no Norwegian Norsk
fi Finnish Suomi
el Greek Ελληνικά
cs Czech Čeština
hu Hungarian Magyar
ro Romanian Română
uk Ukrainian Українська
th Thai ไทย
vi Vietnamese Tiếng Việt
id Indonesian Bahasa Indonesia
he Hebrew עברית
hi Hindi हिन्दी
bn Bengali বাংলা
ms Malay Bahasa Melayu
ur Urdu اردو

Using LocalizationService #

You can also use the LocalizationService directly for advanced use cases:

import 'package:linklytics_feedback/linklytics_feedback.dart';

// Detect current device language
String currentLanguage = LocalizationService.detectLanguage();
print('Current language: $currentLanguage');

// Get all supported languages
List<String> languages = LocalizationService.supportedLanguages;
print('Supported: $languages');

// Get language name
String languageName = LocalizationService.getLanguageName('es');
print('Language name: $languageName'); // Español

// Check if language uses RTL
bool isRTL = LocalizationService.isRTL('ar');
print('Is RTL: $isRTL'); // true

API Reference #

LinklyticsFeedback #

The main class for handling feedback functionality.

Methods

  • openFeedback({required String apiKey, NavigateCallback? customNavigation, FeedbackStrings? feedbackStrings, bool enableAutoLanguageDetection = true})
    • Opens the feedback form
    • apiKey: Your API key for the feedback service
    • customNavigation: Optional custom navigation callback
    • feedbackStrings: Optional custom strings for the UI (auto-detects language if not provided)
    • enableAutoLanguageDetection: Enable automatic language detection (default: true)

FeedbackStrings #

Customizable strings for the feedback form UI.

Constructors

  • FeedbackStrings() - Default constructor with English strings
  • FeedbackStrings.auto() - Automatically detects device language and returns appropriate translations
  • FeedbackStrings.forLanguage(String languageCode) - Returns translations for a specific language code

Properties

  • pageTitle - The title displayed in the app bar
  • feedbackInputLabel - Label for the feedback input field
  • feedbackInputHint - Hint text shown in the feedback input field
  • feedbackInputValidationError - Error message when feedback is empty
  • submitButtonLabel - Text shown on the submit button
  • sentSuccessfully - Success message after feedback is sent
  • sendError - Error message when feedback submission fails

LocalizationService #

Service for handling language detection and localization.

Methods

  • detectLanguage() - Detects the current device language
  • getTranslations([String? languageCode]) - Get translations for a specific language
  • getLanguageName(String languageCode) - Get the native name of a language
  • isRTL(String languageCode) - Check if a language uses right-to-left text direction
  • supportedLanguages - Get list of all supported language codes

Additional information #

For more information about this package, visit the GitHub repository.

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

Issues #

If you encounter any issues or have feature requests, please file them on the GitHub issues page.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
140
points
170
downloads

Publisher

verified publisheralkashier.com

Weekly Downloads

A Flutter package for collecting user feedback with customizable UI, automatic language detection, and support for 30+ languages.

Repository (GitHub)

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, flutter_localizations, get, intl, package_info_plus

More

Packages that depend on linklytics_feedback