Advertisement
muhaiminurabir

bottom dialog bottom sheet flutter

May 18th, 2025
1,011
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.75 KB | None | 0 0
  1.   void _showBottomView() {
  2.     showModalBottomSheet(
  3.       context: context,
  4.       backgroundColor: Colors.white,
  5.       useSafeArea: true,
  6.       isDismissible: false,
  7.       shape: RoundedRectangleBorder(
  8.         borderRadius: BorderRadius.only(
  9.           topLeft: Radius.circular(24),
  10.           topRight: Radius.circular(24),
  11.         ),
  12.       ),
  13.       builder: (ctx) {
  14.         return StatefulBuilder(
  15.           builder: (
  16.             BuildContext context,
  17.             void Function(void Function()) changeState,
  18.           ) {
  19.             return Container(
  20.               margin: const EdgeInsets.fromLTRB(16, 20, 16, 12),
  21.               child: Column(
  22.                 children: [
  23.                   Icon(
  24.                     Icons.verified_user,
  25.                     size: 50,
  26.                     color: ProjectColors.primaryColor,
  27.                   ),
  28.                   ElevatedButton(
  29.                     style: ButtonStyle(
  30.                       backgroundColor: WidgetStateProperty.all(
  31.                         ProjectColors.primaryColor,
  32.                       ),
  33.                       padding: WidgetStateProperty.all(EdgeInsets.all(8)),
  34.                       shape: WidgetStatePropertyAll(
  35.                         RoundedRectangleBorder(
  36.                           borderRadius: BorderRadius.circular(10),
  37.                         ),
  38.                       ),
  39.                     ),
  40.                     onPressed: () {
  41.                       Navigator.of(context).pop();
  42.                       Navigator.pushReplacementNamed(
  43.                         context,
  44.                         guestHomePage,
  45.                         arguments: 3,
  46.                       );
  47.                     },
  48.                     child: Row(
  49.                       mainAxisAlignment: MainAxisAlignment.center,
  50.                       spacing: 6,
  51.                       children: [
  52.                         SvgPicture.asset(
  53.                           "assets/images/ic_login.svg",
  54.                           height: 24,
  55.                           width: 24,
  56.                           colorFilter: ColorFilter.mode(
  57.                             ProjectColors.white,
  58.                             BlendMode.srcIn,
  59.                           ),
  60.                         ),
  61.                         Text(
  62.                           CustomStrings.login,
  63.                           style: GoogleFonts.poppins(
  64.                             fontWeight: FontWeight.w500,
  65.                             fontSize: 16,
  66.                             color: ProjectColors.white,
  67.                           ),
  68.                         ),
  69.                       ],
  70.                     ),
  71.                   ),
  72.                 ],
  73.               ),
  74.             );
  75.           },
  76.         );
  77.       },
  78.     );
  79.   }
  80.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement