-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: to override the one set on the theme.
- Loading branch information
1 parent
b2fee49
commit bf726ec
Showing
7 changed files
with
119 additions
and
3 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
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
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
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,74 @@ | ||
// ignore_for_file: public_member_api_docs | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:nes_ui/nes_ui.dart'; | ||
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; | ||
|
||
@widgetbook.UseCase( | ||
name: 'default', | ||
type: NesContainer, | ||
) | ||
Widget normal(BuildContext context) => const Center( | ||
child: NesContainer( | ||
width: 200, | ||
height: 200, | ||
child: Center( | ||
child: Text( | ||
'Hello World', | ||
), | ||
), | ||
), | ||
); | ||
|
||
@widgetbook.UseCase( | ||
name: 'with label', | ||
type: NesContainer, | ||
) | ||
Widget label(BuildContext context) => const Center( | ||
child: NesContainer( | ||
width: 200, | ||
height: 200, | ||
label: 'Label', | ||
child: Center( | ||
child: Text( | ||
'Hello World', | ||
), | ||
), | ||
), | ||
); | ||
|
||
@widgetbook.UseCase( | ||
name: 'with square corner painter', | ||
type: NesContainer, | ||
) | ||
Widget squareConer(BuildContext context) => const Center( | ||
child: NesContainer( | ||
painterBuilder: NesContainerSquareCornerPainter.new, | ||
width: 200, | ||
height: 200, | ||
label: 'Label', | ||
child: Center( | ||
child: Text( | ||
'Hello World', | ||
), | ||
), | ||
), | ||
); | ||
|
||
@widgetbook.UseCase( | ||
name: 'with corner inner square painter', | ||
type: NesContainer, | ||
) | ||
Widget cornerInnerSquare(BuildContext context) => const Center( | ||
child: NesContainer( | ||
painterBuilder: NesContainerCornerInnerSquarePainter.new, | ||
width: 200, | ||
height: 200, | ||
label: 'Label', | ||
child: Center( | ||
child: Text( | ||
'Hello World', | ||
), | ||
), | ||
), | ||
); |
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
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
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