Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. class Home extends StatelessWidget {
  4. @override
  5. Widget build(BuildContext context) {
  6. return Scaffold(
  7. appBar: AppBar(
  8. leading: Icon(
  9. Icons.camera_alt,
  10. color: Colors.black,
  11. ),
  12. backgroundColor: Colors.white,
  13. title: Text(
  14. "Instagram",
  15. style: TextStyle(
  16. fontFamily: "instagram",
  17. color: Colors.black,
  18. fontSize: 30,
  19. ),
  20. ),
  21. actions: <Widget>[
  22. Icon(
  23. Icons.send,
  24. color: Colors.black,
  25. ),
  26. ],
  27. ),
  28. body: CustomScrollView(
  29. slivers: <Widget>[
  30. SliverList(
  31. delegate: SliverChildListDelegate(<Widget>[
  32. Container(
  33. height: 100,
  34. child: ListView(
  35. scrollDirection: Axis.horizontal,
  36. children: List.generate(
  37. 10,
  38. (int index) {
  39. return Container(
  40. width: 50,
  41. height: 50,
  42. margin: const EdgeInsets.all(10),
  43. decoration: BoxDecoration(
  44. shape: BoxShape.circle,
  45. image: DecorationImage(
  46. fit: BoxFit.fill,
  47. image: AssetImage(
  48. "assets/image$index.png",
  49. ),
  50. ),
  51. ),
  52. );
  53. },
  54. ),
  55. ),
  56. ),
  57. Divider(
  58. height: 10,
  59. )
  60. ]),
  61. ),
  62. SliverList(
  63. delegate: SliverChildListDelegate(
  64. List.generate(
  65. 10,
  66. (int index) {
  67. return Column(
  68. children: <Widget>[
  69. ListTile(
  70. leading: CircleAvatar(
  71. backgroundImage: AssetImage("assets/image0.png"),
  72. ),
  73. title: Text(
  74. "Instagramer User",
  75. style: TextStyle(
  76. fontWeight: FontWeight.bold,
  77. ),
  78. ),
  79. ),
  80. Container(
  81. height: 300,
  82. child: Image.asset(
  83. "assets/$index.jpg",
  84. fit: BoxFit.fill,
  85. ),
  86. )
  87. ],
  88. );
  89. },
  90. ),
  91. ),
  92. ),
  93. ],
  94. ),
  95. bottomNavigationBar: BottomNavigationBar(
  96. fixedColor: Colors.black,
  97. type: BottomNavigationBarType.fixed,
  98. items: [
  99. BottomNavigationBarItem(
  100. icon: Icon(
  101. Icons.home,
  102. ),
  103. title: Text(""),
  104. ),
  105. BottomNavigationBarItem(
  106. icon: Icon(
  107. Icons.search,
  108. ),
  109. title: Text(""),
  110. ),
  111. BottomNavigationBarItem(
  112. icon: Icon(
  113. Icons.add_box,
  114. ),
  115. title: Text(""),
  116. ),
  117. BottomNavigationBarItem(
  118. icon: Icon(
  119. Icons.favorite_border,
  120. ),
  121. title: Text(""),
  122. ),
  123. BottomNavigationBarItem(
  124. icon: CircleAvatar(
  125. backgroundImage: AssetImage(
  126. "assets/image0.png",
  127. ),
  128. ),
  129. title: Text(""),
  130. ),
  131. ]),
  132. );
  133. }
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement