senior_feedback 2.1.4 senior_feedback: ^2.1.4 copied to clipboard
A package that provides easy integration with Senior's feedback service for Flutter.
import 'package:flutter/material.dart';
import 'package:senior_design_system/components/senior_design_system/senior_design_system_widget.dart';
import 'package:senior_feedback/senior_feedback.dart';
void main() {
SeniorFeedback.initialize(apiKey: 'API_KEY');
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return SeniorDesignSystem(
child: MaterialApp(
home: Scaffold(
body: Builder(builder: (context) {
return Center(
child: ElevatedButton(
onPressed: () {
const feedbackSource = FeedbackSource(
userIdentificator: 'EXAMPLE-969696',
name: 'Lorem Ipsum Test Example',
email: 'lorem.ipsum.example@est.com.br',
tags: [
Tag(name: 'name1', value: 'value1'),
Tag(name: 'name2', value: 'value2'),
Tag(name: 'name3', value: 'value3'),
]);
SeniorFeedback.showSeniorFeedbackBottomSheet(
context: context,
feedbackSource: feedbackSource,
);
},
child: const Text('Send Feedback'),
),
);
}),
),
),
);
}
}