showAppFeedbackDialog function
Implementation
Future<void> showAppFeedbackDialog(
BuildContext context,
String iOSUrlString,
String androidUrlString, {
required bool isHomeOwner,
}) {
return showDialog(
context: context,
builder: (context) => AlertDialog(
actionsAlignment: MainAxisAlignment.spaceEvenly,
title: Center(
child: Text(
context.sharedL10n.enjoyingThisApp,
style: context.textTheme.bodyLarge,
),
),
content: Text(
context.sharedL10n.havingGreatExperience,
style: context.textTheme.titleSmall,
),
actions: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
RawMaterialButton(
onPressed: () {
showAppFeedbackAsNotSatisfiedDialog(
context,
isHomeOwner: isHomeOwner,
);
},
child: Column(
children: [
Text(
'🙁',
style: context.textTheme.headlineMedium,
),
Text(
context.sharedL10n.notReally,
style: context.textTheme.bodyMedium
?.copyWith(color: context.colorScheme.primary),
),
],
),
),
RawMaterialButton(
onPressed: () {
showAppFeedbackStarRatingDialog(
context,
iOSUrlString,
androidUrlString,
isHomeOwner: isHomeOwner,
);
},
child: Column(
children: [
Text(
'🤗',
style: context.textTheme.headlineMedium,
),
Text(
context.sharedL10n.yes,
style: context.textTheme.bodyMedium
?.copyWith(color: context.colorScheme.primary),
),
],
),
),
],
),
],
),
);
}