protocol.dart 752 B

1234567891011121314151617181920212223242526272829303132
  1. import 'package:flutter/material.dart';
  2. import 'package:twong/config/protocols.dart';
  3. import 'package:twong/config/style.dart';
  4. import 'package:twong/widgets/app_bar.dart';
  5. class ProtocolPage extends StatefulWidget {
  6. final ProtocolType type;
  7. ProtocolPage(this.type, {Key key}):super(key: key);
  8. @override
  9. State<StatefulWidget> createState() {
  10. return _ProtocolPageState(this.type);
  11. }
  12. }
  13. class _ProtocolPageState extends State<ProtocolPage> {
  14. final ProtocolType type;
  15. _ProtocolPageState(this.type);
  16. @override
  17. Widget build(BuildContext context) {
  18. return Scaffold(
  19. appBar: DAppBar("用户协议"),
  20. body: Container(
  21. child: Text(Protocols.getType(type)),
  22. ),
  23. );
  24. }
  25. }