
import 'package:flutter/material.dart';
import 'package:twong/config/protocols.dart';
import 'package:twong/config/style.dart';
import 'package:twong/widgets/app_bar.dart';

class ProtocolPage extends StatefulWidget {
  final ProtocolType type;

  ProtocolPage(this.type, {Key key}):super(key: key);

  @override
  State<StatefulWidget> createState() {
    return _ProtocolPageState(this.type);
  }
}

class _ProtocolPageState extends State<ProtocolPage> {
  final ProtocolType type;

  _ProtocolPageState(this.type);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: DAppBar("用户协议"),
      body: Container(
        child: Text(Protocols.getType(type)),
      ),
    );
  }
}