Advertisement
bngoding

tabbarview without searchbar

Dec 13th, 2021
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.73 KB | None | 0 0
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3.  
  4. class ListUser extends StatefulWidget {
  5.  
  6. @override
  7. _ListUser createState() => _ListUser();
  8. }
  9.  
  10. class _ListUser extends State<ListUser> {
  11.  
  12. @override
  13. Widget build(BuildContext context) {
  14. return DefaultTabController(
  15. length: 9,
  16. child: Scaffold(
  17. appBar: AppBar(
  18. bottom: const TabBar(
  19. isScrollable: true,
  20. tabs: [
  21. Tab(
  22. text: 'Semua',
  23. ),
  24. Tab(
  25. text: 'Project Manager',
  26. ),
  27. Tab(
  28. text: 'Project Director',
  29. ),
  30. Tab(
  31. text: 'Manager',
  32. ),
  33. Tab(
  34. text: 'Officer 1',
  35. ),
  36. Tab(
  37. text: 'Officer 2',
  38. ),
  39. Tab(
  40. text: 'Officer 1',
  41. ),
  42. Tab(
  43. text: 'Officer 2',
  44. ),
  45. Tab(
  46. text: 'Officer 1',
  47. )
  48. ]),
  49. ),
  50. body: TabBarView(
  51. children: [
  52. Container(
  53. color: Colors.white,
  54. child: Column(
  55. children: [
  56. Card(
  57. margin: EdgeInsets.all(13.0),
  58. elevation: 10,
  59. child: Row(
  60. children: <Widget>[
  61. Padding(
  62. padding: EdgeInsets.all(13.0),
  63. child: GestureDetector(
  64. onTap: () {
  65.  
  66. },
  67. child: Container(
  68. width: 46.0,
  69. height: 46.0,
  70. decoration: BoxDecoration(
  71. color: Colors.white,
  72. borderRadius:
  73. BorderRadius.all(Radius.circular(75.0)),
  74. boxShadow: [
  75. BoxShadow(blurRadius: 7.0, color: Colors.black)
  76. ]),
  77. ),
  78. ),
  79. ),
  80. GestureDetector(
  81. onTap: () {
  82. showDialog<void>(
  83. context: context,
  84. barrierDismissible: false,
  85. builder: (BuildContext conext) {
  86. return AlertDialog(
  87. title: Text('Not in stock'),
  88. content:
  89. const Text('This item is no longer available'),
  90. actions: <Widget>[
  91. FlatButton(
  92. child: Text('Ok'),
  93. onPressed: () {
  94. Navigator.of(context).pop();
  95. },
  96. ),
  97. ],
  98. );
  99. },
  100. );
  101. },
  102. child: Container(
  103. padding: EdgeInsets.all(30.0),
  104. child: Chip(
  105. label: Text('Angela Smith'),
  106. )),
  107. ),
  108. ],
  109. ),
  110. ),
  111. const Expanded(
  112. child: ListTile(
  113. leading: CircleAvatar(),
  114. title: Text('Angela Smith'),
  115. subtitle: Text('Project Manager'),
  116. trailing: Icon(Icons.more_vert),
  117. )
  118. ),
  119. const Expanded(
  120. child: ListTile(
  121. leading: CircleAvatar(),
  122. title: Text('Angela Smith'),
  123. subtitle: Text('Project Manager'),
  124. trailing: Icon(Icons.more_vert),
  125. )
  126. ),
  127. const Expanded(
  128. child: ListTile(
  129. leading: CircleAvatar(),
  130. title: Text('Angela Smith'),
  131. subtitle: Text('Project Manager'),
  132. trailing: Icon(Icons.more_vert),
  133. )
  134. ),
  135. const Expanded(
  136. child: ListTile(
  137. leading: CircleAvatar(),
  138. title: Text('Angela Smith'),
  139. subtitle: Text('Project Manager'),
  140. trailing: Icon(Icons.more_vert),
  141. )
  142. ),
  143. ElevatedButton(
  144. onPressed: () {},
  145. child: Text('+ Tambah Pengguna Baru')
  146. )
  147. ],
  148. ),
  149. ),
  150. Container(
  151. color: Colors.white,
  152. child: Column(
  153. children: [
  154. const Expanded(
  155. child: ListTile(
  156. leading: CircleAvatar(),
  157. title: Text('Angela Smith'),
  158. subtitle: Text('Project Manager'),
  159. trailing: Icon(Icons.more_vert),
  160. )
  161. ),
  162. const Expanded(
  163. child: ListTile(
  164. leading: CircleAvatar(),
  165. title: Text('Angela Smith'),
  166. subtitle: Text('Project Manager'),
  167. trailing: Icon(Icons.more_vert),
  168. )
  169. ),
  170. const Expanded(
  171. child: ListTile(
  172. leading: CircleAvatar(),
  173. title: Text('Angela Smith'),
  174. subtitle: Text('Project Manager'),
  175. trailing: Icon(Icons.more_vert),
  176. )
  177. ),
  178. const Expanded(
  179. child: ListTile(
  180. leading: CircleAvatar(),
  181. title: Text('Angela Smith'),
  182. subtitle: Text('Project Manager'),
  183. trailing: Icon(Icons.more_vert),
  184. )
  185. ),
  186. ElevatedButton(
  187. onPressed: () {},
  188. child: Text('+ Tambah Pengguna Baru')
  189. )
  190. ],
  191. ),
  192. ),
  193. Container(
  194. color: Colors.white,
  195. child: Column(
  196. children: [
  197. const Expanded(
  198. child: ListTile(
  199. leading: CircleAvatar(),
  200. title: Text('Angela Smith'),
  201. subtitle: Text('Project Manager'),
  202. trailing: Icon(Icons.more_vert),
  203. )
  204. ),
  205. const Expanded(
  206. child: ListTile(
  207. leading: CircleAvatar(),
  208. title: Text('Angela Smith'),
  209. subtitle: Text('Project Manager'),
  210. trailing: Icon(Icons.more_vert),
  211. )
  212. ),
  213. const Expanded(
  214. child: ListTile(
  215. leading: CircleAvatar(),
  216. title: Text('Angela Smith'),
  217. subtitle: Text('Project Manager'),
  218. trailing: Icon(Icons.more_vert),
  219. )
  220. ),
  221. const Expanded(
  222. child: ListTile(
  223. leading: CircleAvatar(),
  224. title: Text('Angela Smith'),
  225. subtitle: Text('Project Manager'),
  226. trailing: Icon(Icons.more_vert),
  227. )
  228. ),
  229. ElevatedButton(
  230. onPressed: () {},
  231. child: Text('+ Tambah Pengguna Baru')
  232. )
  233. ],
  234. ),
  235. ),
  236. Container(
  237. color: Colors.white,
  238. child: Column(
  239. children: [
  240. const Expanded(
  241. child: ListTile(
  242. leading: CircleAvatar(),
  243. title: Text('Angela Smith'),
  244. subtitle: Text('Project Manager'),
  245. trailing: Icon(Icons.more_vert),
  246. )
  247. ),
  248. const Expanded(
  249. child: ListTile(
  250. leading: CircleAvatar(),
  251. title: Text('Angela Smith'),
  252. subtitle: Text('Project Manager'),
  253. trailing: Icon(Icons.more_vert),
  254. )
  255. ),
  256. const Expanded(
  257. child: ListTile(
  258. leading: CircleAvatar(),
  259. title: Text('Angela Smith'),
  260. subtitle: Text('Project Manager'),
  261. trailing: Icon(Icons.more_vert),
  262. )
  263. ),
  264. const Expanded(
  265. child: ListTile(
  266. leading: CircleAvatar(),
  267. title: Text('Angela Smith'),
  268. subtitle: Text('Project Manager'),
  269. trailing: Icon(Icons.more_vert),
  270. )
  271. ),
  272. ElevatedButton(
  273. onPressed: () {},
  274. child: Text('+ Tambah Pengguna Baru')
  275. )
  276. ],
  277. ),
  278. ),
  279. Container(
  280. color: Colors.white,
  281. child: Column(
  282. children: [
  283. const Expanded(
  284. child: ListTile(
  285. leading: CircleAvatar(),
  286. title: Text('Angela Smith'),
  287. subtitle: Text('Project Manager'),
  288. trailing: Icon(Icons.more_vert),
  289. )
  290. ),
  291. const Expanded(
  292. child: ListTile(
  293. leading: CircleAvatar(),
  294. title: Text('Angela Smith'),
  295. subtitle: Text('Project Manager'),
  296. trailing: Icon(Icons.more_vert),
  297. )
  298. ),
  299. const Expanded(
  300. child: ListTile(
  301. leading: CircleAvatar(),
  302. title: Text('Angela Smith'),
  303. subtitle: Text('Project Manager'),
  304. trailing: Icon(Icons.more_vert),
  305. )
  306. ),
  307. const Expanded(
  308. child: ListTile(
  309. leading: CircleAvatar(),
  310. title: Text('Angela Smith'),
  311. subtitle: Text('Project Manager'),
  312. trailing: Icon(Icons.more_vert),
  313. )
  314. ),
  315. ElevatedButton(
  316. onPressed: () {},
  317. child: Text('+ Tambah Pengguna Baru')
  318. )
  319. ],
  320. ),
  321. ),
  322. Container(
  323. color: Colors.white,
  324. child: Column(
  325. children: [
  326. const Expanded(
  327. child: ListTile(
  328. leading: CircleAvatar(),
  329. title: Text('Angela Smith'),
  330. subtitle: Text('Project Manager'),
  331. trailing: Icon(Icons.more_vert),
  332. )
  333. ),
  334. const Expanded(
  335. child: ListTile(
  336. leading: CircleAvatar(),
  337. title: Text('Angela Smith'),
  338. subtitle: Text('Project Manager'),
  339. trailing: Icon(Icons.more_vert),
  340. )
  341. ),
  342. const Expanded(
  343. child: ListTile(
  344. leading: CircleAvatar(),
  345. title: Text('Angela Smith'),
  346. subtitle: Text('Project Manager'),
  347. trailing: Icon(Icons.more_vert),
  348. )
  349. ),
  350. const Expanded(
  351. child: ListTile(
  352. leading: CircleAvatar(),
  353. title: Text('Angela Smith'),
  354. subtitle: Text('Project Manager'),
  355. trailing: Icon(Icons.more_vert),
  356. )
  357. ),
  358. ElevatedButton(
  359. onPressed: () {},
  360. child: Text('+ Tambah Pengguna Baru')
  361. )
  362. ],
  363. ),
  364. ),
  365. Container(
  366. color: Colors.white,
  367. child: Column(
  368. children: [
  369. const Expanded(
  370. child: ListTile(
  371. leading: CircleAvatar(),
  372. title: Text('Angela Smith'),
  373. subtitle: Text('Project Manager'),
  374. trailing: Icon(Icons.more_vert),
  375. )
  376. ),
  377. const Expanded(
  378. child: ListTile(
  379. leading: CircleAvatar(),
  380. title: Text('Angela Smith'),
  381. subtitle: Text('Project Manager'),
  382. trailing: Icon(Icons.more_vert),
  383. )
  384. ),
  385. const Expanded(
  386. child: ListTile(
  387. leading: CircleAvatar(),
  388. title: Text('Angela Smith'),
  389. subtitle: Text('Project Manager'),
  390. trailing: Icon(Icons.more_vert),
  391. )
  392. ),
  393. const Expanded(
  394. child: ListTile(
  395. leading: CircleAvatar(),
  396. title: Text('Angela Smith'),
  397. subtitle: Text('Project Manager'),
  398. trailing: Icon(Icons.more_vert),
  399. )
  400. ),
  401. ElevatedButton(
  402. onPressed: () {},
  403. child: Text('+ Tambah Pengguna Baru')
  404. )
  405. ],
  406. ),
  407. ),
  408. Container(
  409. color: Colors.white,
  410. child: Column(
  411. children: [
  412. const Expanded(
  413. child: ListTile(
  414. leading: CircleAvatar(),
  415. title: Text('Angela Smith'),
  416. subtitle: Text('Project Manager'),
  417. trailing: Icon(Icons.more_vert),
  418. )
  419. ),
  420. const Expanded(
  421. child: ListTile(
  422. leading: CircleAvatar(),
  423. title: Text('Angela Smith'),
  424. subtitle: Text('Project Manager'),
  425. trailing: Icon(Icons.more_vert),
  426. )
  427. ),
  428. const Expanded(
  429. child: ListTile(
  430. leading: CircleAvatar(),
  431. title: Text('Angela Smith'),
  432. subtitle: Text('Project Manager'),
  433. trailing: Icon(Icons.more_vert),
  434. )
  435. ),
  436. const Expanded(
  437. child: ListTile(
  438. leading: CircleAvatar(),
  439. title: Text('Angela Smith'),
  440. subtitle: Text('Project Manager'),
  441. trailing: Icon(Icons.more_vert),
  442. )
  443. ),
  444. ElevatedButton(
  445. onPressed: () {},
  446. child: Text('+ Tambah Pengguna Baru')
  447. )
  448. ],
  449. ),
  450. ),
  451. Container(
  452. color: Colors.white,
  453. child: Column(
  454. children: [
  455. const Expanded(
  456. child: ListTile(
  457. leading: CircleAvatar(),
  458. title: Text('Angela Smith'),
  459. subtitle: Text('Project Manager'),
  460. trailing: Icon(Icons.more_vert),
  461. )
  462. ),
  463. const Expanded(
  464. child: ListTile(
  465. leading: CircleAvatar(),
  466. title: Text('Angela Smith'),
  467. subtitle: Text('Project Manager'),
  468. trailing: Icon(Icons.more_vert),
  469. )
  470. ),
  471. const Expanded(
  472. child: ListTile(
  473. leading: CircleAvatar(),
  474. title: Text('Angela Smith'),
  475. subtitle: Text('Project Manager'),
  476. trailing: Icon(Icons.more_vert),
  477. )
  478. ),
  479. const Expanded(
  480. child: ListTile(
  481. leading: CircleAvatar(),
  482. title: Text('Angela Smith'),
  483. subtitle: Text('Project Manager'),
  484. trailing: Icon(Icons.more_vert),
  485. )
  486. ),
  487. ElevatedButton(
  488. onPressed: () {},
  489. child: Text('+ Tambah Pengguna Baru')
  490. )
  491. ],
  492. ),
  493. ),
  494. ],
  495. ),
  496. ),
  497. );
  498. }
  499. //
  500. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement