protocol.dart 734 B

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