-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update App Analytics to reflect new payment system (#1686)
closes #1671 - [x] update app analytics widget to reflect subscription earning - [x] add learn more option to know more details on earning - [x] create an article regarding earning (https://help.omi.me/en/articles/10401566-build-publish-and-earn-with-omi-apps) https://github.com/user-attachments/assets/acc46a49-e98b-40ae-9fa1-374e2c9cf823
- Loading branch information
Showing
3 changed files
with
98 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
app/lib/pages/apps/app_detail/widgets/app_analytics_widget.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_svg/svg.dart'; | ||
import 'package:friend_private/gen/assets.gen.dart'; | ||
import 'package:friend_private/utils/analytics/intercom.dart'; | ||
import 'package:skeletonizer/skeletonizer.dart'; | ||
|
||
class AppAnalyticsWidget extends StatelessWidget { | ||
final int installs; | ||
final double moneyMade; | ||
const AppAnalyticsWidget({super.key, required this.installs, required this.moneyMade}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
width: double.infinity, | ||
padding: const EdgeInsets.all(16.0), | ||
margin: const EdgeInsets.only(left: 8.0, right: 8.0, top: 12, bottom: 6), | ||
decoration: BoxDecoration( | ||
color: Colors.grey.shade900, | ||
borderRadius: BorderRadius.circular(16.0), | ||
), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Row( | ||
children: [ | ||
const Text('App Analytics', style: TextStyle(color: Colors.white, fontSize: 16)), | ||
const Spacer(), | ||
GestureDetector( | ||
onTap: () async { | ||
await IntercomManager().displayEarnMoneyArticle(); | ||
}, | ||
child: Row( | ||
children: [ | ||
Text("learn more", style: TextStyle(color: Colors.grey.shade400, fontSize: 14)), | ||
Icon( | ||
Icons.arrow_outward_rounded, | ||
size: 12, | ||
color: Colors.grey.shade400, | ||
) | ||
], | ||
), | ||
), | ||
], | ||
), | ||
const SizedBox(height: 16), | ||
Row( | ||
children: [ | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Row( | ||
children: [ | ||
Skeleton.shade(child: SvgPicture.asset(Assets.images.icChart, width: 20)), | ||
const SizedBox(width: 8), | ||
Text( | ||
installs.toString(), | ||
style: const TextStyle(color: Colors.white, fontSize: 30), | ||
), | ||
], | ||
), | ||
const SizedBox(height: 6), | ||
Text('Installs', style: TextStyle(color: Colors.grey.shade300, fontSize: 14)), | ||
], | ||
), | ||
const Spacer(flex: 2), | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Row( | ||
children: [ | ||
Skeleton.shade(child: SvgPicture.asset(Assets.images.icDollar, width: 20)), | ||
const SizedBox(width: 8), | ||
Text( | ||
"\$$moneyMade", | ||
style: const TextStyle(color: Colors.white, fontSize: 28), | ||
), | ||
], | ||
), | ||
const SizedBox(height: 6), | ||
Text('Money Earned', style: TextStyle(color: Colors.grey.shade300, fontSize: 14)), | ||
], | ||
), | ||
const Spacer(flex: 2), | ||
], | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters