| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:get/get.dart';
- import 'package:gobang/controllers/game_controller.dart';
- import 'package:gobang/themes/app_colors.dart';
- /// 对局阶段提示文案
- class GameStatusText extends StatelessWidget {
- const GameStatusText({super.key});
- @override
- Widget build(BuildContext context) {
- final c = Get.find<GameController>();
- return Obx(
- () => Container(
- width: double.infinity,
- padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.h),
- decoration: BoxDecoration(
- color: Colors.white.withValues(alpha: 0.16),
- borderRadius: BorderRadius.circular(16.r),
- border: Border.all(color: Colors.white.withValues(alpha: 0.22)),
- ),
- child: Row(
- children: [
- Container(
- width: 8.w,
- height: 8.w,
- decoration: const BoxDecoration(
- color: AppColors.pumpkin,
- shape: BoxShape.circle,
- ),
- ),
- SizedBox(width: 10.w),
- Expanded(
- child: Text(
- c.statusText.value,
- style: TextStyle(
- color: AppColors.ivory,
- fontSize: 13.sp,
- fontWeight: FontWeight.w500,
- height: 1.35,
- ),
- ),
- ),
- ],
- ),
- ),
- );
- }
- }
|