gjh hace 1 día
padre
commit
71f3aec0cc
Se han modificado 2 ficheros con 4 adiciones y 8 borrados
  1. 3 6
      lib/pages/history/history_page.dart
  2. 1 2
      lib/widget/main_button.dart

+ 3 - 6
lib/pages/history/history_page.dart

@@ -90,24 +90,21 @@ class _HistoryPageState extends ConsumerState<HistoryPage> {
90 90
     return Container(
91 91
       padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 15.h),
92 92
       decoration: BoxDecoration(
93
-          color: Theme.of(context).colorScheme.surfaceContainerHigh,
93
+          color: context.surfaceContainerHighColor,
94 94
           borderRadius: BorderRadius.circular(15.r)),
95 95
       child: Column(
96 96
         crossAxisAlignment: CrossAxisAlignment.start,
97 97
         children: [
98 98
           Text(
99 99
             getS().freeConsultation,
100
-            style: Theme.of(context)
101
-                .textTheme
102
-                .titleMedium
103
-                ?.copyWith(fontWeight: FontWeight.bold),
100
+            style: context.titleMedium?.copyWith(fontWeight: FontWeight.bold),
104 101
           ),
105 102
           SizedBox(
106 103
             height: 10.h,
107 104
           ),
108 105
           Text(
109 106
             getS().electricityHospitalConsultationDesc,
110
-            style: Theme.of(context).textTheme.bodySmall,
107
+            style: context.bodySmall,
111 108
           ),
112 109
           SizedBox(
113 110
             height: 10.h,

+ 1 - 2
lib/widget/main_button.dart

@@ -55,8 +55,7 @@ class MainButton extends StatelessWidget {
55 55
                 padding: buttonPadding == null
56 56
                     ? null
57 57
                     : WidgetStatePropertyAll(buttonPadding),
58
-                backgroundColor:
59
-                    WidgetStatePropertyAll(Theme.of(context).primaryColor),
58
+                backgroundColor: WidgetStatePropertyAll(context.primaryColor),
60 59
                 minimumSize: minimumSize == null
61 60
                     ? null
62 61
                     : WidgetStatePropertyAll(minimumSize),