-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding a basic gallery brick (#100)
* feat: adding a basic gallery brick * some updates for latest flutter version * removing unused files and improving readme
- Loading branch information
1 parent
39c4a20
commit 2b5b7a1
Showing
20 changed files
with
121 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# dashbook_gallery | ||
|
||
[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason) | ||
|
||
Creates a simple, opionated structure for a [Dashbook](https://github.com/bluefireteam/dashbook) | ||
based gallery for your Flutter Application. | ||
|
||
Note that this brick does not include any platform folders, so in order to run it, be sure to | ||
create the desired platforms: | ||
|
||
```sh | ||
flutter create . --platforms ... | ||
``` |
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,3 @@ | ||
# Gallery | ||
|
||
Dashbook based gallery sandbox. |
4 changes: 4 additions & 0 deletions
4
bricks/dashbook_gallery/__brick__/gallery/analysis_options.yaml
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,4 @@ | ||
include: package:very_good_analysis/analysis_options.5.0.0.yaml | ||
linter: | ||
rules: | ||
public_member_api_docs: false |
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,11 @@ | ||
import 'package:dashbook/dashbook.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:gallery/widgets/widgets.dart'; | ||
|
||
void main() { | ||
final dashbook = Dashbook(); | ||
|
||
addTextStories(dashbook); | ||
|
||
runApp(dashbook); | ||
} |
47 changes: 47 additions & 0 deletions
47
bricks/dashbook_gallery/__brick__/gallery/lib/widgets/text.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,47 @@ | ||
import 'package:dashbook/dashbook.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
void addTextStories(Dashbook dashbook) { | ||
dashbook | ||
.storiesOf('Text') | ||
.decorator(CenterDecorator()) | ||
.add( | ||
'default', | ||
(context) => Text( | ||
context.textProperty('text', 'Hello'), | ||
), | ||
) | ||
.add( | ||
'with style', | ||
(_) => const Text( | ||
'Hello world', | ||
style: TextStyle( | ||
color: Colors.blue, | ||
fontSize: 20, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
) | ||
.add( | ||
'with overflow', | ||
(_) => const SizedBox( | ||
width: 100, | ||
child: Text( | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world' | ||
'Hello world', | ||
overflow: TextOverflow.ellipsis, | ||
), | ||
), | ||
); | ||
} |
1 change: 1 addition & 0 deletions
1
bricks/dashbook_gallery/__brick__/gallery/lib/widgets/widgets.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 @@ | ||
export 'text.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,16 @@ | ||
name: gallery | ||
publish_to: none | ||
|
||
environment: | ||
sdk: '>=3.0.6 <4.0.0' | ||
|
||
dependencies: | ||
dashbook: ^0.1.12 | ||
flutter: | ||
sdk: flutter | ||
|
||
dev_dependencies: | ||
very_good_analysis: ^5.1.0 | ||
|
||
flutter: | ||
uses-material-design: true |
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,7 @@ | ||
name: dashbook_gallery | ||
description: Creates a simple dashbook gallery app with a minimal structure to get started. | ||
|
||
version: 0.1.0+1 | ||
|
||
environment: | ||
mason: ">=0.1.0-dev.50 <0.1.0" |
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
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
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