remymumoh

Untitled

Oct 13th, 2020
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'package:flutter/material.dart';
  2. import 'package:google_fonts/google_fonts.dart';
  3.  
  4. class GridDashboard extends StatelessWidget {
  5. Items item1 = new Items(
  6. title: "App update checker",
  7. subtitle: "",
  8. event: "",
  9. img: "assets/update.ico");
  10.  
  11. Items item2 = new Items(
  12. title: "Update Forms",
  13. subtitle: "",
  14. event: "",
  15. img: "assets/food.png",
  16. );
  17. Items item3 = new Items(
  18. title: "Forms",
  19. subtitle: "",
  20. event: "",
  21. img: "assets/todo.png",
  22.  
  23. );
  24. Items item4 = new Items(
  25. title: "Supervisor",
  26. subtitle: "",
  27. event: "",
  28. img: "assets/festival.png",
  29. );
  30. Items item5 = new Items(
  31. title: "Settings",
  32. subtitle: "",
  33. event: "",
  34. img: "assets/setting.png",
  35. );
  36. Items item6 = new Items(
  37. title: "Logout",
  38. subtitle: "",
  39. event: "",
  40. img: "assets/logout.png",
  41. );
  42.  
  43. @override
  44. Widget build(BuildContext context) {
  45. List<Items> myList = [item1, item2, item3, item4, item5, item6];
  46. var color = 0xff453658;
  47. return Flexible(
  48. child: GridView.count(
  49. childAspectRatio: 1.0,
  50. padding: EdgeInsets.only(left: 16, right: 12),
  51. crossAxisCount: 2,
  52. crossAxisSpacing: 18,
  53. mainAxisSpacing: 18,
  54. children: myList.map((data) {
  55. return Container(
  56. decoration: BoxDecoration(
  57. color: Color(color), borderRadius: BorderRadius.circular(10)),
  58. child: Column(
  59. mainAxisAlignment: MainAxisAlignment.center,
  60. children: <Widget>[
  61. Image.asset(
  62. data.img,
  63. width: 42,
  64. ),
  65. SizedBox(
  66. height: 14,
  67. ),
  68. Text(
  69. data.title,
  70. style: GoogleFonts.openSans(
  71. textStyle: TextStyle(
  72. color: Colors.white,
  73. fontSize: 16,
  74. fontWeight: FontWeight.w600)),
  75. ),
  76. SizedBox(
  77. height: 8,
  78. ),
  79. Text(
  80. data.subtitle,
  81. style: GoogleFonts.openSans(
  82. textStyle: TextStyle(
  83. color: Colors.white38,
  84. fontSize: 10,
  85. fontWeight: FontWeight.w600)),
  86. ),
  87. SizedBox(
  88. height: 14,
  89. ),
  90. Text(
  91. data.event,
  92. style: GoogleFonts.openSans(
  93. textStyle: TextStyle(
  94. color: Colors.white70,
  95. fontSize: 11,
  96. fontWeight: FontWeight.w600)),
  97. ),
  98. ],
  99. ),
  100. );
  101. }).toList()),
  102. );
  103. }
  104. }
  105.  
  106. class Items {
  107. String title;
  108. String subtitle;
  109. String event;
  110. String img;
  111. Items({this.title, this.subtitle, this.event, this.img});
  112. }
  113.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×