mirror of
https://github.com/block/buzz.git
synced 2026-10-30 22:11:36 +00:00
## Summary - add sticky date headers that crossfade with in-timeline dates - replace the Latest pill with a centered down-arrow control - animate the control out from its bottom-center anchor <img width="630" height="1368" alt="2AF1BB3F-B295-4084-8A65-90AED60B58B5" src="https://github.com/user-attachments/assets/505de450-66f5-4628-8c59-34b5511ffb5c" /> ## Validation - `bin/just mobile-check` - `bin/just mobile-test` (1,359 tests) - Android debug and signed iOS release builds --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Kenny Lopez <klopez4212@gmail.com> Co-authored-by: Fast Fizz <2df81cb51f05a9d5387ef24d7b9ecb8fcdfcd1c70ffabc67061c9596e1b5b1c4@buzz.block.builderlab.xyz>
45 lines
1.2 KiB
Dart
45 lines
1.2 KiB
Dart
import 'package:buzz/features/channels/day_divider.dart';
|
|
import 'package:buzz/shared/theme/theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
testWidgets('fades the in-flow date while that day is sticky', (
|
|
tester,
|
|
) async {
|
|
final stickyDayTimestamp = ValueNotifier<int?>(null);
|
|
addTearDown(stickyDayTimestamp.dispose);
|
|
|
|
await tester.pumpWidget(
|
|
MaterialApp(
|
|
theme: AppTheme.light(),
|
|
home: Scaffold(
|
|
body: DayDivider(
|
|
label: 'Today',
|
|
dayTimestamp: 1000,
|
|
stickyDayTimestamp: stickyDayTimestamp,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
|
|
AnimatedOpacity opacity() => tester.widget<AnimatedOpacity>(
|
|
find.byKey(const ValueKey('channel-day-divider-opacity-1000')),
|
|
);
|
|
|
|
expect(opacity().opacity, 1);
|
|
|
|
stickyDayTimestamp.value = 1000;
|
|
await tester.pump();
|
|
|
|
expect(opacity().opacity, 0);
|
|
expect(opacity().duration, const Duration(milliseconds: 120));
|
|
expect(opacity().curve, Curves.easeOutCubic);
|
|
|
|
stickyDayTimestamp.value = null;
|
|
await tester.pump();
|
|
|
|
expect(opacity().opacity, 1);
|
|
});
|
|
}
|