import 'package:flutter/material.dart'; class BottomSheetHelper { static void showBottomSheet(BuildContext context, dynamic affiliation_data) { showModalBottomSheet( context: context, useRootNavigator: true, isScrollControlled: false, enableDrag: true, useSafeArea: true, constraints: const BoxConstraints( maxWidth: double.infinity, ), builder: (BuildContext context) { // Replace this with your desired bottom sheet content return DraggableScrollableSheet( expand: false, builder: (BuildContext context, ScrollController scrollController) { return Container( width: MediaQuery.of(context).size.width, //color: Colors.white, color: Color.fromARGB(255, 246, 248, 252), // decoration: // BoxDecoration(borderRadius: BorderRadius.circular(10)), // child: ListView( // children: [ // ], // ), child: Column( children: [ Expanded( child: ListView.builder( controller: scrollController, itemCount: 1, itemBuilder: (BuildContext context, int index) { return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( height: 18.0, ), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Padding( padding: const EdgeInsets.all(18.0), child: Text( affiliation_data['org_name'], softWrap: true, maxLines: 4, style: TextStyle( fontSize: 18.0, color: Colors.grey[700]), ), ), ), ], ), SizedBox( height: 18.0, ), Divider(), SizedBox( height: 8.0, ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only(left: 18.0), child: Text( "Department", style: TextStyle(fontSize: 13.0), ), ), Padding( padding: const EdgeInsets.only(left: 18.0), child: Text( affiliation_data['dept'].toString(), style: TextStyle( fontSize: 14.0, color: Colors.grey[700]), ), ) ], ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only( left: 18.0, top: 18.0), child: Text( "Role", style: TextStyle(fontSize: 13.0), ), ), Padding( padding: const EdgeInsets.only(left: 18.0), child: Text( affiliation_data['role'], style: TextStyle( fontSize: 14.0, color: Colors.grey[700]), ), ) ], ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only( left: 18.0, top: 18.0), child: Text( "Time Frame", style: TextStyle(fontSize: 13.0), ), ), Padding( padding: const EdgeInsets.only(left: 18.0), child: Text( affiliation_data['time_frame'].toString(), style: TextStyle( fontSize: 14.0, color: Colors.grey[700]), ), ) ], ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only( left: 18.0, top: 18.0), child: Text( "Oraganization Type", style: TextStyle(fontSize: 13.0), ), ), Padding( padding: const EdgeInsets.only(left: 18.0), child: Text( affiliation_data['org_type'], style: TextStyle( fontSize: 14.0, color: Colors.grey[700]), ), ) ], ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only( left: 18.0, top: 18.0), child: Text( "Eng Type", style: TextStyle(fontSize: 13.0), ), ), Padding( padding: const EdgeInsets.only(left: 18.0), child: Text( affiliation_data['emg_type'], style: TextStyle( fontSize: 14.0, color: Colors.grey[700]), ), ) ], ), ], ); }, ), ), ], ), ); }, ); }, ); } }