slight cleanups
This commit is contained in:
parent
23046f08a9
commit
00f22d46b7
11 changed files with 24 additions and 33 deletions
|
|
@ -13,7 +13,7 @@ final class const HighlightWrapper(
|
|||
color: isHighlighted
|
||||
? Theme.of(context).colorScheme.onSurface.withAlpha(50)
|
||||
: Colors.transparent,
|
||||
duration: .new(milliseconds: 250),
|
||||
duration: Durations.medium1,
|
||||
child: Material(color: Colors.transparent, child: child),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class const SpoilerText(final String text, {super.key}) extends HookWidget {
|
|||
return InkWell(
|
||||
onTap: () => revealed.value = !revealed.value,
|
||||
child: AnimatedContainer(
|
||||
duration: const .new(milliseconds: 100),
|
||||
duration: Durations.short2,
|
||||
padding: const .symmetric(horizontal: 4, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: revealed.value ? Colors.transparent : Colors.blueGrey,
|
||||
|
|
|
|||
|
|
@ -98,10 +98,10 @@ class const NotificationsList({super.key})
|
|||
index: index,
|
||||
scrollController: scrollController,
|
||||
alignment: 0.5,
|
||||
duration: (_) => .new(milliseconds: 700),
|
||||
duration: (_) => Durations.extralong1,
|
||||
curve: (_) => Curves.easeInOut,
|
||||
);
|
||||
timer = Timer(.new(seconds: 1), () {
|
||||
timer = Timer(Durations.extralong4, () {
|
||||
highlightedId.value = null;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -81,11 +81,11 @@ class const SettingsPage({super.key}) extends ConsumerWidget {
|
|||
index: match.$1.$2,
|
||||
scrollController: scrollController,
|
||||
alignment: 0.5,
|
||||
duration: (_) => .new(milliseconds: 700),
|
||||
duration: (_) => Durations.extralong1,
|
||||
curve: (_) => Curves.easeInOut,
|
||||
);
|
||||
highlightedMatch.value = match.$1;
|
||||
await Future.delayed(.new(seconds: 1), () {
|
||||
await Future.delayed(Durations.extralong4, () {
|
||||
if (highlightedMatch.value == match.$1) {
|
||||
highlightedMatch.value = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ class const SettingsCategoryPage(
|
|||
index: initialHighlight!,
|
||||
scrollController: scrollController,
|
||||
alignment: 0.5,
|
||||
duration: (_) => .new(milliseconds: 700),
|
||||
duration: (_) => Durations.extralong1,
|
||||
curve: (_) => Curves.easeInOut,
|
||||
);
|
||||
timer = Timer(.new(seconds: 1), () {
|
||||
timer = Timer(Durations.extralong4, () {
|
||||
highlight.value = null;
|
||||
});
|
||||
listController.value.removeListener(listener);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class const ResetEncryptionSheet({
|
|||
final recoveryKey = await ref
|
||||
.read(ClientController.provider.notifier)
|
||||
.generateRecoveryKey(
|
||||
passphrase: usePassphrase.value ? passphrase : "",
|
||||
usePassphrase.value ? passphrase : "",
|
||||
);
|
||||
if (!context.mounted) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ final class const RoomChat({
|
|||
highlightedEvent.value = rowId;
|
||||
|
||||
await scroll.jumpToEvent(rowId);
|
||||
await Future.delayed(.new(milliseconds: 700), () {
|
||||
await Future.delayed(Durations.extralong1, () {
|
||||
if (highlightedEvent.value == rowId) {
|
||||
highlightedEvent.value = null;
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ final class const RoomChat({
|
|||
ignoring: scroll.atBottom,
|
||||
child: AnimatedOpacity(
|
||||
opacity: scroll.atBottom ? 0 : 1,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
duration: Durations.short4,
|
||||
child: FloatingActionButton.small(
|
||||
onPressed: scroll.jumpToBottom,
|
||||
child: const Icon(Icons.keyboard_arrow_down),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class const SyncStatusBanner({super.key}) extends ConsumerWidget {
|
|||
];
|
||||
|
||||
return AnimatedSize(
|
||||
duration: const .new(milliseconds: 200),
|
||||
duration: Durations.short4,
|
||||
alignment: .topCenter,
|
||||
child: banner == null
|
||||
? const SizedBox(width: double.infinity)
|
||||
|
|
|
|||
|
|
@ -233,13 +233,9 @@ final class const UserBottomSheet(
|
|||
shape: .square,
|
||||
icon: Icon(Icons.sports_martial_arts),
|
||||
label: Text("Kick"),
|
||||
decoration: .new(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
theme.colorScheme.error,
|
||||
),
|
||||
foregroundColor: WidgetStatePropertyAll(
|
||||
theme.colorScheme.onError,
|
||||
),
|
||||
decoration: .styleFrom(
|
||||
backgroundColor: theme.colorScheme.error,
|
||||
foregroundColor: theme.colorScheme.onError,
|
||||
),
|
||||
),
|
||||
|
||||
|
|
@ -248,13 +244,9 @@ final class const UserBottomSheet(
|
|||
shape: .square,
|
||||
icon: Icon(Icons.gavel),
|
||||
label: Text("Ban"),
|
||||
decoration: .new(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
theme.colorScheme.errorContainer,
|
||||
),
|
||||
foregroundColor: WidgetStatePropertyAll(
|
||||
theme.colorScheme.onErrorContainer,
|
||||
),
|
||||
decoration: .styleFrom(
|
||||
backgroundColor: theme.colorScheme.errorContainer,
|
||||
foregroundColor: theme.colorScheme.onErrorContainer,
|
||||
),
|
||||
),
|
||||
].map((e) => Expanded(child: e)).toList(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue