will_tabbar 1.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • new55

will_tabbar #

A highly customisable and simple tabbar widget for having iOS 13 style tab bars. It is highly recommended to read the documentation and run the example project on a real device to fully understand and inspect the full range of capabilities.

Media #

Usage #

A simple usage example:

WillTabBar(
                onTap: (index){
                  setState(() {
                    willTabBarCurrentValue = index;
                  });
                },
                currentValue: (){
                  return willTabBarCurrentValue;
                },
                tabBarItemTitles: titles3,
                normalTextFontSize: 16,
                selectTextFontSize: 26,
                normalTextColor: Colors.green,
                selectTextColor: Colors.amber,
                customBarWidth: 0.8,
              )

Description #

This is a highly customisable and simple widget for having iOS 13 style tab bars. It is highly recommended to read the documentation and run the example project on a real device to fully understand and inspect the full range of capabilities.

Notes #

Any help, suggestion or criticism is appreciated!

Cheers.

[1.0.4] - 2020/02/29. #

Minor changes.

[1.0.3] - 2020/02/29. #

Minor changes.

[1.0.2] - 2020/02/29. #

Minor changes.

[1.0.1] - 2020/02/29. #

Minor changes.

[1.0.0] - 2020/02/29. #

Add Example.

[0.0.3] - 2020/02/29. #

Minor changes.

[0.0.2] - 2020/02/29. #

Minor changes.

[0.0.1] - 2020/02/29. #

Initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:will_tabbar/will_tabbar.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'WillTabbar Demo',
      home: MyHomePage(title: 'WillTabbar Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  int willTabBarCurrentValue = 0;
  int willTabBarValue() => willTabBarCurrentValue;
  void tabBarItemClicked(int index) {
    setState(() {
      willTabBarCurrentValue = index;
    });
  }

  int willTabBarCurrentValue1 = 0;
  int willTabBarValue1() => willTabBarCurrentValue1;
  void tabBarItemClicked1(int index) {
    setState(() {
      willTabBarCurrentValue1 = index;
    });
  }

  int willTabBarCurrentValue2 = 0;
  int willTabBarValue2() => willTabBarCurrentValue2;
  void tabBarItemClicked2(int index) {
    setState(() {
      willTabBarCurrentValue2 = index;
    });
  }

  int willTabBarCurrentValue3 = 0;
  int willTabBarValue3() => willTabBarCurrentValue3;
  void tabBarItemClicked3(int index) {
    setState(() {
      willTabBarCurrentValue3 = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    List<String> titles = [
      'Tab1',
      'Tab2',
    ];
    List<String> titles1 = [
      'Tab1',
      'Tab2',
      'Tab3',
    ];
    List<String> titles2 = [
      'Tab1',
      'Tab2',
      'Tab3',
      'Tab4',
    ];
    List<String> titles3 = [
      'Tab1',
      'Tab2',
      'Tab3',
      'Tab4',
      'Tab5',
    ];
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Container(
        decoration: BoxDecoration(color: Color(0xfff3f2f8)),
        child: ListView(
          children: <Widget>[
            WillTabBar(
                onTap: tabBarItemClicked,
                currentValue: willTabBarValue,
                tabBarItemTitles: titles,
                normalTextFontSize: 13,
                selectTextFontSize: 20,
                normalTextColor: Colors.green,
                selectTextColor: Colors.red),
            WillTabBar(
                onTap: tabBarItemClicked1,
                currentValue: willTabBarValue1,
                horizontalMargin: 60,
                tabBarItemTitles: titles1),
            WillTabBar(
                onTap: tabBarItemClicked2,
                currentValue: willTabBarValue2,
                tabBarItemTitles: titles2,
                normalTextFontSize: 14,
                selectTextFontSize: 22,
                horizontalMargin: 30,
                normalTextColor: Colors.black,
                selectTextColor: Colors.purple),
            WillTabBar(
              onTap: (index){
                setState(() {
                  willTabBarCurrentValue3 = index;
                });
              },
              currentValue: (){
                return willTabBarCurrentValue3;
              },
              tabBarItemTitles: titles3,
              normalTextFontSize: 16,
              selectTextFontSize: 26,
              normalTextColor: Colors.green,
              selectTextColor: Colors.amber,
              customBarWidth: 0.8,
            ),
          ],
        ),
      ) // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  will_tabbar: ^1.0.4

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:will_tabbar/will_tabbar.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
10
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]
55
Learn more about scoring.

We analyzed this package on Mar 26, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

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