mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-22 14:10:37 -04:00
fix giant toilet
This commit is contained in:
parent
5a6b57e8ec
commit
b8eca1161e
2 changed files with 14 additions and 10 deletions
|
@ -4,6 +4,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|||
import 'package:flutter_translate/flutter_translate.dart';
|
||||
|
||||
import '../../proto/proto.dart' as proto;
|
||||
import '../../theme/theme.dart';
|
||||
|
||||
class AvailabilityWidget extends StatelessWidget {
|
||||
const AvailabilityWidget(
|
||||
|
@ -13,6 +14,7 @@ class AvailabilityWidget extends StatelessWidget {
|
|||
super.key});
|
||||
|
||||
static Widget availabilityIcon(
|
||||
BuildContext context,
|
||||
proto.Availability availability,
|
||||
Color color,
|
||||
) {
|
||||
|
@ -20,15 +22,17 @@ class AvailabilityWidget extends StatelessWidget {
|
|||
switch (availability) {
|
||||
case proto.Availability.AVAILABILITY_AWAY:
|
||||
icon = SvgPicture.asset('assets/images/toilet.svg',
|
||||
width: 24.scaled(context),
|
||||
height: 24.scaled(context),
|
||||
colorFilter: ColorFilter.mode(color, BlendMode.srcATop));
|
||||
case proto.Availability.AVAILABILITY_BUSY:
|
||||
icon = const Icon(Icons.event_busy, applyTextScaling: true);
|
||||
icon = Icon(size: 24.scaled(context), Icons.event_busy);
|
||||
case proto.Availability.AVAILABILITY_FREE:
|
||||
icon = const Icon(Icons.event_available, applyTextScaling: true);
|
||||
icon = Icon(size: 24.scaled(context), Icons.event_available);
|
||||
case proto.Availability.AVAILABILITY_OFFLINE:
|
||||
icon = const Icon(Icons.cloud_off, applyTextScaling: true);
|
||||
icon = Icon(size: 24.scaled(context), Icons.cloud_off);
|
||||
case proto.Availability.AVAILABILITY_UNSPECIFIED:
|
||||
icon = const Icon(Icons.question_mark, applyTextScaling: true);
|
||||
icon = Icon(size: 24.scaled(context), Icons.question_mark);
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
@ -56,7 +60,7 @@ class AvailabilityWidget extends StatelessWidget {
|
|||
final textTheme = theme.textTheme;
|
||||
|
||||
final name = availabilityName(availability);
|
||||
final icon = availabilityIcon(availability, color);
|
||||
final icon = availabilityIcon(context, availability, color);
|
||||
|
||||
return vertical
|
||||
? Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue