Skip to content

Commit 924e858

Browse files
committed
Updated const
1 parent ab55e1d commit 924e858

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

example/lib/nocodes_view.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import 'dart:async';
22
import 'package:flutter/material.dart';
33
import 'package:qonversion_flutter/qonversion_flutter.dart';
44

5+
const String CONTEXT_KEY = 'your_context_key';
6+
57
class NoCodesView extends StatefulWidget {
68
@override
79
_NoCodesViewState createState() => _NoCodesViewState();
@@ -81,10 +83,10 @@ class _NoCodesViewState extends State<NoCodesView> {
8183
presentationStyle: NoCodesPresentationStyle.fullScreen,
8284
);
8385

84-
await NoCodes.getSharedInstance().setScreenPresentationConfig(config, contextKey: 'your_context_key');
86+
await NoCodes.getSharedInstance().setScreenPresentationConfig(config, contextKey: CONTEXT_KEY);
8587
_addEvent('Presentation config set');
8688

87-
await NoCodes.getSharedInstance().showScreen('your_context_key');
89+
await NoCodes.getSharedInstance().showScreen(CONTEXT_KEY);
8890
} catch (e) {
8991
print('Error showing screen: $e');
9092
_addEvent('Error showing screen: $e');

0 commit comments

Comments
 (0)