|
- import 'package:flutter/material.dart';
-
- class CustomBottomSheet extends StatelessWidget {
- final Widget child;
-
- const CustomBottomSheet({Key? key, required this.child}) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- return Container(
- padding: const EdgeInsets.all(16.0),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: const BorderRadius.only(
- topLeft: Radius.circular(20.0),
- topRight: Radius.circular(20.0),
- ),
- boxShadow: [
- BoxShadow(
- color: Colors.black.withOpacity(0.2),
- spreadRadius: 5,
- blurRadius: 10,
- offset: const Offset(0, 3),
- ),
- ],
- ),
- child: SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- // نشانگر کوچک در بالای باتم شیت
- Center(
- child: Container(
- width: 40,
- height: 5,
- margin: const EdgeInsets.only(bottom: 10),
- decoration: BoxDecoration(
- color: Colors.grey[400],
- borderRadius: BorderRadius.circular(10),
- ),
- ),
- ),
- // محتویات ورودی
- child,
- ],
- ),
- ),
- );
- }
- }
|