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