Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

52 lignes
1.4 KiB

  1. import 'package:flutter/material.dart';
  2. class CustomBottomSheet extends StatelessWidget {
  3. final Widget child;
  4. const CustomBottomSheet({Key? key, required this.child}) : super(key: key);
  5. @override
  6. Widget build(BuildContext context) {
  7. return Container(
  8. padding: const EdgeInsets.all(16.0),
  9. decoration: BoxDecoration(
  10. color: Colors.white,
  11. borderRadius: const BorderRadius.only(
  12. topLeft: Radius.circular(20.0),
  13. topRight: Radius.circular(20.0),
  14. ),
  15. boxShadow: [
  16. BoxShadow(
  17. color: Colors.black.withOpacity(0.2),
  18. spreadRadius: 5,
  19. blurRadius: 10,
  20. offset: const Offset(0, 3),
  21. ),
  22. ],
  23. ),
  24. child: SingleChildScrollView(
  25. child: Column(
  26. mainAxisSize: MainAxisSize.min,
  27. crossAxisAlignment: CrossAxisAlignment.start,
  28. children: [
  29. // نشانگر کوچک در بالای باتم شیت
  30. Center(
  31. child: Container(
  32. width: 40,
  33. height: 5,
  34. margin: const EdgeInsets.only(bottom: 10),
  35. decoration: BoxDecoration(
  36. color: Colors.grey[400],
  37. borderRadius: BorderRadius.circular(10),
  38. ),
  39. ),
  40. ),
  41. // محتویات ورودی
  42. child,
  43. ],
  44. ),
  45. ),
  46. );
  47. }
  48. }