123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- 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<BodyScreen> {
- @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),
- ]),
- ))
- ],
- ),
- );
- }
- }
|