order.dart 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import 'package:flutter/material.dart';
  2. ///Order START
  3. class IndexCard extends StatelessWidget {
  4. final String title;
  5. final String description;
  6. IndexCard(this.title, this.description);
  7. @override
  8. Widget build(BuildContext context) {
  9. return Container(
  10. padding: EdgeInsets.fromLTRB(12, 12, 12, 0),
  11. child: Card(
  12. color: Colors.amber,
  13. elevation: 10,
  14. child: Container(
  15. padding: EdgeInsets.fromLTRB(15, 15, 15, 15),
  16. child: Column(
  17. mainAxisSize: MainAxisSize.min,
  18. children: <Widget>[
  19. Row(
  20. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  21. children: <Widget>[
  22. Text(
  23. title,
  24. style: TextStyle(fontSize: 30),
  25. ),
  26. Text(title),
  27. Text(title)
  28. ],
  29. ),
  30. Row(
  31. children: <Widget>[
  32. Icon(Icons.border_color),
  33. Text(description)
  34. ],
  35. )
  36. ],
  37. ),
  38. )),
  39. );
  40. }
  41. }
  42. class OrderPage extends StatefulWidget {
  43. static const routeName = '/order';
  44. @override
  45. State<StatefulWidget> createState() {
  46. return _OrderPageState();
  47. }
  48. }
  49. class _OrderPageState extends State<OrderPage> {
  50. @override
  51. Widget build(BuildContext context) {
  52. return Scaffold(
  53. appBar: AppBar(title: Text("点单页面")),
  54. body: Center(
  55. child: Column(
  56. children: <Widget>[Text("order页面")],
  57. ),
  58. ),
  59. );
  60. }
  61. }
  62. /// order END