Advertisement
harmonyV

HomePage starting from body

Jun 17th, 2024
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 5.82 KB | None | 0 0
  1. Padding(
  2.         padding: const EdgeInsets.only(left: 16.0, right: 16.0, top: 16.0),
  3.         child: Column(
  4.           mainAxisAlignment: MainAxisAlignment.spaceBetween,
  5.           mainAxisSize: MainAxisSize.max,
  6.           children: [
  7.             // H E A T M A P
  8.             const Flexible(
  9.               child: HeatMapBuilderWidget(),
  10.             ),
  11.  
  12.             // Daily Goals Top row
  13.             Padding(
  14.               padding: const EdgeInsets.symmetric(vertical: 8.0),
  15.               child: Row(
  16.                 mainAxisAlignment: MainAxisAlignment.spaceBetween,
  17.                 mainAxisSize: MainAxisSize.max,
  18.                 children: [
  19.                   Text(
  20.                     "Daily Goals",
  21.                     style: Theme.of(context).textTheme.titleMedium!.copyWith(
  22.                           color: Theme.of(context)
  23.                               .colorScheme
  24.                               .onSecondaryContainer,
  25.                         ),
  26.                   ),
  27.                   IconButton.filledTonal(
  28.                     onPressed: habitCreationFlow,
  29.                     icon: const Icon(Icons.add),
  30.                     style: ButtonStyle(
  31.                       backgroundColor: WidgetStatePropertyAll(
  32.                           Theme.of(context).colorScheme.inversePrimary),
  33.                       foregroundColor:
  34.                           const WidgetStatePropertyAll(Colors.white),
  35.                     ),
  36.                   ),
  37.                 ],
  38.               ),
  39.             ),
  40.  
  41.             // Navigation Tile leading to future completed page
  42.             GestureDetector(
  43.               onTap: () {},
  44.               child: Container(
  45.                 decoration: BoxDecoration(
  46.                     color: Theme.of(context).colorScheme.primaryContainer,
  47.                     border: Border.all(
  48.                       color: Theme.of(context).colorScheme.outline,
  49.                     ),
  50.                     borderRadius: BorderRadius.circular(16)),
  51.                 padding: const EdgeInsets.all(8),
  52.                 child: Row(
  53.                     crossAxisAlignment: CrossAxisAlignment.center,
  54.                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
  55.                     mainAxisSize: MainAxisSize.max,
  56.                     children: [
  57.                       Row(
  58.                         mainAxisAlignment: MainAxisAlignment.spaceBetween,
  59.                         mainAxisSize: MainAxisSize.min,
  60.                         children: [
  61.                           Container(
  62.                             decoration: BoxDecoration(
  63.                               borderRadius: BorderRadius.circular(12),
  64.                             ),
  65.                             child: const Icon(Icons.account_circle_outlined),
  66.                           ),
  67.                           const SizedBox(
  68.                             width: 8,
  69.                           ),
  70.                           Text(
  71.                             "Completed",
  72.                             style: Theme.of(context)
  73.                                 .textTheme
  74.                                 .titleMedium!
  75.                                 .copyWith(
  76.                                   color: Theme.of(context)
  77.                                       .colorScheme
  78.                                       .onSecondaryContainer,
  79.                                 ),
  80.                           ),
  81.                         ],
  82.                       ),
  83.                       Row(
  84.                         mainAxisAlignment: MainAxisAlignment.spaceBetween,
  85.                         mainAxisSize: MainAxisSize.min,
  86.                         children: [
  87.                           Text(
  88.                             "${context.watch<HabitDatabase>().listOfHabits.length}",
  89.                             style:
  90.                                 Theme.of(context).textTheme.bodyLarge!.copyWith(
  91.                                       color: Theme.of(context)
  92.                                           .colorScheme
  93.                                           .onSecondaryContainer,
  94.                                     ),
  95.                           ),
  96.                           const SizedBox(
  97.                             width: 8,
  98.                           ),
  99.                           Icon(
  100.                             Icons.arrow_forward_ios_rounded,
  101.                             color: Theme.of(context)
  102.                                 .colorScheme
  103.                                 .onSecondaryContainer,
  104.                           )
  105.                         ],
  106.                       ),
  107.                     ]),
  108.               ),
  109.             ),
  110.  
  111.             Padding(
  112.               padding: const EdgeInsets.symmetric(vertical: 8.0),
  113.               child: Row(
  114.                 mainAxisAlignment: MainAxisAlignment.spaceBetween,
  115.                 mainAxisSize: MainAxisSize.max,
  116.                 children: [
  117.                   Text(
  118.                     "In Progress",
  119.                     style: Theme.of(context).textTheme.titleMedium!.copyWith(
  120.                           color: Theme.of(context)
  121.                               .colorScheme
  122.                               .onSecondaryContainer,
  123.                         ),
  124.                   ),
  125.                   TextButton(
  126.                     onPressed: () {},
  127.                     child: Text(
  128.                       "Show All",
  129.                       style: Theme.of(context).textTheme.labelMedium!.copyWith(
  130.                             color: Theme.of(context)
  131.                                 .colorScheme
  132.                                 .onSecondaryContainer,
  133.                           ),
  134.                     ),
  135.                   ),
  136.                 ],
  137.               ),
  138.             ),
  139.             // H A B I T L I S T
  140.             const Expanded(
  141.               child: HabitTileListBuilder(),
  142.             ),
  143.           ],
  144.         ),
  145.       ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement