home_page.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import 'package:flutter/material.dart';
  2. class HomePage extends StatefulWidget {
  3. const HomePage({super.key});
  4. @override
  5. State<HomePage> createState() => _HomePageState();
  6. }
  7. class _HomePageState extends State<HomePage> {
  8. @override
  9. Widget build(BuildContext context) {
  10. return Scaffold(
  11. appBar: AppBar(
  12. actions: [],
  13. title: Text("主页"),
  14. ),
  15. body:
  16. // 布局:1、标题 支付演示 2、商品名称,数量,单价,总价,3、按钮组:微信支付,支付宝支付,Google支付,strip支付
  17. Column(
  18. children: [
  19. Text("支付演示"),
  20. Text("商品名称: 橘子"),
  21. Text("数量:1斤"),
  22. Text("单价:11元/斤"),
  23. Text("总价:11元"),
  24. Row(
  25. children: [
  26. ElevatedButton(
  27. onPressed: () {},
  28. child: Text("微信支付"),
  29. ),
  30. ElevatedButton(
  31. onPressed: () {},
  32. child: Text("支付宝支付"),
  33. ),
  34. ElevatedButton(
  35. onPressed: () {},
  36. child: Text("Google支付"),
  37. ),
  38. ElevatedButton(
  39. onPressed: () {},
  40. child: Text("Stripe支付"),
  41. ),
  42. ],
  43. ),
  44. ],
  45. ),
  46. );
  47. }
  48. }