Skip to content

Commit 27912c4

Browse files
committed
Add welcome message and session profiler
1 parent 4f6fe8a commit 27912c4

File tree

1 file changed

+56
-32
lines changed

1 file changed

+56
-32
lines changed

example/lib/src/screens/core_page.dart

Lines changed: 56 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -271,48 +271,72 @@ class _CorePageState extends State<CorePage> {
271271
label: 'Enter log message',
272272
symanticLabel: 'log_message_input',
273273
),
274-
Row(
274+
Wrap(
275+
spacing: 8,
276+
runSpacing: 8,
275277
children: [
276-
Expanded(
277-
child: InstabugButton(
278-
text: 'Debug',
279-
symanticLabel: 'log_debug_btn',
280-
onPressed: addLogDebug,
281-
),
278+
InstabugButton(
279+
text: 'Debug',
280+
symanticLabel: 'log_debug_btn',
281+
onPressed: addLogDebug,
282282
),
283-
Expanded(
284-
child: InstabugButton(
285-
text: 'Error',
286-
symanticLabel: 'log_error_btn',
287-
onPressed: addLogError,
288-
),
283+
InstabugButton(
284+
text: 'Error',
285+
symanticLabel: 'log_error_btn',
286+
onPressed: addLogError,
289287
),
290-
Expanded(
291-
child: InstabugButton(
292-
text: 'Info',
293-
symanticLabel: 'log_info_btn',
294-
onPressed: addLogInfo,
295-
),
288+
InstabugButton(
289+
text: 'Info',
290+
symanticLabel: 'log_info_btn',
291+
onPressed: addLogInfo,
296292
),
297-
Expanded(
298-
child: InstabugButton(
299-
text: 'Verbose',
300-
symanticLabel: 'log_verbose_btn',
301-
onPressed: addLogVerbose,
302-
),
293+
InstabugButton(
294+
text: 'Verbose',
295+
symanticLabel: 'log_verbose_btn',
296+
onPressed: addLogVerbose,
303297
),
304-
Expanded(
305-
child: InstabugButton(
306-
text: 'Warn',
307-
symanticLabel: 'log_warn_btn',
308-
onPressed: addLogWarn,
309-
),
298+
InstabugButton(
299+
text: 'Warn',
300+
symanticLabel: 'log_warn_btn',
301+
onPressed: addLogWarn,
310302
),
311303
],
312304
),
313305

314-
const SizedBox(height: 20),
315306

307+
const SizedBox(height: 20),
308+
InstabugButton(
309+
text: 'Enable session profiler',
310+
symanticLabel: 'enable_session_profiler',
311+
key: const Key('enable_session_profiler_btn'),
312+
onPressed: () {
313+
Instabug.setSessionProfilerEnabled(true);
314+
},
315+
),
316+
InstabugButton(
317+
text: 'Disable session profiler',
318+
symanticLabel: 'disable_session_profiler',
319+
key: const Key('disable_session_profiler_btn'),
320+
onPressed: () {
321+
Instabug.setSessionProfilerEnabled(false);
322+
},
323+
),
324+
InstabugButton(
325+
text: 'Welcome Message LIVE',
326+
symanticLabel: 'welcome_message_live',
327+
key: const Key('welcome_msg_live_btn'),
328+
onPressed: () {
329+
Instabug.showWelcomeMessageWithMode(WelcomeMessageMode.live);
330+
},
331+
),
332+
InstabugButton(
333+
text: 'Welcome Message BETA',
334+
symanticLabel: 'welcome_message_beta',
335+
key: const Key('welcome_msg_beta_btn'),
336+
onPressed: () {
337+
Instabug.showWelcomeMessageWithMode(WelcomeMessageMode.beta);
338+
},
339+
),
316340
const SectionTitle('Invocation Events'),
317341
ButtonBar(
318342
alignment: MainAxisAlignment.start,

0 commit comments

Comments
 (0)