diff --git a/README.md b/README.md index 5c4f0a9..bfedea5 100644 --- a/README.md +++ b/README.md @@ -21,15 +21,15 @@ Now in your Dart code, you can use: import 'package:cool_nav/cool_nav.dart'; ``` -## List of Bottom Navigation Bars: +## List of Navigation Bars: -#### Spotlight Bottom Navigation Bar +#### Spotlight Navigation Bar -![Spotlight Bottom Navigation Bar](https://github.com/masterashu/flutter_cool_nav/blob/master/demo/spotlight_bottom_navigation_bar.gif?raw=true) +![Spotlight Navigation Bar](https://github.com/masterashu/flutter_cool_nav/blob/master/demo/spotlight_navigation_bar.gif?raw=true) > Based on [design](https://www.behance.net/gallery/94842819/Animated-Tab-Bar) made by [Sanchita Agarwal](https://www.linkedin.com/in/sanchita-agrawal-829a5612b). -An easy to use and customizable Bottom Navigation Bar. You can customize the +An easy to use and customizable Navigation Bar. You can customize the colors as well provide a custom [Gradient](https://api.flutter.dev/flutter/dart-ui/Gradient-class.html) for the spotlight. **Usage** @@ -37,26 +37,26 @@ colors as well provide a custom [Gradient](https://api.flutter.dev/flutter/dart- ```dart Scaffold( // ... - bottomNavigationBar: SpotlightBottomNavigationBar( + bottomNavigationBar: SpotlightNavigationBar( items: [ - SpotlightBottomNavigationBarItem(icon: Icons.smartphone), - SpotlightBottomNavigationBarItem(icon: Icons.laptop_mac), - SpotlightBottomNavigationBarItem(icon: Icons.desktop_mac), + SpotlightNavigationBarItem(icon: Icons.smartphone), + SpotlightNavigationBarItem(icon: Icons.laptop_mac), + SpotlightNavigationBarItem(icon: Icons.desktop_mac), ], - currentIndex: currentIndex, + selectedIndex: selectedIndex, selectedItemColor: Colors.cyan, onTap: _onTap, ), ) ``` -#### Flip Box Bottom Navigation Bar +#### Flip Box Navigation Bar -![Flip Box Bottom Navigation Bar](https://github.com/masterashu/flutter_cool_nav/blob/master/demo/flipbox_nav_bar.gif?raw=true) +![Flip Box Navigation Bar](https://github.com/masterashu/flutter_cool_nav/blob/master/demo/flipbox_navigation_bar.gif?raw=true) > Based on [design](https://dribbble.com/shots/4811135-Tab-Bar-Cube-Interaction) made by [dannniel](https://dribbble.com/dannniel). -An easy to use and customizable Bottom Navigation Bar. You can customize the selected and unselected `Icons` and background `Colors` for the tiles. +An easy to use and customizable Navigation Bar. You can customize the selected and unselected `Icons` and background `Colors` for the tiles. **Usage** @@ -64,7 +64,7 @@ An easy to use and customizable Bottom Navigation Bar. You can customize the sel Scaffold( // ... bottomNavigationBar: FlipBoxNavigationBar( - currentIndex: currentIndex, + selectedIndex: selectedIndex, verticalPadding: 20.0, items: [ FlipBoxNavigationBarItem( diff --git a/demo/flipbox_nav_bar.gif b/demo/flipbox_navigation_bar.gif similarity index 100% rename from demo/flipbox_nav_bar.gif rename to demo/flipbox_navigation_bar.gif diff --git a/demo/spotlight_bottom_navigation_bar.gif b/demo/spotlight_navigation_bar.gif similarity index 100% rename from demo/spotlight_bottom_navigation_bar.gif rename to demo/spotlight_navigation_bar.gif diff --git a/example/.metadata b/example/.metadata index 3408c2c..d00a406 100644 --- a/example/.metadata +++ b/example/.metadata @@ -15,7 +15,7 @@ migration: - platform: root create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - platform: linux + - platform: web create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 diff --git a/example/lib/flipbox_nav_bar.dart b/example/lib/flipbox_nav_bar.dart index 959934d..a83d149 100644 --- a/example/lib/flipbox_nav_bar.dart +++ b/example/lib/flipbox_nav_bar.dart @@ -10,18 +10,18 @@ class FlipBoxNavigationBarHome extends StatefulWidget { } class _FlipBoxNavigationBarHomeState extends State { - late int currentIndex; + late int selectedIndex; - _updateIndex(index) { + _updateSelectedIndex(index) { setState(() { - currentIndex = index; + selectedIndex = index; }); } @override void initState() { super.initState(); - currentIndex = 0; + selectedIndex = 0; } List texts = [ @@ -36,13 +36,13 @@ class _FlipBoxNavigationBarHomeState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Example'), + title: Text('Flipbox'), ), body: Center( - child: texts[currentIndex], + child: texts[selectedIndex], ), bottomNavigationBar: FlipBoxNavigationBar( - currentIndex: currentIndex, + selectedIndex: selectedIndex, verticalPadding: 20.0, items: [ FlipBoxNavigationBarItem( @@ -81,7 +81,7 @@ class _FlipBoxNavigationBarHomeState extends State { unselectedBackgroundColor: Colors.orangeAccent[100]!, ), ], - onTap: _updateIndex, + onDestinationSelected: _updateSelectedIndex, )); } } diff --git a/example/lib/main.dart b/example/lib/main.dart index 89d079b..0e6426a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,3 +1,4 @@ +import 'package:example/spotlight_nav_bar.dart'; import 'package:flutter/material.dart'; import 'flipbox_nav_bar.dart'; @@ -11,8 +12,16 @@ class MyApp extends StatelessWidget { theme: ThemeData( primarySwatch: Colors.blue, ), - // home: SpotlightNavigationBarHome(), - home: FlipBoxNavigationBarHome(), + home: Column( + children: [ + Expanded( + child: SpotlightNavBarHome(), + ), + Expanded( + child: FlipBoxNavigationBarHome(), + ), + ], + ), ); } } diff --git a/example/lib/spotlight_nav_bar.dart b/example/lib/spotlight_nav_bar.dart index 7423b60..b809fdf 100644 --- a/example/lib/spotlight_nav_bar.dart +++ b/example/lib/spotlight_nav_bar.dart @@ -9,18 +9,18 @@ class SpotlightNavBarHome extends StatefulWidget { } class _SpotlightNavBarHomeState extends State { - late int currentIndex; + late int selectedIndex; - _updateIndex(index) { + _updateSelectedIndex(index) { setState(() { - currentIndex = index; + selectedIndex = index; }); } @override void initState() { super.initState(); - currentIndex = 0; + selectedIndex = 0; } List texts = [ @@ -34,30 +34,20 @@ class _SpotlightNavBarHomeState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text("Example"), + title: Text("Spotlight"), ), body: Center( - child: texts[currentIndex], + child: texts[selectedIndex], ), - bottomNavigationBar: SpotlightBottomNavigationBar( + bottomNavigationBar: SpotlightNavigationBar( items: [ - SpotlightBottomNavigationBarItem(icon: Icons.smartphone), - SpotlightBottomNavigationBarItem(icon: Icons.web), - SpotlightBottomNavigationBarItem(icon: Icons.laptop_mac), - SpotlightBottomNavigationBarItem(icon: Icons.desktop_mac), + SpotlightNavigationBarItem(icon: Icons.smartphone), + SpotlightNavigationBarItem(icon: Icons.laptop_mac), + SpotlightNavigationBarItem(icon: Icons.desktop_mac), ], - currentIndex: currentIndex, - onTap: _updateIndex, - backgroundColor: Colors.white, - selectedItemColor: Colors.purple, - spotlightGradient: RadialGradient(colors: [ - Colors.indigo, - Colors.blue.withAlpha(200), - Colors.green.withAlpha(150), - Colors.yellow.withAlpha(100), - Colors.orange.withAlpha(50), - Colors.red.withAlpha(0), - ], center: Alignment.topCenter), + selectedIndex: selectedIndex, + selectedItemColor: Colors.cyan, + onDestinationSelected: _updateSelectedIndex, ), ); } diff --git a/example/pubspec.lock b/example/pubspec.lock index 9d4db00..b349aca 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -47,7 +47,7 @@ packages: path: ".." relative: true source: path - version: "0.1.0" + version: "0.1.1" cupertino_icons: dependency: "direct main" description: diff --git a/example/web/favicon.png b/example/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/example/web/favicon.png differ diff --git a/example/web/icons/Icon-192.png b/example/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/example/web/icons/Icon-192.png differ diff --git a/example/web/icons/Icon-512.png b/example/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/example/web/icons/Icon-512.png differ diff --git a/example/web/icons/Icon-maskable-192.png b/example/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/example/web/icons/Icon-maskable-192.png differ diff --git a/example/web/icons/Icon-maskable-512.png b/example/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/example/web/icons/Icon-maskable-512.png differ diff --git a/example/web/index.html b/example/web/index.html new file mode 100644 index 0000000..45cf2ca --- /dev/null +++ b/example/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + example + + + + + + + + + + diff --git a/example/web/manifest.json b/example/web/manifest.json new file mode 100644 index 0000000..096edf8 --- /dev/null +++ b/example/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "example", + "short_name": "example", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/lib/src/flipbox_navbar/filpbox_navbar.dart b/lib/src/flipbox_navbar/filpbox_navbar.dart index 0b97566..6d2e572 100644 --- a/lib/src/flipbox_navbar/filpbox_navbar.dart +++ b/lib/src/flipbox_navbar/filpbox_navbar.dart @@ -2,13 +2,13 @@ import 'dart:math' show pi, max; import 'package:flutter/material.dart'; -/// A Custom Bottom Navigation Bar that is displayed at the bottom of the +/// A Custom Navigation Bar that is displayed at the bottom of the /// screen. The [FlipBoxNavigationBar] animated between the selected and /// the unselected state it similar to a the rotation of a rectangle box. /// This navigation bar is usually can be used in a [Scaffold], by providing /// it as the [Scaffold.bottomNavigationBar] argument. class FlipBoxNavigationBar extends StatefulWidget { - /// Creates a flip box bottom navigation bar which can be used with + /// Creates a flip box navigation bar which can be used with /// [Scaffold]'s [Scaffold.bottomNavigationBar] argument. /// /// The length of [items] should be at least three. @@ -22,7 +22,7 @@ class FlipBoxNavigationBar extends StatefulWidget { /// [duration] must be greater than 100ms. FlipBoxNavigationBar({ required this.items, - this.currentIndex = 0, + this.selectedIndex = 0, this.selectedItemTheme = const IconThemeData(size: 24.0, color: Colors.black), this.unselectedItemTheme = @@ -31,25 +31,25 @@ class FlipBoxNavigationBar extends StatefulWidget { this.backgroundColor, this.textStyle, this.duration = const Duration(milliseconds: 800), - this.onTap, + this.onDestinationSelected, Key? key, }) : assert(items.length >= 3), assert(duration > const Duration(milliseconds: 100)), assert(verticalPadding >= 4.0), super(key: key); - /// Defines the list of items to show on the bottom navigation bar. + /// Defines the list of items to show on the navigation bar. final List items; /// The index of the selected [FlipBoxNavigationBar] in [items]. - final int currentIndex; + final int selectedIndex; /// Called when one of the [items] is tapped. /// - /// The stateful widget that creates the bottom navigation bar needs to keep + /// The stateful widget that creates the navigation bar needs to keep /// track of the index of the selected [FlipBoxNavigationBar] and call - /// `setState` to rebuild the bottom navigation bar with the new [currentIndex]. - final ValueChanged? onTap; + /// `setState` to rebuild the navigation bar with the new [selectedIndex]. + final ValueChanged? onDestinationSelected; /// Defines the size and color of the item's icon when it is selected. final IconThemeData selectedItemTheme; @@ -196,12 +196,12 @@ class _FlipBoxNavigationBarState extends State // Starts the flip animation switchIndex() { - if (oldIndex != widget.currentIndex) { + if (oldIndex != widget.selectedIndex) { _controllers![oldIndex!].reverse(from: 1.0); - _controllers![widget.currentIndex].forward(from: 0.0); + _controllers![widget.selectedIndex].forward(from: 0.0); } else { // partially animate the selected tile - _controllers![widget.currentIndex].forward(from: 0.8); + _controllers![widget.selectedIndex].forward(from: 0.8); } } @@ -209,7 +209,7 @@ class _FlipBoxNavigationBarState extends State void initState() { super.initState(); resetState(); - oldIndex = widget.currentIndex; + oldIndex = widget.selectedIndex; switchIndex(); } @@ -219,9 +219,9 @@ class _FlipBoxNavigationBarState extends State // Reset controllers when length of items is changed if (oldWidget.items.length != widget.items.length) { resetState(); - oldIndex = widget.currentIndex; + oldIndex = widget.selectedIndex; } else { - oldIndex = oldWidget.currentIndex; + oldIndex = oldWidget.selectedIndex; } switchIndex(); } @@ -232,8 +232,8 @@ class _FlipBoxNavigationBarState extends State return Expanded( child: GestureDetector( onTap: () { - if (widget.onTap != null) { - widget.onTap!(index); + if (widget.onDestinationSelected != null) { + widget.onDestinationSelected!(index); } }, child: FlipBoxNavigationBarTile( diff --git a/lib/src/spotlight_navbar/spotlight_navbar.dart b/lib/src/spotlight_navbar/spotlight_navbar.dart index 6042357..f8ba283 100644 --- a/lib/src/spotlight_navbar/spotlight_navbar.dart +++ b/lib/src/spotlight_navbar/spotlight_navbar.dart @@ -2,12 +2,12 @@ import 'dart:math'; import 'package:flutter/material.dart'; -/// A Custom Bottom Navigation Bar that is displayed at the bottom of the +/// A Custom Navigation Bar that is displayed at the bottom of the /// screen. The [SpotlightNavigationBar] shows a spotlight over the /// selected item. This navigation bar is usually can be used in a [Scaffold], /// by providing it as the [Scaffold.bottomNavigationBar] argument. -class SpotlightBottomNavigationBar extends StatefulWidget { - /// Creates a spotlight bottom navigation bar which can be used with +class SpotlightNavigationBar extends StatefulWidget { + /// Creates a spotlight navigation bar which can be used with /// [Scaffold]'s [Scaffold.bottomNavigationBar] argument. /// /// The length of [items] should be at least 2 and each item's icon property @@ -28,11 +28,11 @@ class SpotlightBottomNavigationBar extends StatefulWidget { /// /// The [spotlightGradient] parameter can be used to give a custom [Gradient] /// for the spotlight. - SpotlightBottomNavigationBar({ + SpotlightNavigationBar({ Key? key, required this.items, - this.onTap, - required this.currentIndex, + this.onDestinationSelected, + required this.selectedIndex, this.darkTheme = true, this.unselectedItemColor = const Color(0xff666666), this.selectedItemColor = const Color(0xffffffff), @@ -42,7 +42,7 @@ class SpotlightBottomNavigationBar extends StatefulWidget { this.selectedIconTheme, this.spotlightGradient, }) : assert(items.length >= 2), - assert(0 <= currentIndex && currentIndex < items.length), + assert(0 <= selectedIndex && selectedIndex < items.length), assert(iconSize >= 0.0), assert(unselectedIconTheme == null || (unselectedIconTheme.color != null && @@ -53,36 +53,36 @@ class SpotlightBottomNavigationBar extends StatefulWidget { super(key: key); /// Defines the list of items which will be shown in the navigation bar. - final List items; + final List items; /// Called when one of the [items] is tapped. /// - /// The stateful widget that creates the bottom navigation bar needs to keep - /// track of the index of the selected [SpotlightBottomNavigationBar] and call - /// `setState` to rebuild the bottom navigation bar with the new [currentIndex]. - final ValueChanged? onTap; + /// The stateful widget that creates the navigation bar needs to keep + /// track of the index of the selected [SpotlightNavigationBar] and call + /// `setState` to rebuild the navigation bar with the new [selectedIndex]. + final ValueChanged? onDestinationSelected; - /// The index of the selected [SpotlightBottomNavigationBarItem] in [items]. - final int currentIndex; + /// The index of the selected [SpotlightNavigationBarItem] in [items]. + final int selectedIndex; - /// TODO Implement Dark/Light Themes + // TODO Implement Dark/Light Themes final bool darkTheme; - /// The color of unselected [BottomNavigationBarItem.icon]s. + /// The color of unselected [NavigationDestination.icon]s. final Color unselectedItemColor; - /// The color of selected [BottomNavigationBarItem.icon], current item + /// The color of selected [NavigationDestination.icon], current item /// header and the color of the spotlight if [spotlightGradient] is not provided. final Color selectedItemColor; - /// The color of the [SpotlightBottomNavigationBar] itself. + /// The color of the [SpotlightNavigationBar] itself. final Color backgroundColor; - /// The size of the [SpotlightBottomNavigationBarItem] icons. + /// The size of the [SpotlightNavigationBarItem] icons. final double iconSize; /// The size, opacity, and color of the icon in the currently selected - /// [SpotlightBottomNavigationBarItem.icon]. + /// [SpotlightNavigationBarItem.icon]. /// /// If this is not provided, the size will default to [iconSize], the color /// will default to [unselectedItemColor]. @@ -92,7 +92,7 @@ class SpotlightBottomNavigationBar extends StatefulWidget { final IconThemeData? unselectedIconTheme; /// The size, opacity, and color of the icon in the currently selected - /// [SpotlightBottomNavigationBarItem.icon]. + /// [SpotlightNavigationBarItem.icon]. /// /// If this is not provided, the size will default to [iconSize], the color /// will default to [selectedItemColor]. @@ -102,16 +102,15 @@ class SpotlightBottomNavigationBar extends StatefulWidget { final IconThemeData? selectedIconTheme; /// The custom [Gradient] to use for the spotlight of the selected - /// [BottomNavigationBarItem]. + /// [NavigationDestination]. final Gradient? spotlightGradient; @override - _SpotlightBottomNavigationBarState createState() => - _SpotlightBottomNavigationBarState(); + _SpotlightNavigationBarState createState() => _SpotlightNavigationBarState(); } -class _SpotlightBottomNavigationBarState - extends State with TickerProviderStateMixin { +class _SpotlightNavigationBarState extends State + with TickerProviderStateMixin { late AnimationController animation; // The previous selectedIndex of the widget. Used to animate the top bar. @@ -129,21 +128,21 @@ class _SpotlightBottomNavigationBarState void initState() { super.initState(); _resetState(); - oldIndex = widget.currentIndex; + oldIndex = widget.selectedIndex; // only show spotlight FadeIn Animation animation.forward(from: 0.5); } @override - void didUpdateWidget(SpotlightBottomNavigationBar oldWidget) { + void didUpdateWidget(SpotlightNavigationBar oldWidget) { super.didUpdateWidget(oldWidget); - if (widget.currentIndex != oldWidget.currentIndex) { + if (widget.selectedIndex != oldWidget.selectedIndex) { _resetState(); - oldIndex = oldWidget.currentIndex; + oldIndex = oldWidget.selectedIndex; } if (widget.items.length != oldWidget.items.length) { _resetState(); - oldIndex = widget.currentIndex; + oldIndex = widget.selectedIndex; } animation.forward(); } @@ -165,20 +164,40 @@ class _SpotlightBottomNavigationBarState } } - _buildItems() { + _buildItems(Animation opacityTween) { List tiles = []; for (var i = 0; i < widget.items.length; i++) { tiles.add(Expanded( child: GestureDetector( - child: _SpotlightNavigationBarTile( - key: UniqueKey(), - icon: widget.items[i].icon, - iconTheme: _getThemeData( - (widget.currentIndex == i) && animation.value >= 0.7), + child: Center( + child: Stack( + children: [ + if (widget.selectedIndex == i && + opacityTween.status == AnimationStatus.completed) + Opacity( + opacity: opacityTween.value, + child: CustomPaint( + painter: _SpotlightPainter( + offset: Offset(widget.iconSize / 2 + 3.5, 0), + iconSize: widget.iconSize, + gradient: widget.spotlightGradient, + color: widget.selectedIconTheme?.color ?? + widget.selectedItemColor, + ), + ), + ), + _SpotlightNavigationBarTile( + key: UniqueKey(), + icon: widget.items[i].icon, + iconTheme: _getThemeData( + (widget.selectedIndex == i) && animation.value >= 0.7), + ), + ], + ), ), onTap: () { - if (widget.onTap != null) { - widget.onTap!(i); + if (widget.onDestinationSelected != null) { + widget.onDestinationSelected!(i); } }, behavior: HitTestBehavior.translucent, @@ -188,18 +207,11 @@ class _SpotlightBottomNavigationBarState return tiles; } - _spotlightOffset(BuildContext context) { - var freeSpace = (MediaQuery.of(context).size.width / widget.items.length) - - widget.iconSize; - var pos = (animation.value >= 0.5) ? widget.currentIndex : oldIndex; - return Offset(freeSpace / 2 + (freeSpace + widget.iconSize) * pos, 0); - } - @override Widget build(BuildContext context) { return Container( height: max(56.0, (widget.iconSize + 24)), - width: MediaQuery.of(context).size.width, + width: double.infinity, decoration: BoxDecoration(color: widget.backgroundColor), child: AnimatedBuilder( animation: animation, @@ -209,22 +221,11 @@ class _SpotlightBottomNavigationBarState CurvedAnimation(parent: animation, curve: Interval(0.8, 1.0))) : Tween(begin: 1.0, end: 0.0).animate(CurvedAnimation( parent: animation, curve: Interval(0.0, 0.2))); + return Stack( children: [ - Opacity( - opacity: opacityTween.value, - child: CustomPaint( - painter: _SpotlightPainter( - offset: _spotlightOffset(context), - iconSize: widget.iconSize, - gradient: widget.spotlightGradient, - color: widget.selectedIconTheme?.color ?? - widget.selectedItemColor, - ), - ), - ), Row( - children: _buildItems(), + children: _buildItems(opacityTween), mainAxisAlignment: MainAxisAlignment.spaceAround, ), CustomPaint( @@ -234,15 +235,15 @@ class _SpotlightBottomNavigationBarState color: widget.selectedIconTheme?.color ?? widget.selectedItemColor, oldPosition: oldIndex, - newPosition: widget.currentIndex, + newPosition: widget.selectedIndex, animation: Tween(begin: 0.0, end: 1.0).animate( CurvedAnimation( parent: animation, curve: Interval(0.1, 0.6))), ), child: SizedBox( - width: MediaQuery.of(context).size.width, + width: double.infinity, ), - ) + ), ], ); }, @@ -251,15 +252,15 @@ class _SpotlightBottomNavigationBarState } } -/// An item that is used with [SpotlightBottomNavigationBar] containing the +/// An item that is used with [SpotlightNavigationBar] containing the /// information about the items to display. -class SpotlightBottomNavigationBarItem { - /// Creates an item that is used with [SpotlightBottomNavigationBar.items]. +class SpotlightNavigationBarItem { + /// Creates an item that is used with [SpotlightNavigationBar.items]. /// - /// The argument [icon] should not be null when used in a Material Design's [BottomNavigationBar]. - SpotlightBottomNavigationBarItem({required this.icon}); + /// The argument [icon] should not be null when used in a Material Design's [NavigationBar]. + SpotlightNavigationBarItem({required this.icon}); - /// The Icon which will be shown on the [SpotlightBottomNavigationBar] + /// The Icon which will be shown on the [SpotlightNavigationBar] final IconData icon; } diff --git a/pubspec.lock b/pubspec.lock index 7e0fe89..a0798dc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.17.2" fake_async: dependency: transitive description: @@ -79,10 +79,10 @@ packages: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.9.1" path: dependency: transitive description: @@ -108,18 +108,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.1" string_scanner: dependency: transitive description: @@ -140,10 +140,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.6.0" vector_math: dependency: transitive description: @@ -156,9 +156,9 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.1.4-beta" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 1429c74..66356ff 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: cool_nav -description: A collection of really awesome, easy to use Bottom Navigation Bars. +description: A collection of really awesome, easy to use Navigation Bars. version: 0.1.1 homepage: https://github.com/masterashu/flutter_cool_nav repository: https://github.com/masterashu/flutter_cool_nav