mmi

homepage

mmi
Jul 30th, 2026 (edited)
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.63 KB | None | 0 0
  1. {
  2. "type": "scaffold",
  3. "appBar": {
  4. "type": "appBar",
  5. "title": { "type": "text", "data": "Validated Form" },
  6. "backgroundColor": "#4D00E9"
  7. },
  8. "body": {
  9. "type": "form",
  10. "child": {
  11. "type": "singleChildScrollView",
  12. "child": {
  13. "type": "container",
  14. "padding": { "left": 12, "right": 12, "top": 12, "bottom": 12 },
  15. "child": {
  16. "type": "column",
  17. "children": [
  18. { "type": "sizedBox", "height": 16 },
  19. {
  20. "type": "festivalMenuGrid",
  21. "grid": {
  22. "columns": 3,
  23. "crossAxisSpacing": 12,
  24. "mainAxisSpacing": 12,
  25. "childAspectRatio": 0.85
  26. },
  27. "theme": {
  28. "backgroundColor": "#FFFDF7","backgroundImage": "https://picsum.photos/500/800",
  29.  
  30. "sourceType": "network",
  31. "header": {
  32. "title": "Study Resources",
  33. "subtitle": "Select a category to explore material"
  34. },
  35. "card": {
  36. "backgroundColor": "#FFFFFF",
  37. "borderRadius": 12,
  38. "borderColor": "#E0E0E0",
  39. "selectedBorderColor": "#FF7A00",
  40. "selectedBorderWidth": 2.5,
  41. "shadow": true,
  42. "bottomWave": {
  43. "enabled": true,
  44. "colors": ["#FF9933", "#FFFFFF", "#128807"]
  45. }
  46. }
  47. },
  48. "items": [
  49. {
  50. "id": "syllabus",
  51. "title": "Syllabus",
  52. "icon": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/govt_jobs.svg",
  53. "selected": true,
  54. "route": "/syllabus"
  55. },
  56. {
  57. "id": "deleted_syllabus",
  58. "title": "Deleted\nSyllabus",
  59. "icon": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/govt_jobs.svg",
  60. "selected": false,
  61. "route": "/deleted-syllabus"
  62. },
  63. {
  64. "id": "study_material",
  65. "title": "Study Material",
  66. "icon": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/govt_jobs.svg",
  67. "selected": false,
  68. "route": "/study-material"
  69. },
  70. {
  71. "id": "ncert_books",
  72. "title": "Ncert Books",
  73. "icon": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/govt_jobs.svg",
  74. "selected": false,
  75. "route": "/ncert-books"
  76. },
  77. {
  78. "id": "ncert_exemplers",
  79. "title": "Ncert\nExemplers",
  80. "icon": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/govt_jobs.svg",
  81. "selected": false,
  82. "route": "/ncert-exemplers"
  83. },
  84. {
  85. "id": "important_questions",
  86. "title": "Important\nQuestions",
  87. "icon": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/engineer_new.svg",
  88. "selected": false,
  89. "route": "/important-questions"
  90. }
  91. ]
  92. },
  93. {
  94. "type": "singleChildScrollView",
  95. "child": {
  96. "type": "container",
  97. "padding": {
  98. "left": 16,
  99. "right": 16,
  100. "top": 16,
  101. "bottom": 16
  102. },
  103. "child": {
  104. "type": "gridView",
  105. "crossAxisCount": 3,
  106. "mainAxisSpacing": 12,
  107. "crossAxisSpacing": 12,
  108. "childAspectRatio": 0.8,
  109. "shrinkWrap": true,
  110.  
  111. "children": [
  112. {
  113. "type": "container",
  114. "decoration": {
  115. "color": "#FFFFFF",
  116. "borderRadius": 12,
  117. "border": {
  118. "color": "#4CAF50",
  119. "width": 1.5
  120. },
  121. "boxShadow": [
  122. {
  123. "color": "#1A000000",
  124. "blurRadius": 6,
  125. "offset": { "dx": 0, "dy": 2 }
  126. }
  127. ]
  128. },
  129. "child": {
  130. "type": "column",
  131. "mainAxisAlignment": "center",
  132. "children": [
  133. {
  134. "type": "svg",
  135. "sourceType": "network",
  136. "src": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/govt_jobs.svg",
  137. "width": 50,
  138. "height": 50
  139. },
  140. { "type": "sizedBox", "height": 8 },
  141. {
  142. "type": "text",
  143. "data": "Syllabus",
  144. "style": {
  145. "fontSize": 13,
  146. "fontWeight": "bold",
  147. "color": "#1F2937"
  148. }
  149. }
  150. ]
  151. }
  152. },
  153. {
  154. "type": "container",
  155. "decoration": {
  156. "color": "#FFFFFF",
  157. "borderRadius": 12,
  158. "border": {
  159. "color": "#4CAF50",
  160. "width": 1.5
  161. },
  162. "boxShadow": [
  163. {
  164. "color": "#1A000000",
  165. "blurRadius": 6,
  166. "offset": { "dx": 0, "dy": 2 }
  167. }
  168. ]
  169. },
  170. "child": {
  171. "type": "column",
  172. "mainAxisAlignment": "center",
  173. "children": [
  174. {
  175. "type": "svg",
  176. "src": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/engineer_new.svg",
  177. "width": 50,
  178. "height": 50
  179. },
  180. { "type": "sizedBox", "height": 8 },
  181. {
  182. "type": "text",
  183. "data": "Deleted\nSyllabus",
  184. "textAlign": "center",
  185. "style": {
  186. "fontSize": 13,
  187. "fontWeight": "bold",
  188. "color": "#1F2937"
  189. }
  190. }
  191. ]
  192. }
  193. },
  194.  
  195.  
  196. {
  197. "type": "container",
  198. "decoration": {
  199. "color": "#FFFFFF",
  200. "borderRadius": 12,
  201. "border": {
  202. "color": "#4CAF50",
  203. "width": 1.5
  204. },
  205. "boxShadow": [
  206. {
  207. "color": "#1A000000",
  208. "blurRadius": 6,
  209. "offset": { "dx": 0, "dy": 2 }
  210. }
  211. ]
  212. },
  213. "child": {
  214. "type": "column",
  215. "mainAxisAlignment": "center",
  216. "children": [
  217. {
  218. "type": "svg",
  219. "src": "https://joshappfeeds.jagranjosh.com/jagran_josh_app/icons/engineer_new.svg",
  220. "width": 50,
  221. "height": 50
  222. },
  223. { "type": "sizedBox", "height": 8 },
  224. {
  225. "type": "text",
  226. "data": "Important\nQuestions",
  227. "textAlign": "center",
  228. "style": {
  229. "fontSize": 13,
  230. "fontWeight": "bold",
  231. "color": "#1F2937"
  232. }
  233. }
  234. ]
  235. }
  236. }
  237. ]
  238. }
  239. }
  240. },
  241.  
  242.  
  243.  
  244.  
  245. {
  246. "type": "textFormField",
  247. "id": "name",
  248. "decoration": {
  249. "labelText": "Name*",
  250. "filled": true,
  251. "fillColor": "#F2F2F2"
  252. },
  253. "validatorRules": [
  254. {
  255. "rule": "isLength",
  256. "options": { "min": 2 },
  257. "message": "Name must be at least 2 characters long"
  258. }
  259. ]
  260. },
  261. { "type": "sizedBox", "height": 16 },
  262.  
  263.  
  264. {
  265. "type": "textFormField",
  266. "id": "phone",
  267. "keyboardType": "phone",
  268. "decoration": {
  269. "labelText": "Phone number*",
  270. "filled": true,
  271. "fillColor": "#F2F2F2"
  272. },
  273. "validatorRules": [
  274. {
  275. "rule": "matches",
  276. "options": { "pattern": "^[0-9]{10}$" },
  277. "message": "Enter a valid 10-digit phone number"
  278. }
  279. ]
  280. },
  281. { "type": "sizedBox", "height": 16 },
  282.  
  283.  
  284. {
  285. "type": "textFormField",
  286. "id": "email",
  287. "keyboardType": "emailAddress",
  288. "decoration": {
  289. "labelText": "Email*",
  290. "filled": true,
  291. "fillColor": "#F2F2F2"
  292. },
  293. "validatorRules": [
  294. {
  295. "rule": "matches",
  296. "options": {
  297. "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
  298. },
  299. "message": "Enter a valid email address"
  300. }
  301. ]
  302. },
  303. { "type": "sizedBox", "height": 16 },
  304.  
  305.  
  306. {
  307. "type": "textFormField",
  308. "id": "password",
  309. "obscureText": true,
  310. "decoration": {
  311. "labelText": "Password*",
  312. "filled": true,
  313. "fillColor": "#F2F2F2"
  314. },
  315. "validatorRules": [
  316. {
  317. "rule": "isLength",
  318. "options": { "min": 6 },
  319. "message": "Password must be at least 6 characters"
  320. }
  321. ]
  322. },
  323. { "type": "sizedBox", "height": 16 },
  324.  
  325.  
  326. {
  327. "type": "textFormField",
  328. "id": "confirm_password",
  329. "obscureText": true,
  330. "decoration": {
  331. "labelText": "Re-type password*",
  332. "filled": true,
  333. "fillColor": "#F2F2F2"
  334. },
  335. "validatorRules": [
  336. {
  337. "rule": "compare",
  338. "options": { "fieldId": "password" },
  339. "message": "Passwords do not match"
  340. }
  341. ]
  342. },
  343. { "type": "sizedBox", "height": 24 },
  344.  
  345.  
  346. {
  347. "type": "elevatedButton",
  348. "child": { "type": "text", "data": "Submit" },
  349. "style": { "backgroundColor": "#4D00E9" },
  350. "onPressed": {
  351. "actionType": "validateForm"
  352. }},
  353. {
  354. "type": "listTile",
  355. "title": { "type": "text", "data": "John Doe" },
  356. "subtitle": { "type": "text", "data": "[email protected]" },
  357. "leading": {
  358. "type": "icon",
  359. "iconType": "material",
  360. "icon": "person"
  361. }
  362. },
  363. {
  364. "type": "listTile",
  365. "title": { "type": "text", "data": "Jane Smith" },
  366. "subtitle": { "type": "text", "data": "[email protected]" },
  367. "leading": {
  368. "type": "icon",
  369. "iconType": "material",
  370. "icon": "person"
  371. }
  372. }]
  373. }
  374. }
  375. }}}
  376.  
  377.  
  378.  
  379.  
  380.  
Advertisement
Add Comment
Please, Sign In to add comment