@@ -37,8 +37,9 @@ void main() async {
3737 });
3838
3939 // Required to call this after Amplify.configure.
40- Amplify .Notifications .Push .onNotificationReceivedInForeground
41- .listen ((event) {
40+ Amplify .Notifications .Push .onNotificationReceivedInForeground.listen ((
41+ event,
42+ ) {
4243 print ('🚀 onNotificationReceivedInForeground $event ' );
4344 });
4445
@@ -84,17 +85,14 @@ class _MyAppState extends State<MyApp> {
8485 }
8586
8687 Widget headerText (String title) => Padding (
87- padding: const EdgeInsets .only (top: 16 ),
88- child: Center (
89- child: Text (
90- title,
91- style: const TextStyle (
92- fontSize: 18 ,
93- fontWeight: FontWeight .bold,
94- ),
95- ),
96- ),
97- );
88+ padding: const EdgeInsets .only (top: 16 ),
89+ child: Center (
90+ child: Text (
91+ title,
92+ style: const TextStyle (fontSize: 18 , fontWeight: FontWeight .bold),
93+ ),
94+ ),
95+ );
9896
9997 @override
10098 Widget build (BuildContext context) {
@@ -130,12 +128,8 @@ class _MyAppState extends State<MyApp> {
130128 child: const Text ('requestPermissions' ),
131129 ),
132130 if (requestPermissionsResult != null )
133- Text (
134- 'Requesting permission result: $requestPermissionsResult ' ,
135- ),
136- const Divider (
137- height: 20 ,
138- ),
131+ Text ('Requesting permission result: $requestPermissionsResult ' ),
132+ const Divider (height: 20 ),
139133 headerText ('Analytics APIs' ),
140134 ElevatedButton (
141135 onPressed: () async {
@@ -146,9 +140,7 @@ class _MyAppState extends State<MyApp> {
146140 },
147141 child: const Text ('identifyUser' ),
148142 ),
149- const Divider (
150- height: 20 ,
151- ),
143+ const Divider (height: 20 ),
152144 headerText ('Notification Handling APIs' ),
153145 ElevatedButton (
154146 onPressed: getLaunchNotification,
0 commit comments