关怀模式

This commit is contained in:
Developer
2026-04-02 22:30:49 +08:00
parent 09fee0694c
commit 7872f2e78a
70 changed files with 4884 additions and 2752 deletions

View File

@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../utils/responsive_layout.dart';
import '../constants/app_constants.dart';
import '../services/get/theme_controller.dart';
class ResponsiveButton extends StatelessWidget {
final String text;
@@ -25,6 +27,8 @@ class ResponsiveButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final buttonSize = size ?? (ResponsiveLayout.isMobile(context) ? ButtonSize.small : ButtonSize.medium);
final themeController = Get.find<ThemeController>();
final primaryColor = themeController.currentThemeColor;
return SizedBox(
width: ResponsiveLayout.isMobile(context) ? double.infinity : null,
@@ -32,7 +36,7 @@ class ResponsiveButton extends StatelessWidget {
child: ElevatedButton(
onPressed: isLoading ? null : onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: backgroundColor ?? AppConstants.primaryColor,
backgroundColor: backgroundColor ?? primaryColor,
foregroundColor: textColor ?? Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(_getBorderRadius(buttonSize)),