import 'package:flutter/material.dart'; import 'package:proxibuy/core/utils/empty_space.dart'; import 'package:proxibuy/presentation/ui/theme/theme.dart'; class DialogManager { final BuildContext context; DialogManager(this.context); // Future _showDialog(Widget widget) async { // await showDialog( // context: context, // builder: (context) { // return Dialog( // child: widget, // ); // }, // ); // } Future _showBottomSheet(Widget widget) async { await showModalBottomSheet( context: context, backgroundColor: Theme.of(context).scaffoldBackgroundColor, builder: (context) { return Padding( padding: const EdgeInsets.all(16.0), child: widget, ); }, ); } void changePasswordBS() async { await _showBottomSheet(Form( child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( children: [ ListTile( title: Text( 'Login with Password', style: Theme.of(context).textTheme.titleLarge, ), subtitle: Text('"To confirm, please enter a password."'), ), 32.h, TextFormField( decoration: defaultInputDecoration(context).copyWith( labelText: 'Password', )), 16.h, TextFormField( decoration: defaultInputDecoration(context).copyWith( labelText: 're-Password', )), 32.h, TextButton(onPressed: () {}, child: Text('Forgot Your Password?')) ], ), Row( children: [ Expanded( child: SizedBox( height: 46, child: ElevatedButton(onPressed: () {}, child: Text('Confirm')), )), 12.w, Expanded( child: SizedBox( height: 46, child: OutlinedButton( style: OutlinedButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), side: BorderSide( color: Theme.of(context).primaryColor, ), ), onPressed: () {}, child: Text('Cancel')), )) ], ) ], ), )); } }