import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:empty/constants.dart'; import 'package:empty/components/grid_list.dart'; class BodyScreen extends StatefulWidget { @override _BodyScreenState createState() => _BodyScreenState(); } class _BodyScreenState 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_walk.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Walk') ], ), ), Tab( child: Row( children: [ SvgPicture.asset( 'assets/icons/sbtn_Stand.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Stay') ], ), ), Tab( child: Row( children: [ SvgPicture.asset( 'assets/icons/sbtn_Sit.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Sit') ], ), ), Tab( child: Row( children: [ SvgPicture.asset( 'assets/icons/sbtn_Lying.svg', width: 20, height: 20, ), SizedBox( width: 10, ), Text('Lying') ], ), ), ], ), ), Expanded( child: Container( child: TabBarView(children: [ GridListView( type: 'body', section: 'walk', rcmd: '', page: 1, size: 10), GridListView( type: 'body', section: 'stay', rcmd: '', page: 1, size: 10), GridListView( type: 'body', section: 'sit', rcmd: '', page: 1, size: 10), GridListView( type: 'body', section: 'lying', rcmd: '', page: 1, size: 10), ]), )) ], ), ); } }