import 'package:base_app/res/index.dart';
import 'package:base_app/ui/pages/demo/tabPage/static_tab_page.dart';
import 'package:base_app/ui/pages/demo/tabPage/static_tab_page2.dart';
import 'package:base_app/ui/pages/main_left_page.dart';
import 'package:base_app/ui/widgets/common/button/large_button_widget.dart';
import 'package:base_app/utils/util_index.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

/// 简洁主页面
class DemoTabPage extends StatelessWidget {
  final String labelId;

  const DemoTabPage({Key key, this.labelId}) : super(key: key); // 页面的labelId

  @override
  Widget build(BuildContext context) {
    // 系统设置
    Widget tab1 = new LargeButton(
        text: '静态tab1',
        iconPath: "",
        onTap: () {
          NavigatorUtil.pushPage(
              context,
              new StaticTabPage(
                labelId: Ids.titleList,
                titleId: Ids.titleList,
              ));
          // RouteUtil.pushNamed(context, 'route_setting');
        });
    Widget tab2 = new LargeButton(
        text: '静态tab2',
        iconPath: "",
        onTap: () {
          NavigatorUtil.pushPage(
              context,
              new StaticTabPage2(
                labelId: Ids.titleList,
                titleId: Ids.titleList,
              ));
          // RouteUtil.pushNamed(context, 'route_setting');
        });
    // 全局
    return new SingleChildScrollView(
      physics: BouncingScrollPhysics(),
      child: new Column(
        children: <Widget>[Gaps.vGap15, tab1, tab2],
      ),
    );
  }
}
