showPopup function
dynamic
showPopup()
Implementation
showPopup(){
var current = _getCurrentVisible();
// _redraw = redraw;
if (current == null)
return Container();
if (current.dialogPositionY == 0)
return Container();
List<Widget> list = [];
list.add(SizedBox(height: 10,));
list.add(Container(
margin: EdgeInsets.all(10),
child: Edit41web(controller: current.controllerSearch,
hint: _stringSearchText, /// search
onChange: (String val){
current.searchText = val;
redrawMainWindow();
}
)));
list.add(SizedBox(height: 10,));
for (var item in current.data.data) {
if (item.divider){
list.add(Divider(color: (aTheme.darkMode) ? Colors.white : Colors.grey,));
continue;
}
if (current.searchText.isNotEmpty) {
if (item.text.contains(current.searchText) || item.email.contains(current.searchText))
list.add(_item(item, current));
}
else
list.add(_item(item, current));
}
list.add(SizedBox(height: 10,));
return Container(
decoration: BoxDecoration(
color: (aTheme.darkMode) ? Colors.black : Colors.white,
border: Border.all(color: Colors.grey.withAlpha(80)),
borderRadius: BorderRadius.circular(3),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.1),
spreadRadius: 3,
blurRadius: 5,
offset: Offset(3, 3),
),
],
),
margin: EdgeInsets.only(top: current.dialogPositionY, left: current.dialogPositionX),
width: current.dialogWidth,
child: ListView(
padding: EdgeInsets.only(top: 0),
controller: current.controllerScroll,
shrinkWrap: true,
children: list,
),);
}