-
Notifications
You must be signed in to change notification settings - Fork 32
/
tabbed_page_page.dart
71 lines (67 loc) · 2.06 KB
/
tabbed_page_page.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import 'package:flutter/material.dart';
import 'package:yaru_icons/yaru_icons.dart';
import 'package:yaru_widgets/yaru_widgets.dart';
class TabbedPagePage extends StatefulWidget {
const TabbedPagePage({
Key? key,
}) : super(key: key);
@override
State<TabbedPagePage> createState() => _TabbedPagePageState();
}
class _TabbedPagePageState extends State<TabbedPagePage> {
int _initialIndex = 0;
@override
Widget build(BuildContext context) {
return YaruTabbedPage(
onTap: (index) => _initialIndex = index,
initialIndex: _initialIndex,
views: [
YaruPage(
children: [
GridView(
shrinkWrap: true,
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
mainAxisExtent: 110,
mainAxisSpacing: 15,
crossAxisSpacing: 15,
maxCrossAxisExtent: 550,
),
children: [
for (int i = 0; i < 20; i++)
YaruBanner(
name: 'YaruBanner $i',
summary: 'Description',
fallbackIconData: YaruIcons.ubuntu_logo_large,
icon: Image.asset('assets/ubuntuhero.jpg'),
onTap: () => showAboutDialog(context: context),
)
],
)
],
),
YaruPage(children: [
YaruSection(
headline: 'Accessibility',
children: [Text('accessibility')],
)
]),
YaruPage(children: [Text('Audio')]),
YaruPage(children: [Text('AddressBook')]),
YaruPage(children: [Text('Television')])
],
tabIcons: [
YaruIcons.addon,
YaruIcons.accessibility,
YaruIcons.audio,
YaruIcons.address_book,
YaruIcons.television
],
tabTitles: [
'Addons',
'Accessibility',
'Audio',
'Address Book',
'Television'
]);
}
}