showMoreWindow method
Implementation
void showMoreWindow(BuildContext context) {
final RenderBox dropDownItemRenderBox =
context.findRenderObject() as RenderBox;
var position =
dropDownItemRenderBox.localToGlobal(Offset.zero, ancestor: null);
var size = dropDownItemRenderBox.size;
_brnTabbarController.top = size.height + position.dy;
OverlayEntry overlayEntry = OverlayEntry(builder: (context) {
return GestureDetector(
onTap: () {
hideMoreWindow();
},
onVerticalDragStart: (_) {
hideMoreWindow();
},
onHorizontalDragStart: (_) {
hideMoreWindow();
},
child: Container(
padding: EdgeInsets.only(
top: _brnTabbarController.top!,
),
child: Stack(
children: <Widget>[
Positioned(
width: MediaQuery.of(context).size.width,
left: 0,
child: Material(
color: const Color(0xB3000000),
child: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height -
_brnTabbarController.top!,
child: Padding(
padding: const EdgeInsets.all(0),
child: _TabBarOverlayWidget(
tabs: widget.tabs,
onTap: (index) {
if (widget.onTap != null) {
widget.onTap!(this, index);
}
},
moreWindowText: widget.moreWindowText,
brnTabbarController: _brnTabbarController,
themeData: widget.themeData!,
spacing: widget.themeData!.tagSpacing,
preLineTagCount: widget.themeData!.preLineTagCount,
tagHeight: widget.themeData!.tagHeight,
),
),
),
),
)
],
),
),
);
});
_brnTabbarController.screenHeight = MediaQuery.of(context).size.height;
if (_brnTabbarController.entry != null) {
resetEntry();
}
_brnTabbarController.entry = overlayEntry;
Overlay.of(context).insert(_brnTabbarController.entry!);
}