Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.0.0 #187

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
eec1e62
Use `NavBarOverlap.none()` as the default for `navBarOverlap`
jb3rndt Mar 24, 2024
9a077e3
Moved ItemConfig opacity and filter to NavBarDecoration
jb3rndt Apr 10, 2024
9a74969
Merge branch 'master' into v6.0.0
jb3rndt Apr 10, 2024
10822e7
Remove controller onIndexChanged and listen instead
jb3rndt Oct 20, 2024
2cb4729
Merge branch 'master' into v6.0.0
jb3rndt Oct 20, 2024
df1423f
Merge branch 'v6.0.0' of https://github.com/jb3rndt/PersistentBottomN…
jb3rndt Oct 20, 2024
880e65e
Remove deprecated use of onWillPop
jb3rndt Oct 20, 2024
5ba9741
Fix viewInset when resizeToAvoidBottomInset is set to false
jb3rndt Oct 20, 2024
5a0492d
Some configs and cleanups
jb3rndt Oct 20, 2024
7d17f9c
Generate NavigatorKey directly in config
jb3rndt Oct 20, 2024
dd15bab
Linter fixes
jb3rndt Oct 20, 2024
d05bac6
Allow changing the number of tabs at runtime
jb3rndt Oct 20, 2024
df04fe8
Remove selectedTabContext
jb3rndt Oct 20, 2024
36c3fe1
Clean up TabSwitchingView
jb3rndt Oct 20, 2024
cd71d30
Update changelog and remove deprecated onWillPop
jb3rndt Oct 20, 2024
2a6e87f
Add hideOnScrollVelocity to allow hiding the NavBar when scrolling down
jb3rndt Oct 21, 2024
01a448a
Update README
jb3rndt Oct 22, 2024
7438092
Replaced popAllScreensOnTapAnyTabs with keepNavigatorHistory
jb3rndt Oct 22, 2024
6a739ff
Add SelectedTabPressConfig, bundle some scattered settings into that …
jb3rndt Oct 23, 2024
b1210da
Add tests for SelectedTabPressConfig
jb3rndt Oct 23, 2024
00c690e
Add function to pop all screens of the current tab
jb3rndt Oct 23, 2024
be9befc
Add previousIndex to controller
jb3rndt Oct 25, 2024
4a3245f
Add animated icons
jb3rndt Oct 25, 2024
24bd019
Update readme announcing v6 and v6 syntax
jb3rndt Oct 25, 2024
657cdae
Remove `navBarHeight` use the height of each style instead
jb3rndt Oct 25, 2024
e2c60c7
Update flutter version in ci
jb3rndt Oct 25, 2024
f4ca026
Merge branch 'master' into v6.0.0
jb3rndt Oct 28, 2024
bb3d585
Update codecov and checkout steps in ci
jb3rndt Oct 28, 2024
fb29cca
Merge branch 'v6.0.0' of https://github.com/jb3rndt/PersistentBottomN…
jb3rndt Oct 28, 2024
1d72259
Refactor tests
jb3rndt Oct 28, 2024
f15c5e6
Add missing navigator functions tests
jb3rndt Oct 28, 2024
e20771a
Fix tab view scaffold to rerender once the animation finished to upda…
jb3rndt Oct 29, 2024
635023e
Animate initial animated icon instantly
jb3rndt Oct 29, 2024
1e568dd
Add tests for animated icons and navigator configuration
jb3rndt Oct 29, 2024
d3324c4
Add go_router tests, navbar color filter and PersistentTabConfig.noSc…
jb3rndt Oct 29, 2024
22ee14b
Here come the tests
jb3rndt Oct 29, 2024
69dfb76
Add tests for gesture navigation and hiding the navigation bar at run…
jb3rndt Oct 29, 2024
6c16f27
Format
jb3rndt Oct 29, 2024
8199836
Update pubspec.lock
jb3rndt Oct 29, 2024
9ee9654
Fix SwipableTabSwitchingView not disposing pages if statemanagement i…
jb3rndt Oct 30, 2024
3c8fbdf
Fix focus node deposing when removing tabs at runtime
jb3rndt Oct 30, 2024
7c8d75f
Add tests for screen transition animation
jb3rndt Oct 30, 2024
02e0141
Refactor PageTransitionAnimation and add tests
jb3rndt Nov 1, 2024
8d55200
Add models tests
jb3rndt Nov 1, 2024
2d28549
Add slideUp test
jb3rndt Nov 1, 2024
474266a
Change model test to testWidgets
jb3rndt Nov 1, 2024
01cd3ae
Add cupertino and material page transition test
jb3rndt Nov 1, 2024
ea47e31
Add tab switching to navbar style test
jb3rndt Nov 1, 2024
30ccb82
Add copywith tests
jb3rndt Nov 2, 2024
33e4d3f
Add controller tests
jb3rndt Nov 2, 2024
ef2208d
Add neumorphic tests
jb3rndt Nov 2, 2024
67197c3
Fix neumorphic test
jb3rndt Nov 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add slideUp test
jb3rndt committed Nov 1, 2024
commit 2d28549e8075ed230e65093e7705ccc26cc8bbd7
57 changes: 44 additions & 13 deletions test/page_route_transitions_test.dart
Original file line number Diff line number Diff line change
@@ -15,12 +15,39 @@ Widget mainScreen(void Function() onPressed) => MaterialApp(

void main() {
group("PageTransitionAnimation", () {
testWidgets("slideUp", (tester) async {
await tester.pumpWidget(
mainScreen(() {
Navigator.of(tester.element(find.text("Push Route"))).push(
getPageRoute(
PageTransitionAnimation.slideUp,
screen: const Column(
children: [
Text("SlideUp"),
],
),
),
);
}),
);

await tester.tap(find.text("Push Route"));
await tester.pump(Durations.short1);
await tester.pump(Durations.short1);
expect(tester.getCenter(find.byType(Column)).dy, greaterThan(400));

await tester.pumpAndSettle();

expect(find.text("SlideUp"), findsOneWidget);
});

testWidgets("slideRight", (tester) async {
await tester.pumpWidget(
mainScreen(() {
Navigator.of(tester.element(find.text("Push Route"))).push(
SlideRightPageRoute(
page: const Column(
getPageRoute(
PageTransitionAnimation.slideRight,
screen: const Column(
children: [
Text("SlideRight"),
],
@@ -33,7 +60,6 @@ void main() {
await tester.tap(find.text("Push Route"));
await tester.pump(Durations.short1);
await tester.pump(Durations.short1);
// 400 is the horizontal center of the screen, so tab 0 should leave towards the right and tab 1 should enter from the left
expect(tester.getCenter(find.byType(Column)).dx, lessThan(0));

await tester.pumpAndSettle();
@@ -45,8 +71,9 @@ void main() {
await tester.pumpWidget(
mainScreen(() {
Navigator.of(tester.element(find.text("Push Route"))).push(
ScalePageRoute(
page: const Column(
getPageRoute(
PageTransitionAnimation.scale,
screen: const Column(
children: [
Text("Scale"),
],
@@ -72,8 +99,9 @@ void main() {
await tester.pumpWidget(
mainScreen(() {
Navigator.of(tester.element(find.text("Push Route"))).push(
RotationPageRoute(
page: const Column(
getPageRoute(
PageTransitionAnimation.rotate,
screen: const Column(
children: [
Text("Rotate"),
],
@@ -93,8 +121,9 @@ void main() {
await tester.pumpWidget(
mainScreen(() {
Navigator.of(tester.element(find.text("Push Route"))).push(
SizePageRoute(
page: const Column(
getPageRoute(
PageTransitionAnimation.sizeUp,
screen: const Column(
children: [
Text("SizeUp"),
],
@@ -120,8 +149,9 @@ void main() {
await tester.pumpWidget(
mainScreen(() {
Navigator.of(tester.element(find.text("Push Route"))).push(
FadePageRoute(
page: const Column(
getPageRoute(
PageTransitionAnimation.fade,
screen: const Column(
children: [
Text("Fade"),
],
@@ -141,8 +171,9 @@ void main() {
await tester.pumpWidget(
mainScreen(() {
Navigator.of(tester.element(find.text("Push Route"))).push(
ScaleRotatePageRoute(
page: const Column(
getPageRoute(
PageTransitionAnimation.scaleRotate,
screen: const Column(
children: [
Text("ScaleRotate"),
],
Loading