Skip to content

Commit

Permalink
Merge branch 'main' into issue-42-swipe
Browse files Browse the repository at this point in the history
  • Loading branch information
bebaoboy authored Aug 18, 2024
2 parents 34a1131 + 42e7b1e commit 74066a9
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 28 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [0.7.6] Unreleased
## [0.7.6] August 18, 2024

- [Regression] Programmatically change Index [Issue #57](https://github.com/maheshj01/navbar_router/issues/57)
- Back button should call indexChangeListener [Issue #53](https://github.com/maheshmnj/navbar_router/issues/53)

## [0.7.5] July 12, 2024
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **navbar_router v0.7.5**
## **navbar_router v0.7.6**

<a href="https://github.com/maheshmnj/searchfield" rel="noopener" target="_blank"><img src="https://img.shields.io/badge/platform-flutter-ff69b4.svg" alt="Flutter Platform Badge"></a>
<a href="https://pub.dev/packages/navbar_router"><img src="https://img.shields.io/pub/v/navbar_router.svg" alt="Pub"></a>
Expand Down
21 changes: 17 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,22 @@ class _HomePageState extends ConsumerState<HomePage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const SizedBox(
width: 50,



width: 60,
),
FloatingActionButton.extended(
heroTag: 'RandomIndex',
onPressed: () {
int index = Random().nextInt(100);
NavbarNotifier.index = index % 4;
},
label: const Text("Random Index"),
),
const SizedBox(
width: 20,

),
FloatingActionButton.extended(
heroTag: 'showSnackBar',
Expand Down Expand Up @@ -383,9 +398,7 @@ class _HomeFeedsState extends State<HomeFeeds> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Feeds'),
),
appBar: AppBar(title: const Text('Feeds')),
body: ListView.builder(
controller: _scrollController,
itemCount: 30,
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish_to: "none"
version: 1.0.0+1

environment:
sdk: ">=2.18.0 <3.0.0"
sdk: ">=2.18.0 <4.0.0"

dependencies:
navbar_router:
Expand Down
1 change: 1 addition & 0 deletions lib/src/navbar_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ class _NavbarRouterState extends State<NavbarRouter>
child: AnimatedBuilder(
animation: _navbarNotifier,
builder: (context, child) {
_handleFadeAnimation();
return Stack(
children: [
AnimatedPadding(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: navbar_router
description: A flutter package to build advanced bottomnavbar with minimal code and hassle

version: 0.7.5
version: 0.7.6
homepage: https://github.com/maheshmnj/navbar_router
repository: https://github.com/maheshmnj/navbar_router
issue_tracker: https://github.com/maheshmnj/navbar_router/issues
Expand Down
59 changes: 39 additions & 20 deletions test/navbar_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ class _HomeFeedsState extends State<HomeFeeds> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Feeds'),
),
appBar: AppBar(title: const Text('Feeds')),
body: ListView.builder(
controller: _scrollController,
itemCount: 30,
Expand Down Expand Up @@ -131,26 +129,26 @@ class FeedTile extends StatelessWidget {
margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 8),
color: Theme.of(context).colorScheme.surface,
child: Card(
child: Stack(
child: Column(
children: [
Positioned(
top: 4,
right: 4,
left: 4,
child: Container(
height: 180,
margin:
const EdgeInsets.symmetric(horizontal: 8.0, vertical: 8),
Container(
height: 180,
margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 12),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary,
alignment: Alignment.center,
child: Text('Feed $index card'),
borderRadius: BorderRadius.circular(8.0),
),
child: Text('Feed $index card'),
),
Positioned(
bottom: 12,
right: 12,
left: 12,
child: Text(placeHolderText.substring(0, 200)))
Container(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
alignment: Alignment.center,
child: const Text(
placeHolderText,
maxLines: 4,
overflow: TextOverflow.ellipsis,
))
],
),
),
Expand Down Expand Up @@ -233,6 +231,11 @@ class _ProductListState extends State<ProductList> {
super.dispose();
}

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down Expand Up @@ -372,13 +375,29 @@ class UserProfile extends StatefulWidget {
class _UserProfileState extends State<UserProfile> {
final GlobalKey iconKey = GlobalKey();

final Uri _url = Uri.parse('https://docs.maheshjamdade.com/navbar_router/');

Future<void> _launchUrl() async {
throw Exception('Could not launch $_url');
}

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
appBar: AppBar(
centerTitle: false,
actions: [
IconButton(
tooltip: 'show Docs',
icon: const Icon(Icons.edit_document),
onPressed: _launchUrl,
),
IconButton(
key: iconKey,
icon: const Icon(Icons.edit),
Expand All @@ -391,7 +410,7 @@ class _UserProfileState extends State<UserProfile> {
offset: offset,
transitionType: TransitionType.reveal);
},
)
),
],
title: const Text('Hi User')),
body: Center(
Expand Down

0 comments on commit 74066a9

Please sign in to comment.