0

Have existing code gallery app in which gallery Screen have two tab bar Image tab and Video tab. In both image tab screen and video tab screen have have separate bottom navigation bar. Bottom Navigation bar have basically select and share widget.

Now a new Bottom Navigation bar for whole app has been introduced because of which, image tab screen and video tab screen Navigation bar need to remove. And select and share widget funtionality need to move at common Appbar action of gallery screen(gallery screen is one of the widget of navigation bar now).

I have designed the Appbar in gallery screen that have Appbar action as well (in action only, need to move select and share widget). As gallery screen can have appbar action but its widget cab be assigned when move to image tab bar and video tab bar(as these existing tab bar already have existing widget implemenation).

I need something implementation or idea like as -

gallery_screen.dart

Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text('Gallery Screen in Action'),
        actions: [         
          actionTabBarWidget ??  Container(),
        ],
        bottom: _customBottomTabBar(),
      )
  }

image_screen.dart

actionTabBarWidget = imageActiontabbarWidget();

video_screen.dart

actionTabBarWidget = videoActiontabbarWidget();

Any help appreciated, Thanks in advance

Junsu Cho
  • 826
  • 7
  • 16
Noorus Khan
  • 1,342
  • 3
  • 15
  • 33

1 Answers1

0

using setState function,

ForExample

   setState(() {
      actionTabBarWidget = imageActiontabbarWidget();
    });
Junsu Cho
  • 826
  • 7
  • 16