Skip to content

Commit aa1f921

Browse files
authored
fix: tossface license missing issue (#238)
* fix: missing tossface license * fix: version information text style * chore(deps): add confetti * feat: confetti easter egg
1 parent 61c9dd5 commit aa1f921

File tree

3 files changed

+101
-47
lines changed

3 files changed

+101
-47
lines changed

lib/app/modules/setting/presentation/pages/about_page.dart

Lines changed: 90 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import 'dart:math';
2+
3+
import 'package:confetti/confetti.dart';
14
import 'package:flutter/material.dart';
25
import 'package:package_info_plus/package_info_plus.dart';
36
import 'package:url_launcher/url_launcher_string.dart';
@@ -7,62 +10,103 @@ import 'package:ziggle/app/router/routes.dart';
710
import 'package:ziggle/app/values/strings.dart';
811
import 'package:ziggle/gen/strings.g.dart';
912

10-
class AboutPage extends StatelessWidget {
13+
class AboutPage extends StatefulWidget {
1114
const AboutPage({super.key});
1215

16+
@override
17+
State<AboutPage> createState() => _AboutPageState();
18+
}
19+
20+
class _AboutPageState extends State<AboutPage> {
21+
final _controller =
22+
ConfettiController(duration: const Duration(microseconds: 1));
23+
24+
@override
25+
void dispose() {
26+
_controller.dispose();
27+
super.dispose();
28+
}
29+
1330
@override
1431
Widget build(BuildContext context) {
1532
return Scaffold(
1633
appBar: AppBar(
1734
title: Text(t.setting.about),
1835
),
19-
body: SingleChildScrollView(
20-
child: ListBody(
21-
children: [
22-
ListTile(
23-
title: Text(t.setting.feedback.label),
24-
onTap: () {
25-
sl<AnalyticsRepository>().logOpenFeedback();
26-
launchUrlString(Strings.heyDeveloperUrl);
27-
},
28-
),
29-
ListTile(
30-
title: Text(t.setting.termsOfService),
31-
onTap: () {
32-
sl<AnalyticsRepository>().logOpenTermsOfService();
33-
launchUrlString(
34-
Strings.termsOfServiceUrl,
35-
mode: LaunchMode.inAppBrowserView,
36-
);
37-
},
38-
),
39-
ListTile(
40-
title: Text(t.setting.privacyPolicy),
41-
onTap: () {
42-
sl<AnalyticsRepository>().logOpenPrivacyPolicy();
43-
launchUrlString(
44-
Strings.privacyPolicyUrl,
45-
mode: LaunchMode.inAppBrowserView,
46-
);
47-
},
48-
),
49-
ListTile(
50-
title: Text(t.setting.openSourceLicenses),
51-
onTap: () => const PackagesRoute().push(context),
52-
),
53-
ListTile(
54-
title: Text(t.setting.version),
55-
trailing: FutureBuilder(
56-
future: PackageInfo.fromPlatform(),
57-
builder: (_, snapshot) => Text(snapshot.data?.version ?? ''),
58-
),
36+
body: Stack(
37+
children: [
38+
Align(
39+
alignment: Alignment.bottomCenter,
40+
child: ConfettiWidget(
41+
confettiController: _controller,
42+
blastDirection: -pi / 2,
43+
numberOfParticles: 20,
44+
maxBlastForce: 100,
45+
emissionFrequency: 1,
46+
colors: const [
47+
Colors.green,
48+
Colors.blue,
49+
Colors.pink,
50+
Colors.orange,
51+
Colors.purple
52+
], // manually specify the colors to be used
5953
),
60-
ListTile(
61-
title: Text(t.setting.infoteam),
62-
onTap: () {},
54+
),
55+
SingleChildScrollView(
56+
child: ListBody(
57+
children: [
58+
ListTile(
59+
title: Text(t.setting.feedback.label),
60+
onTap: () {
61+
sl<AnalyticsRepository>().logOpenFeedback();
62+
launchUrlString(Strings.heyDeveloperUrl);
63+
},
64+
),
65+
ListTile(
66+
title: Text(t.setting.termsOfService),
67+
onTap: () {
68+
sl<AnalyticsRepository>().logOpenTermsOfService();
69+
launchUrlString(
70+
Strings.termsOfServiceUrl,
71+
mode: LaunchMode.inAppBrowserView,
72+
);
73+
},
74+
),
75+
ListTile(
76+
title: Text(t.setting.privacyPolicy),
77+
onTap: () {
78+
sl<AnalyticsRepository>().logOpenPrivacyPolicy();
79+
launchUrlString(
80+
Strings.privacyPolicyUrl,
81+
mode: LaunchMode.inAppBrowserView,
82+
);
83+
},
84+
),
85+
ListTile(
86+
title: Text(t.setting.openSourceLicenses),
87+
onTap: () => const PackagesRoute().push(context),
88+
),
89+
ListTile(
90+
title: Text(t.setting.version),
91+
leadingAndTrailingTextStyle: const TextStyle(
92+
fontSize: 16,
93+
color: Colors.black54,
94+
),
95+
trailing: FutureBuilder(
96+
future: PackageInfo.fromPlatform(),
97+
builder: (_, snapshot) => Text(
98+
snapshot.data?.version ?? '',
99+
),
100+
),
101+
),
102+
ListTile(
103+
title: Text(t.setting.infoteam),
104+
onTap: () => _controller.play(),
105+
),
106+
],
63107
),
64-
],
65-
),
108+
),
109+
],
66110
),
67111
);
68112
}

pubspec.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,14 @@ packages:
217217
url: "https://pub.dev"
218218
source: hosted
219219
version: "3.0.0"
220+
confetti:
221+
dependency: "direct main"
222+
description:
223+
name: confetti
224+
sha256: "979aafde2428c53947892c95eb244466c109c129b7eee9011f0a66caaca52267"
225+
url: "https://pub.dev"
226+
source: hosted
227+
version: "0.7.0"
220228
convert:
221229
dependency: transitive
222230
description:

pubspec.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: ziggle
22
description: ziggle
33
publish_to: 'none'
4-
version: 3.1.0
4+
version: 3.1.1
55

66
environment:
77
sdk: '>=3.1.0 <4.0.0'
88

99
dependencies:
1010
cached_network_image: ^3.2.3
1111
collection: ^1.17.1
12+
confetti: ^0.7.0
1213
cookie_jar: ^4.0.8
1314
crypto: ^3.0.3
1415
dio: ^5.2.1+1
@@ -77,6 +78,7 @@ flutter:
7778
- assets/logo/transparent.png
7879
- assets/icons/
7980
- assets/images/
81+
- assets/fonts/TossFace/LICENSE
8082
fonts:
8183
- family: TossFace
8284
fonts:

0 commit comments

Comments
 (0)