lab_section_scaffold.dart 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import 'package:flutter/material.dart';
  2. class LabSectionScaffold extends StatelessWidget {
  3. const LabSectionScaffold({
  4. super.key,
  5. required this.title,
  6. required this.eyebrow,
  7. required this.description,
  8. required this.children,
  9. });
  10. final String title;
  11. final String eyebrow;
  12. final String description;
  13. final List<Widget> children;
  14. @override
  15. Widget build(BuildContext context) {
  16. final theme = Theme.of(context);
  17. return Scaffold(
  18. appBar: AppBar(),
  19. body: DecoratedBox(
  20. decoration: const BoxDecoration(
  21. gradient: LinearGradient(
  22. begin: Alignment.topLeft,
  23. end: Alignment.bottomRight,
  24. colors: [Color(0xFFF3EDE0), Color(0xFFEFE7D7), Color(0xFFE1E8E1)],
  25. ),
  26. ),
  27. child: SafeArea(
  28. top: false,
  29. child: ListView(
  30. padding: const EdgeInsets.fromLTRB(20, 8, 20, 24),
  31. children: [
  32. Text(
  33. eyebrow,
  34. style: theme.textTheme.titleMedium?.copyWith(
  35. color: theme.colorScheme.primary,
  36. letterSpacing: 0.6,
  37. ),
  38. ),
  39. const SizedBox(height: 8),
  40. Text(title, style: theme.textTheme.displaySmall),
  41. const SizedBox(height: 12),
  42. Text(description, style: theme.textTheme.bodyLarge),
  43. const SizedBox(height: 20),
  44. ...children,
  45. ],
  46. ),
  47. ),
  48. ),
  49. );
  50. }
  51. }