Skip to content

Commit 36d8ab9

Browse files
committed
fix: license
1 parent efd6c61 commit 36d8ab9

File tree

1 file changed

+46
-26
lines changed

1 file changed

+46
-26
lines changed

lib/features/dashboard/presentation/wrapper_page/wrapper_page.dart

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ library;
66
import "package:auto_route/auto_route.dart";
77
import "package:auto_size_text/auto_size_text.dart";
88
import "package:flutter/material.dart";
9+
import "package:flutter_hooks/flutter_hooks.dart";
910
import "package:google_fonts/google_fonts.dart";
1011
import "package:hooks_riverpod/hooks_riverpod.dart";
1112
import "package:url_launcher/link.dart";
@@ -68,15 +69,13 @@ class _ExpandedWrapper extends HookConsumerWidget {
6869
@override
6970
Widget build(BuildContext context, WidgetRef ref) {
7071
final theme = Theme.of(context);
71-
final textStyle = theme.textTheme.bodyMedium;
7272
final name = ref.watch(usernameProvider).valueOrNull;
7373
final email = ref.watch(emailProvider).valueOrNull;
7474
final avatar = ref.watch(avatarProvider).valueOrNull;
7575
final mrDafoe = GoogleFonts.mrDafoe();
7676
final isMrDafoeLoaded = ref.watch(
7777
isFontLoadedProvider(Fonts(families: [mrDafoe])),
7878
);
79-
const githubLink = "https://github.com/PSDTools/app";
8079

8180
return Scaffold(
8281
appBar: AppBar(
@@ -105,31 +104,10 @@ class _ExpandedWrapper extends HookConsumerWidget {
105104
aboutBoxChildren: [
106105
const SizedBox(height: 24),
107106
Link(
108-
uri: Uri.parse(githubLink),
107+
uri: Uri.https("github.com", "PSDTools/app"),
108+
target: LinkTarget.blank,
109109
builder: (context, followLink) {
110-
final tapGestureRecognizer = useTapGestureRecognizer(
111-
onTap: followLink,
112-
);
113-
114-
return AutoSizeText.rich(
115-
TextSpan(
116-
children: [
117-
TextSpan(
118-
style: textStyle,
119-
text:
120-
"Pattonville Wallet is hopefully going to become Pattonville School District's new app for reenforcing positive behavior. View the source at ",
121-
),
122-
TextSpan(
123-
style: textStyle?.copyWith(
124-
color: theme.colorScheme.primary,
125-
),
126-
text: githubLink,
127-
recognizer: tapGestureRecognizer,
128-
),
129-
TextSpan(style: textStyle, text: "."),
130-
],
131-
),
132-
);
110+
return _AppDescription(followLink: followLink);
133111
},
134112
),
135113
],
@@ -188,6 +166,48 @@ class _ExpandedWrapper extends HookConsumerWidget {
188166
}
189167
}
190168

169+
class _AppDescription extends HookWidget {
170+
const _AppDescription({
171+
this.followLink,
172+
// Temporary ignore, see <dart-lang/sdk#49025>.
173+
// ignore: unused_element
174+
super.key,
175+
});
176+
177+
final GestureTapCallback? followLink;
178+
179+
@override
180+
Widget build(BuildContext context) {
181+
final theme = Theme.of(context);
182+
183+
final textStyle = theme.textTheme.bodyMedium;
184+
185+
final tapGestureRecognizer = useTapGestureRecognizer(
186+
onTap: followLink,
187+
);
188+
189+
return Text.rich(
190+
TextSpan(
191+
style: textStyle,
192+
children: [
193+
const TextSpan(
194+
text:
195+
"Pattonville Wallet is hopefully going to become Pattonville School District's new app for reenforcing positive behavior. View the source at ",
196+
),
197+
TextSpan(
198+
style: textStyle?.copyWith(
199+
color: theme.colorScheme.primary,
200+
),
201+
text: "github:PSDTools/app",
202+
recognizer: tapGestureRecognizer,
203+
),
204+
const TextSpan(text: "."),
205+
],
206+
),
207+
);
208+
}
209+
}
210+
191211
class _MobileWrapper extends StatelessWidget {
192212
const _MobileWrapper({
193213
required this.child,

0 commit comments

Comments
 (0)