@@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
44import '../../models/in_app_message_type.dart' ;
55import '../../theme.dart' ;
66import '../../viewmodels/app_viewmodel.dart' ;
7+ import '../action_button.dart' ;
78import '../section_card.dart' ;
89
910class SendIamSection extends StatelessWidget {
@@ -22,32 +23,10 @@ class SendIamSection extends StatelessWidget {
2223 child: Column (
2324 spacing: AppSpacing .gap,
2425 children: InAppMessageType .values.map ((type) {
25- return Semantics (
26- identifier: 'send_iam_${type .triggerValue }_button' ,
27- container: true ,
28- button: true ,
29- child: SizedBox (
30- width: double .infinity,
31- child: ElevatedButton (
32- onPressed: () => vm.sendInAppMessage (type),
33- style: ElevatedButton .styleFrom (
34- backgroundColor: AppColors .osPrimary,
35- foregroundColor: Colors .white,
36- minimumSize: const Size (double .infinity, 48 ),
37- shape: RoundedRectangleBorder (
38- borderRadius: BorderRadius .circular (8 ),
39- ),
40- ),
41- child: Row (
42- mainAxisAlignment: MainAxisAlignment .start,
43- children: [
44- Icon (type.icon, size: 18 ),
45- const SizedBox (width: 8 ),
46- Text (type.label.toUpperCase ()),
47- ],
48- ),
49- ),
50- ),
26+ return PrimaryButton (
27+ label: type.label.toUpperCase (),
28+ onPressed: () => vm.sendInAppMessage (type),
29+ semanticsLabel: 'send_iam_${type .triggerValue }_button' ,
5130 );
5231 }).toList (),
5332 ),
0 commit comments