Git Product home page Git Product logo

Comments (5)

avenwu avatar avenwu commented on July 20, 2024 1

Hi @stefandevo , support of standalone FAB is quite reasonable. In fact this project is original inspired from this case. However I would I'd to make sure there are no misunderstanding. Please have check about the git bellow:
fab

In order to make the center tab as FAB style, you can confiture the AppBar with TabStyle.fixedCircle and provide the TabItem with a FAB as icon;

ConvexAppBar(
  style: TabStyle.fixedCircle,
  items: [
      TabItem<IconData>(icon: Icons.home, title: 'Home'),
      TabItem<IconData>(icon: Icons.map, title: "Discovery"),
      TabItem<Widget>(
          icon: FloatingActionButton(
            backgroundColor: Colors.purple,
            child: Icon(Icons.add, color: Colors.yellowAccent, size: 45,),
            onPressed: () {
              debugPrint('click fab');
            },), title: ''),
      TabItem<IconData>(icon: Icons.message, title: 'Message'),
      TabItem<IconData>(icon: Icons.people, title: 'Profile'),
    ],
  // other config ...
)

Hope this can satisfy your situation 😎

from convex_bottom_bar.

stefandevo avatar stefandevo commented on July 20, 2024 1

Okay! Clear.

I added:

            TabItem<Widget>(
                icon: Container(
                  child: Icon(
                    Icons.add,
                    color: Theme.of(context).bottomAppBarColor,
                    size: 45,
                  ),
                  decoration: BoxDecoration(
                    color: Theme.of(context).primaryColor,
                    shape: BoxShape.circle,
                  ),
                ),
                title: ''),

from convex_bottom_bar.

stefandevo avatar stefandevo commented on July 20, 2024

Wow! Exactly what I wanted. Was not aware of possibility to add a Widget instead of IconData.
Thx!

from convex_bottom_bar.

stefandevo avatar stefandevo commented on July 20, 2024

One issue maybe - is it possible to de-activate that last tab-icon. Let me explain, when I tap on the FAB I would like to have NO active tab-icons (so all in inactive state colored). How can this be done?

from convex_bottom_bar.

avenwu avatar avenwu commented on July 20, 2024

Short answer: Yes, you can.
In this case do not use the provided FAB, you may need to custom a new one. Since the FAB require a press callback which will override the TAB event.

from convex_bottom_bar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.