Refactor: Reduce .of(context) calls theme
Signed commit
This commit is contained in:
parent
a928ecec1e
commit
5d2aaef3ca
69 changed files with 525 additions and 501 deletions
|
|
@ -113,6 +113,8 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
|||
body: FutureBuilder<PublicRoomsChunk>(
|
||||
future: _search(),
|
||||
builder: (context, snapshot) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
final profile = snapshot.data;
|
||||
return ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
|
|
@ -150,8 +152,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
|||
size: 14,
|
||||
),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor:
|
||||
Theme.of(context).colorScheme.onSurface,
|
||||
foregroundColor: theme.colorScheme.onSurface,
|
||||
),
|
||||
label: Text(
|
||||
roomLink ?? '...',
|
||||
|
|
@ -166,8 +167,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
|||
size: 14,
|
||||
),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor:
|
||||
Theme.of(context).colorScheme.onSurface,
|
||||
foregroundColor: theme.colorScheme.onSurface,
|
||||
),
|
||||
label: Text(
|
||||
L10n.of(context)!.countParticipants(
|
||||
|
|
@ -211,7 +211,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
|||
),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).textTheme.bodyMedium!.color,
|
||||
color: theme.textTheme.bodyMedium!.color,
|
||||
),
|
||||
options: const LinkifyOptions(humanize: false),
|
||||
onOpen: (url) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue