openRoom.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import 'package:flutter/material.dart';
  2. import '../styles/colors.dart';
  3. import 'dart:ui';
  4. class OpenRoom extends StatefulWidget {
  5. @override
  6. OpenRoomState createState() => OpenRoomState();
  7. }
  8. class OpenRoomState extends State<OpenRoom> {
  9. @override
  10. Widget build(BuildContext context) {
  11. // TODO: implement build
  12. return new Scaffold(
  13. appBar: AppBar(
  14. backgroundColor: PRIMARY_COLOR,
  15. title: Text('创建官方房间'),
  16. centerTitle: true,
  17. elevation: 0,
  18. actions: <Widget>[
  19. Container(
  20. width: 60,
  21. child: FlatButton(
  22. highlightColor: PRIMARY_COLOR,
  23. padding: EdgeInsets.only(right: 0),
  24. child: Text('规则',
  25. style: TextStyle(color: Colors.white, fontSize: 13)),
  26. onPressed: () {},
  27. ),
  28. )
  29. ],
  30. ),
  31. body: RefreshIndicator(
  32. color: PRIMARY_COLOR,
  33. backgroundColor: BG_COLOR,
  34. onRefresh: () async {
  35. await new Future.delayed(const Duration(seconds: 1));
  36. },
  37. child: Container(
  38. color: BG_COLOR,
  39. ),
  40. ));
  41. }
  42. }