import 'package:chat/routes/user_routes.dart';
import 'package:chat/views/home/widgets/action_item.dart';
import 'package:chat/views/user/index/widgets/user_top_bar.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class UserPage extends StatelessWidget {
  const UserPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          const UserTopBar(),
          const SizedBox(height: 8),
          ActionItem(
            '服务',
            isFirst: true,
            isLast: true,
            onTap: () {
              Get.toNamed(UserRoutes.serve);
            },
          ),
          const SizedBox(height: 8),
          ActionItem(
            '分享邀请',
            isFirst: true,
            onTap: () {
              Get.toNamed(UserRoutes.share);
            },
          ),
          ActionItem(
            '设置',
            isLast: true,
            onTap: () {
              Get.toNamed(UserRoutes.setting);
            },
          ),
        ],
      ),
    );
  }
}
