import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:empty/components/grid_list.dart'; import 'package:empty/constants.dart'; class MindScreen extends StatefulWidget { @override _MindScreenState createState() => _MindScreenState(); } class _MindScreenState extends State { @override void initState() { // TODO: implement initState super.initState(); panelController.close(); if (!isPlaying) panelController.hide(); } @override Widget build(BuildContext context) { return DefaultTabController( length: 4, child: Column( children: [ Container( color: Color.fromRGBO(0, 41, 91, 0.8), constraints: BoxConstraints.expand(height: 50.0), child: TabBar( indicatorSize: TabBarIndicatorSize.tab, //isScrollable: true, tabs: [ Tab( child: Row( children: [ SvgPicture.asset( 'assets/icons/sbtn_Love.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Love') ], ), ), Tab( child: Row( children: [ SvgPicture.asset( 'assets/icons/sbtn_Hate.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Hate') ], ), ), Tab( child: Row( children: [ SvgPicture.asset( 'assets/icons/sbtn_Sleep.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Sleep') ], ), ), Tab( child: Row( children: [ SvgPicture.asset( 'assets/icons/sbtn_Food.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Food') ], ), ), ], ), ), Expanded( child: Container( child: TabBarView(children: [ GridListView( type: 'mind', section: 'love', rcmd: '', page: 1, size: 10), GridListView( type: 'mind', section: 'hate', rcmd: '', page: 1, size: 10), GridListView( type: 'mind', section: 'sleep', rcmd: '', page: 1, size: 10), GridListView( type: 'mind', section: 'food', rcmd: '', page: 1, size: 10), ]), )) ], ), ); } }