tx_navibar 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 64

tx_navibar #

A interesting bottom navibar. example.gif

Run the example #

You can run this example like this ...

cd example
flutter create .
flutter run

How To Use #

Import the library in your pubspec.yaml as this.

tx_navibar: 0.1.1

It is very simple , you can use this package like ... .

_tabChange(int index, bool isChange) {
    print("index:$index--isChange:$isChange");
    if (isChange) {
      _controller.jumpToPage(index);
      _currentIndex = index;
      print("_currentIndex:$_currentIndex");
      setState(() {});
    }
  }
var bottomNaviBar = TXBottomNaviBar(
        tabChange: _tabChange,
        items: [
          BottomNaviItem(
              title: "Home",
              icon: "assets/home.png",
              backgroudColor: kHomeMainColor),
          BottomNaviItem(
              title: "Likes",
              icon: "assets/like.png",
              backgroudColor: kLikesMainColor),
          BottomNaviItem(
              title: "Search",
              icon: "assets/search.png",
              backgroudColor: kSearchMainColor),
          BottomNaviItem(
              title: "Profile",
              icon: "assets/person.png",
              backgroudColor: kProfileMainColor),
        ],
      );

Continue......

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.1.1] - optimize the code.

[0.1.0] - commit the 0.1.0 release version.

  • Wellcome,hope this package could make your work easily.

example/README.md

tx_navibar #

A interesting bottom navibar example with tx_navibar. example.gif

Run the example #

You can run this example like this ...

cd example
flutter create .
flutter run

How To Use #

Import the library in your pubspec.yaml as this.

tx_navibar: 0.1.1

It is very simple , you can use this package like ... .

_tabChange(int index, bool isChange) {
    print("index:$index--isChange:$isChange");
    if (isChange) {
      _controller.jumpToPage(index);
      _currentIndex = index;
      print("_currentIndex:$_currentIndex");
      setState(() {});
    }
  }
var bottomNaviBar = TXBottomNaviBar(
        tabChange: _tabChange,
        items: [
          BottomNaviItem(
              title: "Home",
              icon: "assets/home.png",
              backgroudColor: kHomeMainColor),
          BottomNaviItem(
              title: "Likes",
              icon: "assets/like.png",
              backgroudColor: kLikesMainColor),
          BottomNaviItem(
              title: "Search",
              icon: "assets/search.png",
              backgroudColor: kSearchMainColor),
          BottomNaviItem(
              title: "Profile",
              icon: "assets/person.png",
              backgroudColor: kProfileMainColor),
        ],
      );

Continue......

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  tx_navibar: ^0.1.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:tx_navibar/tx_navibar.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
28
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Dec 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.13.1+4
  • Flutter: 1.12.13+hotfix.2

Health suggestions

Fix lib/tx_navibar.dart. (-0.50 points)

Analysis of lib/tx_navibar.dart reported 1 hint:

line 261 col 10: This method overrides a method annotated as @mustCallSuper in 'AutomaticKeepAliveClientMixin', but doesn't invoke the overridden method.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test