Advertisement
mrblab

security.dart

Apr 12th, 2023
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.82 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:easy_localization/easy_localization.dart';
  3. import 'package:flutter_icons/flutter_icons.dart';
  4. import 'package:wordpress_app/pages/delete_user.dart';
  5.  
  6. class SecurityPage extends StatefulWidget {
  7.   const SecurityPage({Key? key}) : super(key: key);
  8.  
  9.   @override
  10.   State<SecurityPage> createState() => _SecurityPageState();
  11. }
  12.  
  13. class _SecurityPageState extends State<SecurityPage> {
  14.  
  15.  
  16.   _openDeletePopup (){
  17.     showModalBottomSheet(
  18.       isDismissible: true,
  19.       enableDrag: true,
  20.       isScrollControlled: true,
  21.       clipBehavior: Clip.antiAliasWithSaveLayer,
  22.       shape: RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20))),
  23.       context: context, builder: (context)=> DeleteUser());
  24.   }
  25.  
  26.  
  27.   @override
  28.   Widget build(BuildContext context) {
  29.     return Scaffold(
  30.       appBar: AppBar(
  31.         title: Text('security').tr(),
  32.       ),
  33.       body: Stack(
  34.         alignment: Alignment.center,
  35.         children: [
  36.           Column(
  37.             children: [
  38.               ListTile(
  39.                 contentPadding: EdgeInsets.all(15),
  40.                 isThreeLine: false,
  41.                 title: Text(
  42.                   'account-delete',
  43.                   style: TextStyle(
  44.                     fontWeight: FontWeight.w500,
  45.                   ),
  46.                 ).tr(),
  47.                 leading: CircleAvatar(
  48.                   backgroundColor: Colors.redAccent,
  49.                   radius: 20,
  50.                   child: Icon(
  51.                     Feather.trash,
  52.                     size: 20,
  53.                     color: Colors.white,
  54.                   ),
  55.                 ),
  56.                 onTap: ()=> _openDeletePopup()
  57.               ),
  58.             ],
  59.           ),
  60.         ],
  61.       ),
  62.     );
  63.   }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement