-
Notifications
You must be signed in to change notification settings - Fork 1
/
scrollable_with_appbar.dart
118 lines (117 loc) · 4.13 KB
/
scrollable_with_appbar.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import 'package:example/widgets/utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_side_navbar/flutter_side_navbar.dart';
class ScrollableWithAppbar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(
middle: Text('Sample Code'),
),
backgroundColor: Colors.white70,
child: SingleChildScrollView(
child: Column(
children: [
Utils.getContainer(height: 300, color: Colors.yellow),
SideNavbar(
shrinkWrap: true,
appBarIsShown: true,
physics: const NeverScrollableScrollPhysics(),
navigationBackgroundColor: Colors.black,
padding: const EdgeInsets.symmetric(horizontal: 20),
pages: [
SideItemModel(
defaultIconColor: Colors.blue,
onTap: () {},
page: Column(
children: [
Utils.getContainer(
height: 100,
color: Colors.red,
),
Utils.getContainer(
height: 300,
color: Colors.red,
),
Utils.getContainer(
height: 100,
color: Colors.red,
),
Utils.getContainer(
height: 50,
color: Colors.red,
),
Utils.getContainer(
height: 200,
color: Colors.red,
),
],
),
icon: Icons.home_filled,
),
SideItemModel(
defaultIconColor: Colors.blue,
onTap: () {},
page: Column(
children: [
Utils.getContainer(
height: 400,
color: Colors.green,
),
Utils.getContainer(
height: 100,
color: Colors.green,
),
Utils.getContainer(
height: 200,
color: Colors.green,
),
Utils.getContainer(
height: 100,
color: Colors.green,
),
],
),
icon: Icons.verified_user,
),
SideItemModel(
defaultIconColor: Colors.blue,
onTap: () {},
page: Column(
children: [
Utils.getContainer(
height: 100,
color: Colors.purple,
),
Utils.getContainer(
height: 100,
color: Colors.purple,
),
Utils.getContainer(
height: 100,
color: Colors.purple,
),
Utils.getContainer(
height: 100,
color: Colors.purple,
),
Utils.getContainer(
height: 100,
color: Colors.purple,
),
],
),
icon: Icons.lock_clock,
),
],
),
Utils.getContainer(height: 300, color: Colors.lightGreen),
],
),
),
),
);
}
}