Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
comigor committed Apr 14, 2019
1 parent 88d050e commit a0afe82
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion example/lib/my_widget.dart
Expand Up @@ -8,9 +8,14 @@ class MyWidget extends StatelessWidget {

MyWidget({
this.anotherBuild = false,
this.sliderValue = 2.0,
@required this.sliderValue,
});

static List<Widget> forDesignTime() => [
MyWidget(sliderValue: 2.0),
MyWidget(anotherBuild: true, sliderValue: 5.0),
];

@override
Widget build(BuildContext context) {
if (anotherBuild) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/my_widget_with_required_props.dart
Expand Up @@ -5,7 +5,7 @@ import 'package:showcase/showcase.dart';
class MyWidgetWithRequiredProps extends StatelessWidget {
MyWidgetWithRequiredProps(this.label);

factory MyWidgetWithRequiredProps.forDesignTime() =>
static Widget forDesignTime() =>
MyWidgetWithRequiredProps('Default test-only label.');

final String label;
Expand Down
2 changes: 1 addition & 1 deletion example/test/my_widget.showcased_test.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added example/test/showcase/001_MyWidget.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a0afe82

Please sign in to comment.