neoagent 3.0.1-beta.11 → 3.0.1-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/flutter_app/lib/main_billing.dart +40 -62
- package/flutter_app/lib/main_navigation.dart +1 -1
- package/package.json +1 -1
- package/server/public/.last_build_id +1 -1
- package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
- package/server/public/flutter_bootstrap.js +1 -1
- package/server/public/main.dart.js +33414 -33432
|
@@ -46,26 +46,6 @@ Future<void> _openUrl(String url) async {
|
|
|
46
46
|
await url_launcher.launchUrl(uri, mode: url_launcher.LaunchMode.externalApplication);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// ── Plan icon/color helpers ────────────────────────────────────────────────────
|
|
50
|
-
|
|
51
|
-
const List<_PlanStyle> _planStyles = <_PlanStyle>[
|
|
52
|
-
_PlanStyle(Icons.spa_outlined, Color(0xFF84BA87), Color(0x2084BA87)),
|
|
53
|
-
_PlanStyle(Icons.bolt_outlined, Color(0xFFE1B052), Color(0x20E1B052)),
|
|
54
|
-
_PlanStyle(Icons.group_outlined, Color(0xFF6FB0A4), Color(0x206FB0A4)),
|
|
55
|
-
_PlanStyle(Icons.star_outline, Color(0xFFDE8A78), Color(0x20DE8A78)),
|
|
56
|
-
_PlanStyle(Icons.rocket_launch_outlined, Color(0xFFB39DDB), Color(0x20B39DDB)),
|
|
57
|
-
];
|
|
58
|
-
|
|
59
|
-
class _PlanStyle {
|
|
60
|
-
const _PlanStyle(this.icon, this.color, this.bg);
|
|
61
|
-
final IconData icon;
|
|
62
|
-
final Color color;
|
|
63
|
-
final Color bg;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
_PlanStyle _styleForPlan(int index) =>
|
|
67
|
-
_planStyles[index % _planStyles.length];
|
|
68
|
-
|
|
69
49
|
// ── Main panel ────────────────────────────────────────────────────────────────
|
|
70
50
|
|
|
71
51
|
enum _BillingTab { overview, plans, history }
|
|
@@ -808,7 +788,18 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
|
|
|
808
788
|
final url = await _c.createCheckoutSession(planId);
|
|
809
789
|
if (!mounted) return;
|
|
810
790
|
setState(() => _checkingOut = null);
|
|
811
|
-
if (url != null)
|
|
791
|
+
if (url != null) {
|
|
792
|
+
await _openUrl(url);
|
|
793
|
+
} else {
|
|
794
|
+
ScaffoldMessenger.of(context).showSnackBar(
|
|
795
|
+
SnackBar(
|
|
796
|
+
content: Text(
|
|
797
|
+
_c.errorMessage ?? 'Could not start checkout. Check Stripe configuration.',
|
|
798
|
+
),
|
|
799
|
+
backgroundColor: _danger,
|
|
800
|
+
),
|
|
801
|
+
);
|
|
802
|
+
}
|
|
812
803
|
}
|
|
813
804
|
|
|
814
805
|
@override
|
|
@@ -855,7 +846,8 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
|
|
|
855
846
|
children: <Widget>[
|
|
856
847
|
_IntervalToggle(
|
|
857
848
|
annual: widget.annual,
|
|
858
|
-
onToggle:
|
|
849
|
+
onToggle: widget.onToggleAnnual,
|
|
850
|
+
annualAvailable: hasAnnual,
|
|
859
851
|
),
|
|
860
852
|
if (savingsPct != null && savingsPct > 0) ...<Widget>[
|
|
861
853
|
const SizedBox(width: 10),
|
|
@@ -900,7 +892,6 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
|
|
|
900
892
|
itemCount: plans.length,
|
|
901
893
|
itemBuilder: (_, i) => _PlanCard(
|
|
902
894
|
plan: plans[i],
|
|
903
|
-
style: _styleForPlan(i),
|
|
904
895
|
recommended: i == recommendedIndex,
|
|
905
896
|
current: plans[i]['id'] == currentPlanId,
|
|
906
897
|
loading: _checkingOut == plans[i]['id'] as String?,
|
|
@@ -916,10 +907,15 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
|
|
|
916
907
|
}
|
|
917
908
|
|
|
918
909
|
class _IntervalToggle extends StatelessWidget {
|
|
919
|
-
const _IntervalToggle({
|
|
910
|
+
const _IntervalToggle({
|
|
911
|
+
required this.annual,
|
|
912
|
+
required this.onToggle,
|
|
913
|
+
this.annualAvailable = true,
|
|
914
|
+
});
|
|
920
915
|
|
|
921
916
|
final bool annual;
|
|
922
|
-
final ValueChanged<bool
|
|
917
|
+
final ValueChanged<bool> onToggle;
|
|
918
|
+
final bool annualAvailable;
|
|
923
919
|
|
|
924
920
|
@override
|
|
925
921
|
Widget build(BuildContext context) {
|
|
@@ -933,8 +929,8 @@ class _IntervalToggle extends StatelessWidget {
|
|
|
933
929
|
child: Row(
|
|
934
930
|
mainAxisSize: MainAxisSize.min,
|
|
935
931
|
children: <Widget>[
|
|
936
|
-
_pill('Monthly', !annual, () => onToggle
|
|
937
|
-
_pill('Annual', annual, () => onToggle
|
|
932
|
+
_pill('Monthly', !annual, () => onToggle(false)),
|
|
933
|
+
_pill('Annual', annual, annualAvailable ? () => onToggle(true) : null),
|
|
938
934
|
],
|
|
939
935
|
),
|
|
940
936
|
);
|
|
@@ -966,7 +962,6 @@ class _IntervalToggle extends StatelessWidget {
|
|
|
966
962
|
class _PlanCard extends StatelessWidget {
|
|
967
963
|
const _PlanCard({
|
|
968
964
|
required this.plan,
|
|
969
|
-
required this.style,
|
|
970
965
|
required this.recommended,
|
|
971
966
|
required this.current,
|
|
972
967
|
required this.loading,
|
|
@@ -974,7 +969,6 @@ class _PlanCard extends StatelessWidget {
|
|
|
974
969
|
});
|
|
975
970
|
|
|
976
971
|
final Map<String, dynamic> plan;
|
|
977
|
-
final _PlanStyle style;
|
|
978
972
|
final bool recommended;
|
|
979
973
|
final bool current;
|
|
980
974
|
final bool loading;
|
|
@@ -1007,39 +1001,23 @@ class _PlanCard extends StatelessWidget {
|
|
|
1007
1001
|
child: Column(
|
|
1008
1002
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
1009
1003
|
children: <Widget>[
|
|
1010
|
-
//
|
|
1011
|
-
|
|
1004
|
+
// Plan name + description
|
|
1005
|
+
Column(
|
|
1006
|
+
crossAxisAlignment: CrossAxisAlignment.start,
|
|
1012
1007
|
children: <Widget>[
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
children: <Widget>[
|
|
1027
|
-
Text(name,
|
|
1028
|
-
style: GoogleFonts.geist(
|
|
1029
|
-
fontSize: 17,
|
|
1030
|
-
fontWeight: FontWeight.w800,
|
|
1031
|
-
color: _textPrimary,
|
|
1032
|
-
letterSpacing: -0.3,
|
|
1033
|
-
)),
|
|
1034
|
-
if (desc.isNotEmpty)
|
|
1035
|
-
Text(desc,
|
|
1036
|
-
style: TextStyle(
|
|
1037
|
-
fontSize: 12, color: _textMuted),
|
|
1038
|
-
maxLines: 1,
|
|
1039
|
-
overflow: TextOverflow.ellipsis),
|
|
1040
|
-
],
|
|
1041
|
-
),
|
|
1042
|
-
),
|
|
1008
|
+
Text(name,
|
|
1009
|
+
style: GoogleFonts.geist(
|
|
1010
|
+
fontSize: 17,
|
|
1011
|
+
fontWeight: FontWeight.w800,
|
|
1012
|
+
color: _textPrimary,
|
|
1013
|
+
letterSpacing: -0.3,
|
|
1014
|
+
)),
|
|
1015
|
+
if (desc.isNotEmpty)
|
|
1016
|
+
Text(desc,
|
|
1017
|
+
style: TextStyle(
|
|
1018
|
+
fontSize: 12, color: _textMuted),
|
|
1019
|
+
maxLines: 1,
|
|
1020
|
+
overflow: TextOverflow.ellipsis),
|
|
1043
1021
|
],
|
|
1044
1022
|
),
|
|
1045
1023
|
const SizedBox(height: 16),
|
|
@@ -1225,7 +1203,7 @@ class _BillingHistoryTabState extends State<_BillingHistoryTab> {
|
|
|
1225
1203
|
borderRadius: BorderRadius.circular(6),
|
|
1226
1204
|
border: Border.all(color: _border),
|
|
1227
1205
|
),
|
|
1228
|
-
child: Icon(Icons.
|
|
1206
|
+
child: Icon(Icons.credit_card,
|
|
1229
1207
|
size: 20, color: _textSecondary),
|
|
1230
1208
|
),
|
|
1231
1209
|
const SizedBox(width: 14),
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ea6fa5cc59204621d580c6c7ce0cf0ad
|
|
Binary file
|
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"77e2e94772b6eb43759e34ed1ad7da4674e19c
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "158549597" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
|
41
41
|
}
|
|
42
42
|
});
|