标签:button extends select list ora expand art padding 背景
import ‘package:flutter/material.dart‘;
class ClassIf extends StatelessWidget{
@override
Widget build(BuildContext context) {
// TODO: implement build
return DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
title: Row( // 或者buttom
children: <Widget>[
Expanded(
flex: 1,
child: TabBar(
tabs: <Widget>[
Tab(text: ‘分类一‘),
Tab(text: ‘分类二‘)
],
),
)
],
),
),
body: TabBarView(
children: <Widget>[
ListView(
children: <Widget>[
Text(‘132‘),
Text(‘132‘),
Text(‘132‘),
],
),
ListView(
children: <Widget>[
Text(‘132‘),
Text(‘132‘),
Text(‘132‘),
],
)
],
),
),
);
}
}
AppBar 自定义顶部导航按钮 图标、颜色 以及 TabBar 定义顶部 Tab 切换
标签:button extends select list ora expand art padding 背景
原文地址:https://www.cnblogs.com/zhaofeis/p/12341167.html