import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/pages/brand_detail_page/brand_detail_page_skeleton.dart';
import 'package:zhiying_comm/util/base_bloc.dart';

import 'brand_detail_bloc.dart';

class BrandDetailPage extends StatefulWidget {
  @override
  _BrandDetailPageState createState() => _BrandDetailPageState();
}

class _BrandDetailPageState extends State<BrandDetailPage> {
  @override
  Widget build(BuildContext context) {
    return BlocProvider(child: BrandDetailContainer(), bloc: BrandDetailBloc());
  }
}

class BrandDetailContainer extends StatefulWidget {
  @override
  _BrandDetailContainerState createState() => _BrandDetailContainerState();
}

class _BrandDetailContainerState extends State<BrandDetailContainer> {
  BrandDetailBloc _bloc;

  @override
  void initState() {
    _bloc = BlocProvider.of<BrandDetailBloc>(context);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return StreamBuilder(
        stream: _bloc.outData,
        builder: (context, asny) {
          return Scaffold(body: BrandDetailPageSkeleton());
        });
  }
}
