Skip to content

Commit

Permalink
Removed LinkText package
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Lesches committed Oct 25, 2023
1 parent 7e41590 commit 77b7b1f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 24 deletions.
1 change: 1 addition & 0 deletions lib/src/data/types.dart
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// An alias for a JSON map.
typedef Json = Map<String, dynamic>;
6 changes: 3 additions & 3 deletions lib/src/services/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class Auth {
///
/// Returns null if the user is not an admin (ie, [isAdmin] returns false).
static Future<List<String>?> get adminScopes async {
final Iterable<String>? customClaims = (await claims)?["scopes"];
final Iterable<dynamic>? customClaims = (await claims)?["scopes"];
return customClaims == null ? null : [
for (final String scope in customClaims)
scope,
for (final scope in customClaims)
scope as String,
];
}

Expand Down
7 changes: 1 addition & 6 deletions lib/src/widgets/atomic/info_card.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "package:flutter/material.dart";
import "package:link_text/link_text.dart";

/// A tile to represent some info.
///
Expand Down Expand Up @@ -45,11 +44,7 @@ class InfoCard extends StatelessWidget {
...[
for (final String text in children!) ...[
const SizedBox(height: 2.5),
LinkText(
text,
shouldTrimParams: true,
linkStyle: const TextStyle(color: Color(0xff0000EE)),
),
Text(text),
const SizedBox(height: 2.5),
],
],
Expand Down
7 changes: 1 addition & 6 deletions lib/src/widgets/generic/class_list.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "package:flutter/material.dart";
import "package:link_text/link_text.dart";

import "package:ramaz/data.dart";
import "package:ramaz/models.dart";
Expand Down Expand Up @@ -59,11 +58,7 @@ class ClassPanel extends StatelessWidget {
for (final String label in children)
Padding (
padding: const EdgeInsets.symmetric(vertical: 5),
child: LinkText(
label,
shouldTrimParams: true,
linkStyle: const TextStyle(color: Color(0xff0000EE)),
),
child: Text(label),
),
if (activity != null)
ActivityTile(activity!), // already checked for null
Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -392,14 +392,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
link_text:
dependency: "direct main"
description:
name: link_text
sha256: "5babfe3bcd987bb3f1dde61a47aa55ffd05137634a392385c899651e788d7ebc"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
matcher:
dependency: "direct dev"
description:
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ dependencies:
# flutter_native_timezone: ^2.0.0
url_launcher: ^6.0.3
adaptive_breakpoints: ^0.1.6
link_text: ^0.2.0
provider: ^6.0.5
meta: ^1.9.1
timezone: ^0.9.2
Expand Down

0 comments on commit 77b7b1f

Please sign in to comment.