abtasty_qa_assistant 1.0.0
abtasty_qa_assistant: ^1.0.0 copied to clipboard
Flutter package providing quality assurance tools and utilities for ABTasty testing workflows.
ABTasty QA Assistant for Flutter #
A Flutter package that provides quality assurance tools and debugging utilities for ABTasty feature flags and A/B testing workflows.
Features #
- 🎯 Campaign Inspector: View and debug all active campaigns with detailed information
- 🔍 Search & Filter: Quickly find specific campaigns by name or ID
- 📊 Targeting Details: Inspect targeting rules and conditions for each campaign
- 🎲 Allocation Viewer: View traffic allocation and variation distribution
- 📝 Context Inspector: Monitor SDK configuration and visitor context
- 📈 Events Tracking: Real-time display of tracked events and hits
- 🖥️ Dashboard State: Monitor the state of your ABTasty dashboard
- 🎨 Draggable Overlay: Non-intrusive floating button that can be positioned anywhere on screen
Installation #
Add this package to your pubspec.yaml:
dependencies:
abtasty_qa_assistant: ^1.0.0
Then run:
flutter pub get
Usage #
Basic Setup #
- Import the package:
import 'package:abtasty_qa_assistant/abtasty_qa_assistant.dart';
import 'package:flagship/flagship.dart';
- Initialize the QA Assistant with your environment ID and API key:
class _MyAppState extends State<MyApp> {
ABTastyQAAssistant? _qaAssistant;
@override
void initState() {
super.initState();
// Start Flagship SDK
Flagship.start(
"YOUR_ENV_ID",
"YOUR_API_KEY",
config: ConfigBuilder()
.withLogLevel(Level.ALL)
.build(),
);
// Initialize QA Assistant
_qaAssistant = ABTastyQAAssistant(
envId: "YOUR_ENV_ID",
apiKey: "YOUR_API_KEY",
);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Builder(
builder: (context) {
// Show the QA Assistant overlay
WidgetsBinding.instance.addPostFrameCallback((_) {
_qaAssistant?.show(context);
});
return YourHomePage();
},
),
);
}
@override
void dispose() {
_qaAssistant?.hide();
super.dispose();
}
}
Advanced Usage #
Programmatically Toggle the Assistant
// Show the QA Assistant
_qaAssistant?.show(context);
// Hide the QA Assistant
_qaAssistant?.hide();
// Toggle visibility
_qaAssistant?.toggle(context);
Create a Visitor and Fetch Flags
// Create a visitor
var visitorId = await Flagship.newVisitor(
"visitor_id",
instanceType: Instance.SINGLE_INSTANCE,
hasConsented: true,
context: {
"age": 32,
"isVIP": true,
},
).start();
// Fetch flags
await visitorId?.fetchFlags();
// Get flag values
var btnTitle = visitorId?.getFlag("btnTitle", "Default Title");
var btnColor = visitorId?.getFlag("btnColor", "#FFFFFF");
QA Assistant Features #
🏠 Home Dashboard #
- Quick overview of all campaigns
- Campaign search functionality
- Status indicators for active/inactive campaigns
📋 Campaign Details #
View detailed information for each campaign:
- Targeting: Rules and conditions that determine visitor eligibility
- Allocation: Traffic distribution across variations
- Modifications: Changes applied by each variation
- Raw Data: Complete bucketing response for debugging
🔧 Context Viewer #
Monitor the current visitor context:
- Environment ID
- Visitor ID
- Custom context values
- SDK configuration
📊 Events & Hits #
Track all events sent to ABTasty:
- Screen views
- Custom events
- Transactions
- Timestamp and metadata
🎛️ Dashboard State #
Monitor the connection state and configuration of your ABTasty dashboard.
Example #
Check out the example folder for a complete working demo app that demonstrates all features of the QA Assistant.
To run the example:
cd example
flutter run
Requirements #
- Flutter SDK: >=1.17.0
- Dart SDK: ^3.6.1
- flagship: ^4.3.0
Documentation #
For more information about ABTasty and the Flagship SDK, visit:
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
License #
This project is licensed under the terms specified in the LICENSE file.
Support #
For issues, questions, or feature requests, please file an issue on the GitHub repository or contact ABTasty support.
Made with ❤️ for Flutter developers using ABTasty