addButtonsCopyExportSearch function
dynamic
addButtonsCopyExportSearch(})
Implementation
addButtonsCopyExportSearch(List<Widget> list, Function() _copy, Function() _csv, bool isMobile,
Map<String, String> langCopyExportSearch, Function(String) _onSearch, int _pRange, Function(String value) setRange,
{bool showSearchField = true}){
if (langCopyExportSearch.isEmpty)
return Container();
if (isMobile) {
list.add(Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
button2(langCopyExportSearch["copy"]!, aTheme.mainColor, _copy), // "Copy",
SizedBox(width: 10,),
button2(langCopyExportSearch["export_csv"]!, aTheme.mainColor, _csv),// "Export to CSV",
Expanded(child: Container(),),
],
));
list.add(SizedBox(height: 10,));
list.add(Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(langCopyExportSearch["show"]!, style: aTheme.style14W400,), // "Show",
Container(
width: 120,
child: Combo(inRow: true, text: "",
data: _paginData,
value: _pRange.toString(),
onChange: setRange
// (String value){
// _pRange = int.parse(value);
// setState(() {});
// },
)
),
SizedBox(width: 5,),
Text(langCopyExportSearch["entries"]!, style: aTheme.style14W400,), // "entries",
],
));
list.add(SizedBox(height: 10,));
if (showSearchField)
list.add(Container(width: 120,
child: textElement2(langCopyExportSearch["search"]!, "", null, (String val){
paginationSetPage(1);
_onSearch(val);
}))); /// "Search",
}else{
list.add(Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
button2small(langCopyExportSearch["copy"]!, _copy), // "Copy",
SizedBox(width: 10,),
button2small(langCopyExportSearch["export_csv"]!, _csv), // "Export to CSV",
Expanded(child: Container(),),
//
Text(langCopyExportSearch["show"]!, style: aTheme.style14W400,), // "Show",
Container(
width: 120,
child: Combo(inRow: true, text: "",
data: _paginData,
value: _pRange.toString(),
onChange: setRange)
),
SizedBox(width: 5,),
Text(langCopyExportSearch["entries"]!, style: aTheme.style14W400,), // "entries",
//
SizedBox(width: 30,),
if (showSearchField)
Container(width: 200,
child: textElement2(langCopyExportSearch["search"]!, "", null, _onSearch))
],
));
}
list.add(SizedBox(height: 10,));
}