@@ -94,14 +94,16 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
9494
9595 // Platform messages are asynchronous, so we initialize in an async method.
9696 initPlatformState () async {
97- AdjustConfig config = new AdjustConfig ('2fm9gkqubvpc' , AdjustEnvironment .sandbox);
97+ AdjustConfig config =
98+ new AdjustConfig ('2fm9gkqubvpc' , AdjustEnvironment .sandbox);
9899 config.logLevel = AdjustLogLevel .verbose;
99100
100101 config.attributionCallback = (AdjustAttribution attributionChangedData) {
101102 print ('[Adjust]: Attribution changed!' );
102103
103104 if (attributionChangedData.trackerToken != null ) {
104- print ('[Adjust]: Tracker token: ' + attributionChangedData.trackerToken! );
105+ print (
106+ '[Adjust]: Tracker token: ' + attributionChangedData.trackerToken! );
105107 }
106108 if (attributionChangedData.trackerName != null ) {
107109 print ('[Adjust]: Tracker name: ' + attributionChangedData.trackerName! );
@@ -128,10 +130,12 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
128130 print ('[Adjust]: Cost type: ' + attributionChangedData.costType! );
129131 }
130132 if (attributionChangedData.costAmount != null ) {
131- print ('[Adjust]: Cost amount: ' + attributionChangedData.costAmount! .toString ());
133+ print ('[Adjust]: Cost amount: ' +
134+ attributionChangedData.costAmount! .toString ());
132135 }
133136 if (attributionChangedData.costCurrency != null ) {
134- print ('[Adjust]: Cost currency: ' + attributionChangedData.costCurrency! );
137+ print (
138+ '[Adjust]: Cost currency: ' + attributionChangedData.costCurrency! );
135139 }
136140 };
137141
@@ -165,7 +169,8 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
165169 print ('[Adjust]: Adid: ' + sessionFailureData.adid! );
166170 }
167171 if (sessionFailureData.willRetry != null ) {
168- print ('[Adjust]: Will retry: ' + sessionFailureData.willRetry.toString ());
172+ print (
173+ '[Adjust]: Will retry: ' + sessionFailureData.willRetry.toString ());
169174 }
170175 if (sessionFailureData.jsonResponse != null ) {
171176 print ('[Adjust]: JSON response: ' + sessionFailureData.jsonResponse! );
@@ -226,7 +231,8 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
226231 };
227232
228233 config.conversionValueUpdatedCallback = (num ? conversionValue) {
229- print ('[Adjust]: Received conversion value update: ' + conversionValue! .toString ());
234+ print ('[Adjust]: Received conversion value update: ' +
235+ conversionValue! .toString ());
230236 };
231237
232238 // Add session callback parameters.
@@ -252,16 +258,20 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
252258 print ('[Adjust]: Authorization status update!' );
253259 switch (status) {
254260 case 0 :
255- print ('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusNotDetermined' );
261+ print (
262+ '[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusNotDetermined' );
256263 break ;
257264 case 1 :
258- print ('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusRestricted' );
265+ print (
266+ '[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusRestricted' );
259267 break ;
260268 case 2 :
261- print ('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusDenied' );
269+ print (
270+ '[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusDenied' );
262271 break ;
263272 case 3 :
264- print ('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusAuthorized' );
273+ print (
274+ '[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusAuthorized' );
265275 break ;
266276 }
267277 });
@@ -282,27 +292,27 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
282292 < Widget > [
283293 const Padding (padding: const EdgeInsets .all (7.0 )),
284294
285- Util .buildCupertinoButton ('Is Enabled ?' , () => _showIsSdkEnabled ()),
295+ Util .buildCupertinoButton (
296+ 'Is Enabled ?' , () => _showIsSdkEnabled ()),
286297 const Padding (padding: const EdgeInsets .all (7.0 )),
287298
288299 // Track simple event button.
289- Util .buildCupertinoButton (
290- 'Track Simple Event' , () => Adjust .trackEvent (Util .buildSimpleEvent ())),
300+ Util .buildCupertinoButton ('Track Simple Event' ,
301+ () => Adjust .trackEvent (Util .buildSimpleEvent ())),
291302 const Padding (padding: const EdgeInsets .all (7.0 )),
292303
293304 // Track revenue event button.
294- Util .buildCupertinoButton (
295- 'Track Revenue Event' , () => Adjust .trackEvent (Util .buildRevenueEvent ())),
305+ Util .buildCupertinoButton ('Track Revenue Event' ,
306+ () => Adjust .trackEvent (Util .buildRevenueEvent ())),
296307 const Padding (padding: const EdgeInsets .all (7.0 )),
297308
298309 // Track callback event button.
299- Util .buildCupertinoButton (
300- 'Track Callback Event' , () => Adjust .trackEvent (Util .buildCallbackEvent ())),
310+ Util .buildCupertinoButton ('Track Callback Event' ,
311+ () => Adjust .trackEvent (Util .buildCallbackEvent ())),
301312 const Padding (padding: const EdgeInsets .all (7.0 )),
302313
303314 // Track partner event button.
304- Util .buildCupertinoButton (
305- 'Track Partner Event' ,
315+ Util .buildCupertinoButton ('Track Partner Event' ,
306316 () => Adjust .trackEvent (Util .buildPartnerEvent ())),
307317 const Padding (padding: const EdgeInsets .all (7.0 )),
308318
@@ -319,8 +329,8 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
319329 Util .buildCupertinoButton (
320330 'Get Adjust identifier' ,
321331 () => Adjust .getAdid ().then ((adid) {
322- _showDialogMessage (
323- 'Adjust identifier' , ' Received Adjust identifier: $adid ' );
332+ _showDialogMessage ('Adjust identifier' ,
333+ 'Received Adjust identifier: $adid ' );
324334 })),
325335 const Padding (padding: const EdgeInsets .all (7.0 )),
326336
@@ -336,8 +346,8 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
336346 Util .buildCupertinoButton (
337347 'Get attribution' ,
338348 () => Adjust .getAttribution ().then ((attribution) {
339- _showDialogMessage (
340- 'Attribution' , ' Received attribution: ${attribution .toString ()}' );
349+ _showDialogMessage ('Attribution' ,
350+ 'Received attribution: ${attribution .toString ()}' );
341351 })),
342352 const Padding (padding: const EdgeInsets .all (7.0 )),
343353
@@ -384,11 +394,13 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
384394 _showDialogMessage ('SDK Enabled?' , 'Adjust is enabled = $isEnabled ' );
385395 });
386396 } on PlatformException {
387- _showDialogMessage ('SDK Enabled?' , 'No such method found in plugin: isEnabled' );
397+ _showDialogMessage (
398+ 'SDK Enabled?' , 'No such method found in plugin: isEnabled' );
388399 }
389400 }
390401
391- void _showDialogMessage (String title, String text, [bool printToConsoleAlso = true ]) {
402+ void _showDialogMessage (String title, String text,
403+ [bool printToConsoleAlso = true ]) {
392404 if (printToConsoleAlso) {
393405 print (text);
394406 }
0 commit comments