import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/brand/brand_appbar/brand_appbar.dart';
import 'package:zhiying_base_widget/widgets/brand/brand_appbar/brand_appbar_sk.dart';
import 'package:zhiying_base_widget/widgets/brand/brand_list/brand_list.dart';
import 'package:zhiying_base_widget/widgets/brand/brand_list/brand_list_sk.dart';
import 'package:zhiying_base_widget/widgets/brand/tabbar/brand_tab_bar.dart';

class BrandPageSkeleton extends StatefulWidget {
  @override
  _BrandPageSkeletonState createState() => _BrandPageSkeletonState();
}

class _BrandPageSkeletonState extends State<BrandPageSkeleton>
    with TickerProviderStateMixin {
  TabController tabController;

  @override
  void initState() {
    tabController = TabController(length: 6, vsync: this);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return buildSkeleton();
    return Scaffold(
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          BrandAppBar(),
          BrandTabBar(tabController),
          Expanded(child: BrandList(tabController))
        ],
      ),
    );
  }

  @override
  void dispose() {
    tabController.dispose();
    super.dispose();
  }

  Widget buildSkeleton() {
    return Column(
      children: <Widget>[BrandAppBarSkeleton(), BrandListSkeleton()],
    );
  }
}
