android – flutter appbar not supporting RTL


I’m using appbar and I’ve added an Icon button in the leading.
by making the app RTL this button stays on the left and won’t come right.

because app is multi language and should support RTL. all the parts works but the appbar doesn’t.

// AppBar

appBar: AppBar(
        // automaticallyImplyLeading: false,
        elevation: 0.5,
        centerTitle: true,
        title: ValueListenableBuilder(
          valueListenable: globals.selectedBarIndex,
          builder: (context, value, Widget? child) {
            return Text(globals.navBarItems[globals.selectedBarIndex.value].text);
          },
        ),
        leading: IconButton(
          onPressed: _handleMenuButtonPressed,
          icon: ValueListenableBuilder<AdvancedDrawerValue>(
            valueListenable: widget.advancedDrawerController,
            builder: (_, value, __) {
              return AnimatedSwitcher(
                duration: const Duration(milliseconds: 250),
                child: Icon(
                  value.visible ? Icons.clear : Icons.menu,
                  key: ValueKey<bool>(value.visible),
                ),
              );
            },
          ),
        ),
      ),

enter image description here

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img