add automated screenshots, fastlane metadata, and appstream metainfo
Fixes #174, fixes #173, fixes #172
This commit is contained in:
parent
7fd4fbec0b
commit
c93004f060
3 changed files with 870 additions and 103 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import "package:flutter_hooks/flutter_hooks.dart";
|
||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||
import "package:flutter_riverpod/misc.dart";
|
||||
import "package:material_ui/material_ui.dart";
|
||||
import "package:nexus/controllers/active_account.dart";
|
||||
import "package:nexus/controllers/notification_request.dart";
|
||||
|
|
@ -11,6 +12,9 @@ class const AccountScope({
|
|||
required final Widget child,
|
||||
final List<ProviderObserver>? observers,
|
||||
final Duration? Function(int retryCount, Object error)? retry,
|
||||
|
||||
/// Applied to each account's scope, after its own, e.g. for test fakes
|
||||
final List<Override> overrides = const [],
|
||||
super.key,
|
||||
}) extends HookWidget {
|
||||
@override
|
||||
|
|
@ -34,6 +38,7 @@ class const AccountScope({
|
|||
NotificationRequestController.provider.overrideWithBuild(
|
||||
(_, _) => active.value.notificationRowId,
|
||||
),
|
||||
...overrides,
|
||||
],
|
||||
child: child,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -12,9 +12,18 @@ final class const AvatarOrHash(
|
|||
}) extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final color = ColorHash(title).color;
|
||||
final box = ColoredBox(
|
||||
color: ColorHash(title).color,
|
||||
child: Center(child: Icon(Icons.person, size: dimension / 2)),
|
||||
color: color,
|
||||
child: Center(
|
||||
child: Icon(
|
||||
Icons.person,
|
||||
size: dimension / 2,
|
||||
color: ThemeData.estimateBrightnessForColor(color) == .dark
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return SizedBox(
|
||||
|
|
|
|||
|
|
@ -10,28 +10,32 @@ import "package:nexus/models/event.dart";
|
|||
|
||||
/// A user's [name] in text, opening their popover when tapped. Unlike a widget
|
||||
/// in text, it wraps and ellipsizes with the rest of it.
|
||||
class UserSpan extends TextSpan {
|
||||
UserSpan(
|
||||
BuildContext context,
|
||||
String name, {
|
||||
required String userId,
|
||||
required TapGestureRecognizer recognizer,
|
||||
String? roomId,
|
||||
super.style,
|
||||
super.children,
|
||||
}) : super(
|
||||
text: name,
|
||||
recognizer: recognizer
|
||||
..onTapUp = (details) {
|
||||
if (!context.mounted) return;
|
||||
|
||||
context.showUserPopover(
|
||||
userId,
|
||||
roomId: roomId,
|
||||
anchor: context.globalRectAt(details.globalPosition),
|
||||
);
|
||||
},
|
||||
);
|
||||
// Can't be const, since it sets the recognizer's onTapUp
|
||||
// ignore: prefer_const_constructors_in_immutables
|
||||
class UserSpan(
|
||||
BuildContext context,
|
||||
String name, {
|
||||
required String userId,
|
||||
required TapGestureRecognizer recognizer,
|
||||
String? roomId,
|
||||
super.style,
|
||||
super.children,
|
||||
}) extends TextSpan {
|
||||
this
|
||||
: super(
|
||||
text: name,
|
||||
recognizer: recognizer
|
||||
..onTapUp = (details) {
|
||||
if (!context.mounted) return;
|
||||
|
||||
context.showUserPopover(
|
||||
userId,
|
||||
roomId: roomId,
|
||||
anchor: context.globalRectAt(details.globalPosition),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
factory UserSpan.sender(
|
||||
BuildContext context,
|
||||
|
|
|
|||
Loading…
Reference in a new issue