Skip to content

Commit d841f32

Browse files
Merge pull request SimformSolutionsPvtLtd#20 from simformsolutions/review/context_issue
Review/context issue
2 parents 1a0def6 + 0e3aa57 commit d841f32

File tree

6 files changed

+4
-26
lines changed

6 files changed

+4
-26
lines changed

CHANGELOG.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
## [0.1.3] - Added feature
22

3-
# Updated syntax to pass new context to each ShowCaseWidget
4-
# Added onTargetTap callback
5-
# Added onSHowCaseFinishCallback
6-
7-
## [0.1.3] - Added feature [#10](https://github.com/simformsolutions/flutter_showcaseview/issues/10).
3+
# Updated syntax to pass new context to ShowCaseWidget
4+
# Added onTargetTap callback feature [#10](https://github.com/simformsolutions/flutter_showcaseview/issues/10).
85

96
## [0.1.2] - Fixed issue [#6](https://github.com/simformsolutions/flutter_showcaseview/issues/6).
107

example/lib/main.dart

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:showcaseview/showcaseview.dart';
3-
4-
import 'SecondPage.dart';
3+
import 'detailscreen.dart';
54

65
void main() => runApp(MyApp());
76

@@ -36,31 +35,17 @@ class _MailPageState extends State<MailPage> {
3635
GlobalKey _four = GlobalKey();
3736
GlobalKey _five = GlobalKey();
3837

39-
final scaffoldKey = GlobalKey<ScaffoldState>();
40-
41-
_showSnackbar(String msg) {
42-
final snackbar = SnackBar(
43-
content: Text(msg),
44-
backgroundColor: Colors.blue,
45-
);
46-
scaffoldKey.currentState.showSnackBar(snackbar);
47-
}
48-
4938
@override
5039
void initState() {
5140
super.initState();
5241
//Start showcase view after current widget frames are drawn.
5342
WidgetsBinding.instance.addPostFrameCallback((_) =>
5443
ShowCaseWidget.of(context).startShowCase([_one, _two, _three, _four, _five]));
55-
ShowCaseWidget.setOnShowCaseFinish(() {
56-
_showSnackbar('ShowcaseView Finished');
57-
});
5844
}
5945

6046
@override
6147
Widget build(BuildContext context) {
6248
return Scaffold(
63-
key: scaffoldKey,
6449
body: SafeArea(
6550
child: ListView(
6651
children: <Widget>[

lib/showcase_widget.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class ShowCaseWidget extends StatefulWidget {
2222
}
2323
}
2424

25-
static setOnShowCaseFinish(VoidCallback onFinish) {
26-
ShowCaseOnFinish._onShowCaseFinish = onFinish;
27-
}
28-
2925
@override
3026
ShowCaseWidgetState createState() => ShowCaseWidgetState();
3127
}

preview/showcaseview.gif

-396 KB
Loading

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: showcaseview
22
description: A Flutter package to Showcase/Highlight widgets step by step.
3-
version: 0.1.4
3+
version: 0.1.3
44
author: Simform solutions <developer@simform.com>
55
homepage: https://github.com/simformsolutions/flutter_showcaseview
66
issue_tracker: https://github.com/simformsolutions/flutter_showcaseview/issues

0 commit comments

Comments
 (0)