pickafeature 1.1.2
pickafeature: ^1.1.2 copied to clipboard
Flutter SDK for pick a feature - collect user feedback and feature requests directly inside your app. Includes drop-in UI widgets and a typed API client.
import 'package:flutter/material.dart';
import 'package:pickafeature/pickafeature.dart';
import 'app_theme.dart';
// Replace with your real API key from https://pickafeature.com/settings
// (Settings → API Keys section in your dashboard)
const String kPickAFeatureApiKey = 'wk_b600w7f6k3ve9ijypqvqu88a';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await PickAFeature.initialize(
config: PickAFeatureConfig(apiKey: kPickAFeatureApiKey),
);
runApp(const ExampleApp());
}
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'pick a feature',
debugShowCheckedModeBanner: false,
themeMode: ThemeMode.system,
theme: AppTheme.light(),
darkTheme: AppTheme.dark(),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return PickAFeatureScreen(
config: PickAFeatureConfig(
apiKey: kPickAFeatureApiKey,
customTitle: 'What should we build next?',
customSubtitle: 'Suggest, vote, comment',
showEmailField: true,
),
);
}
}