List<Widget> buildLandscap(MediaQueryData mediaquery,
PreferredSizeWidget appBar, Widget txListWidget) {
return [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Show Chart',
style: Theme.of(context).textTheme.title,
),
Switch.adaptive(
value: _showChart,
onChanged: (val) {
setState(() {
_showChart = val;
});
})
],
),
_showChart
? Container(
height: (mediaquery.size.height -
appBar.preferredSize.height -
mediaquery.padding.top) *
0.7,
child: Chart(_recentTransaction))
: txListWidget
];
}