You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansu_ui/example/lib/example_scaffold.dart

56 lines
1.3 KiB

import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart';
4 years ago
import 'package:get/get.dart';
class ExampleScaffold extends StatefulWidget {
ExampleScaffold({Key key}) : super(key: key);
@override
_ExampleScaffoldState createState() => _ExampleScaffoldState();
}
class _ExampleScaffoldState extends State<ExampleScaffold>
with TickerProviderStateMixin {
TabController _tabController;
List<String> tabs;
@override
void initState() {
super.initState();
tabs = List.generate(10, (index) => 'Tab $index');
_tabController = TabController(
length: tabs.length,
vsync: this,
);
}
@override
Widget build(BuildContext context) {
return ASScaffold(
4 years ago
title: '标题 SCaffold',
appBarBottom: ASTabBar(
items: tabs,
isScrollable: true,
controller: _tabController,
),
4 years ago
endDrawer: ASDrawer(
child: Text('DRAWER'),
),
body: ListView(
children: [
Builder(
builder: (context) {
return TextButton(
onPressed: () {
Scaffold.of(context).openEndDrawer();
},
child: Text('open drawer'),
);
},
)
],
),
);
}
}