-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #344 from mukireus/feature/add-widgets-to-widgetbook
[Widgetbook] - Feature - Add widgets to widgetbook
- Loading branch information
Showing
24 changed files
with
881 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...or_2/widgetbook/lib/src/features/add_water/view/widgets/add_water_screen_back_button.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:coffee_maker_navigator_2/features/add_water/ui/view/widgets/add_water_screen_back_button.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:widgetbook_annotation/widgetbook_annotation.dart'; | ||
|
||
@UseCase( | ||
name: 'AddWaterScreenBackButton', | ||
type: AddWaterScreenBackButton, | ||
path: 'Add Water/Widgets', | ||
) | ||
Widget addWaterScreenBackButton(BuildContext context) { | ||
return const AddWaterScreenBackButton(); | ||
} |
18 changes: 18 additions & 0 deletions
18
...navigator_2/widgetbook/lib/src/features/add_water/view/widgets/add_water_screen_body.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import 'package:coffee_maker_navigator_2/features/add_water/ui/view/widgets/add_water_screen_body.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:widgetbook_annotation/widgetbook_annotation.dart'; | ||
|
||
@UseCase( | ||
name: 'AddWaterScreenBody', | ||
type: AddWaterScreenBody, | ||
path: 'Add Water/Widgets', | ||
) | ||
Widget addWaterScreenBody(BuildContext context) { | ||
return Scaffold( | ||
body: AddWaterScreenBody( | ||
onWaterQuantityUpdated: (_) {}, | ||
onWaterTemperatureUpdated: (_) {}, | ||
onWaterSourceUpdated: (_) {}, | ||
), | ||
); | ||
} |
34 changes: 34 additions & 0 deletions
34
...igator_2/widgetbook/lib/src/features/add_water/view/widgets/add_water_screen_content.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:coffee_maker_navigator_2/features/add_water/ui/view/widgets/add_water_screen_content.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:widgetbook/widgetbook.dart'; | ||
import 'package:widgetbook_annotation/widgetbook_annotation.dart'; | ||
|
||
@UseCase( | ||
name: 'AddWaterScreenContent', | ||
type: AddWaterScreenContent, | ||
path: 'Add Water/Widgets', | ||
) | ||
Widget addWaterScreenContent(BuildContext context) { | ||
return Scaffold( | ||
body: AddWaterScreenContent( | ||
isReadyToAddWater: ValueNotifier( | ||
context.knobs.boolean( | ||
label: 'Is Ready To Add Water', | ||
initialValue: false, | ||
), | ||
), | ||
errorMessage: ValueNotifier( | ||
context.knobs.string( | ||
label: 'Error Message', | ||
initialValue: 'Error message', | ||
), | ||
), | ||
onWaterQuantityUpdated: (_) {}, | ||
onWaterTemperatureUpdated: (_) {}, | ||
onWaterSourceUpdated: (_) {}, | ||
onCheckValidityPressed: () {}, | ||
onAddWaterPressed: () {}, | ||
onStepCompleted: () {}, | ||
), | ||
); | ||
} |
Oops, something went wrong.