mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 00:51:20 +00:00
refactor: Rename isUserPrimary to isPrimaryUser for User
This commit is contained in:
parent
dae535e35a
commit
7aa3305d23
|
@ -3,11 +3,11 @@ part of 'users.dart';
|
||||||
class _User extends StatelessWidget {
|
class _User extends StatelessWidget {
|
||||||
const _User({
|
const _User({
|
||||||
required this.user,
|
required this.user,
|
||||||
required this.isUserPrimary,
|
required this.isPrimaryUser,
|
||||||
});
|
});
|
||||||
|
|
||||||
final User user;
|
final User user;
|
||||||
final bool isUserPrimary;
|
final bool isPrimaryUser;
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) => InkWell(
|
Widget build(final BuildContext context) => InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -32,7 +32,7 @@ class _User extends StatelessWidget {
|
||||||
user.login,
|
user.login,
|
||||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||||
color: Theme.of(context).colorScheme.onBackground,
|
color: Theme.of(context).colorScheme.onBackground,
|
||||||
decoration: isUserPrimary
|
decoration: isPrimaryUser
|
||||||
? TextDecoration.underline
|
? TextDecoration.underline
|
||||||
: user.isFoundOnServer
|
: user.isFoundOnServer
|
||||||
? TextDecoration.none
|
? TextDecoration.none
|
||||||
|
|
|
@ -107,7 +107,7 @@ class UsersPage extends StatelessWidget {
|
||||||
itemBuilder:
|
itemBuilder:
|
||||||
(final BuildContext context, final int index) => _User(
|
(final BuildContext context, final int index) => _User(
|
||||||
user: users[index],
|
user: users[index],
|
||||||
isUserPrimary: users[index].type == UserType.primary,
|
isPrimaryUser: users[index].type == UserType.primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue