Advertisement
harmonyV

HomePage

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