基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

security_page.dart 1.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:zhiying_comm/zhiying_comm.dart';
  4. class SecurityPage extends StatefulWidget {
  5. final Map<String, dynamic> data;
  6. const SecurityPage(this.data, {Key key}) : super(key: key);
  7. @override
  8. _SecurityPageState createState() => _SecurityPageState();
  9. }
  10. class _SecurityPageState extends State<SecurityPage> {
  11. @override
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. appBar: _createNav(),
  15. );
  16. }
  17. // 导航栏
  18. Widget _createNav() {
  19. return CupertinoNavigationBar(
  20. border: Border(
  21. bottom: BorderSide(
  22. width: 0.0, // One physical pixel.
  23. style: BorderStyle.none,
  24. ),
  25. ),
  26. backgroundColor: Color(0xfff9f9f9),
  27. leading: Navigator.canPop(context)
  28. ? GestureDetector(
  29. child: Container(
  30. padding: EdgeInsets.zero,
  31. child: Icon(
  32. Icons.arrow_back_ios,
  33. size: 20,
  34. ),
  35. ),
  36. onTap: () {
  37. if (Navigator.canPop(context)) {
  38. Navigator.pop(context);
  39. }
  40. },
  41. )
  42. : Container(),
  43. middle: Text(
  44. '账号安全',
  45. style: TextStyle(
  46. fontSize: 15,
  47. color: HexColor.fromHex('#333333'),
  48. ),
  49. ),
  50. );
  51. }
  52. }