dynamic_tabs 0.0.8

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new75

dynamic_tabs #

A Flutter plugin for letting the user edit the bottom tabs like the Curpertino iTunes App.

Getting Started #

  • Set persistIndex to true for saving the index of the current tab to disk, everytime the app launches it will open the last tab opened
  • Tags must be set for each item and must be unique
  • There are 2 Modes DynamicTabScaffold.adaptive and DynamicTabScaffold. The latter just show material
  • When using adaptive mode the iOS Platform will be wrapped in a CupertinoTabBar and CurpertinoTabView, this means that the navigation can be perserved per tab and that the nav bar will be shown still on push. On Android it will push the whole screen
  • This widget allows you to use a stateless widget for navigation
  • This supports Dark Mode
  • If there are more than 5 Tabs there will be a 5th Tab Created Call "More" and it will show a list of the remaining tabs
  • On the edit screen the user can reorder that tabs to the nav bar as they wish, this will also be saved to disk
  • If Using .adaptive Cupertino Widgets are Required and YOu will have to provide the routes for the Navigator.
  • You can set the max number of tabs

Screenshots #

import 'package:flutter/material.dart';

import 'package:dynamic_tabs/dynamic_tabs.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.light(),
      home: new HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  const HomeScreen({
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return DynamicTabScaffold.adaptive(
      persistIndex: true,
      tabs: <DynamicTab>[
        DynamicTab(
          child: Container(
            color: Colors.redAccent,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Info"),
            icon: Icon(Icons.info),
          ),
          tag: "info", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.green,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Home"),
            icon: Icon(Icons.home),
          ),
          tag: "home", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.amber,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Account"),
            icon: Icon(Icons.account_circle),
          ),
          tag: "account", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.blueAccent,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Help"),
            icon: Icon(Icons.help),
          ),
          tag: "help", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.purple,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Settings"),
            icon: Icon(Icons.settings),
          ),
          tag: "settings", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.yellow,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Theme"),
            icon: Icon(Icons.palette),
          ),
          tag: "theme", // Must Be Unique
        ),
      ],
    );
  }
}

0.0.8 #

  • Updating to Support More

0.0.7 #

  • Adding Optional Tag if using multi sets of dynamic_tabs

0.0.6 #

  • Removing Title Generator, now just uses child
  • Removing Dependency for Platform Widgets
  • Support for iOS 11 Large Titles

0.0.5 #

  • Adding Necessary Routes for Cupertino Tab View

0.0.4 #

  • Adding Feedback for When Drag will succeed

0.0.3 #

  • Added 'maxTabs' to limit hoe many tabs to show before the edit tab.
  • Thanks to "UnqleSquid" from Reddit

0.0.1 #

  • Fixed Landscape View
  • Adding Optional Title Widget

0.0.1 #

  • Created Plugin.

example/README.md

dynamic_tabs_example #

import 'package:flutter/material.dart';

import 'package:dynamic_tabs/dynamic_tabs.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      routes: _buildRoutes(context),
      theme: ThemeData.light(),
      home: new HomeScreen(),
    );
  }
}

Map<String, WidgetBuilder> _buildRoutes(BuildContext context) =>
    <String, WidgetBuilder>{
      '/help': (BuildContext context) => HelpScreen(),
      '/about': (BuildContext context) => AboutScreen(),
    };

class HomeScreen extends StatelessWidget {
  const HomeScreen({
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return DynamicTabScaffold.adaptive(
      routes: _buildRoutes(context),
      persistIndex: true,
      tabs: <DynamicTab>[
        DynamicTab(
          child: Container(
            color: Colors.redAccent,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Info"),
            icon: Icon(Icons.info),
          ),
          tag: "info", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.green,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Home"),
            icon: Icon(Icons.home),
          ),
          tag: "home", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.amber,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Account"),
            icon: Icon(Icons.account_circle),
          ),
          tag: "account", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.blueAccent,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Help"),
            icon: Icon(Icons.help),
          ),
          tag: "help", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.purple,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Settings"),
            icon: Icon(Icons.settings),
          ),
          tag: "settings", // Must Be Unique
        ),
        DynamicTab(
          child: Container(
            color: Colors.yellow,
          ),
          tab: BottomNavigationBarItem(
            title: Text("Theme"),
            icon: Icon(Icons.palette),
          ),
          tag: "theme", // Must Be Unique
        ),
      ],
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  dynamic_tabs: ^0.0.8

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:dynamic_tabs/dynamic_tabs.dart';
  
Version Uploaded Documentation Archive
0.0.8 Mar 25, 2019 Go to the documentation of dynamic_tabs 0.0.8 Download dynamic_tabs 0.0.8 archive
0.0.7+1 Mar 7, 2019 Go to the documentation of dynamic_tabs 0.0.7+1 Download dynamic_tabs 0.0.7+1 archive
0.0.7 Mar 5, 2019 Go to the documentation of dynamic_tabs 0.0.7 Download dynamic_tabs 0.0.7 archive
0.0.6 Mar 3, 2019 Go to the documentation of dynamic_tabs 0.0.6 Download dynamic_tabs 0.0.6 archive
0.0.5 Mar 3, 2019 Go to the documentation of dynamic_tabs 0.0.5 Download dynamic_tabs 0.0.5 archive
0.0.4 Mar 3, 2019 Go to the documentation of dynamic_tabs 0.0.4 Download dynamic_tabs 0.0.4 archive
0.0.3 Mar 3, 2019 Go to the documentation of dynamic_tabs 0.0.3 Download dynamic_tabs 0.0.3 archive
0.0.2+5 Mar 3, 2019 Go to the documentation of dynamic_tabs 0.0.2+5 Download dynamic_tabs 0.0.2+5 archive
0.0.2+4 Mar 3, 2019 Go to the documentation of dynamic_tabs 0.0.2+4 Download dynamic_tabs 0.0.2+4 archive
0.0.2+3 Mar 2, 2019 Go to the documentation of dynamic_tabs 0.0.2+3 Download dynamic_tabs 0.0.2+3 archive

All 14 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
54
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
75
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.3.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/ui/edit_screen.dart.

Run flutter format to format lib/ui/edit_screen.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
auto_size_text ^1.0.0 1.1.0
cupertino_controllers ^0.0.3 0.0.3
flutter 0.0.0
path_provider ^0.5.0+1 0.5.0+1
shared_preferences ^0.5.1+1 0.5.1+2
Transitive dependencies
collection 1.14.11
flutter_slidable 0.4.9
flutter_sticky_header 0.3.4
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test