forked from Nexus/nexus
treewide: use dot shorthands where possible
Now this feature is stable, we should use it. I might have missed some usecases, but these can be added in future commits.
This commit is contained in:
parent
6281c1d13a
commit
d2ec5f035b
67 changed files with 391 additions and 534 deletions
|
|
@ -3,7 +3,6 @@ import "package:flutter_riverpod/flutter_riverpod.dart";
|
|||
import "package:nexus/controllers/user_controller.dart";
|
||||
import "package:nexus/helpers/extensions/link_to_mention.dart";
|
||||
import "package:nexus/helpers/extensions/show_user_popover.dart";
|
||||
import "package:nexus/models/configs/user_config.dart";
|
||||
|
||||
class MentionChip extends ConsumerWidget {
|
||||
final String? roomId;
|
||||
|
|
@ -16,9 +15,7 @@ class MentionChip extends ConsumerWidget {
|
|||
final membership = mention?.startsWith("@") == true
|
||||
? ref
|
||||
.watch(
|
||||
UserController.provider(
|
||||
UserConfig(roomId: roomId, userId: mention!),
|
||||
),
|
||||
UserController.provider(.new(roomId: roomId, userId: mention!)),
|
||||
)
|
||||
.whenOrNull(data: (data) => data)
|
||||
: null;
|
||||
|
|
@ -41,8 +38,8 @@ class MentionChip extends ConsumerWidget {
|
|||
label: Text(
|
||||
(membership == null ? null : "@${membership.displayName}") ??
|
||||
mention,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
style: .new(
|
||||
fontWeight: .bold,
|
||||
color: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue