Skip to content

Commit 4a317b0

Browse files
Merge pull request #132 from gluestack/development
Development
2 parents 7044841 + ed421b7 commit 4a317b0

File tree

137 files changed

+1800
-1461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1800
-1461
lines changed

.pubignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
example/lib/kitchensink_gluestack_example
2+
example/lib/example/storybook

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 0.0.1-alpha.5
2+
3+
- Added GS Stack
4+
- Added GS Scroll
5+
- Widget specific enums for better developer experience
6+
- Added more examples
7+
18
## 0.0.1-alpha.4
29

310
- Add support to get custom JSON config for Gluestack Widgets.

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ _Package is in development. APIs may change in the future._
66

77
## Documentation
88

9-
You can try out the gluestack flutter widgets on this storybook link: https://gluestack-ui-example.web.app/#/storybook
9+
![Gluestack Flutter Banner](assets/gs_docs_flutter_cover.png)
1010

11-
Web app build with gluestack:https://kitchensink-23184.web.app/
11+
The gluestack-ui-flutter library is designed to enhance web and mobile app development. It features platform-agnostic components for consistent UI across platforms, offers styling flexibility with pre-built themes and custom options, and emphasizes accessibility. Tailored for web development, it includes web-friendly widgets, native web styling, responsive design, and smooth animations. Key considerations are Flutter web specificity, performance optimization, and community engagement. The library also enables centralized styling, consistency, reusability, scalability, efficient development, and rapid prototyping, aiming to foster collaboration and ensure a unique, high-performance UI experience.
1212

13-
We are referring gluestack-ui to create gluestack-ui-flutter. Flutter documentation is in progress. You can find the detailed documentation for each component, including a list of props and examples, in https://gluestack.io/ui/docs website.
13+
Here are few helpful links to give you an idea of what gluestack-ui-flutter is capable of:
14+
15+
- Widget Examples (Storybook): https://gluestack-ui-example.web.app/#/storybook
16+
- Getting Started Example: https://github.com/gluestack/flutter-examples
17+
- KitchenSink (An example layout made with Gluestack): https://kitchensink-23184.web.app/
18+
19+
To keep track of latest developments in gluestack-ui-flutter you can refer to this link: https://github.com/gluestack/gluestack-ui-flutter/tree/feature/core-widgets.
20+
21+
Documentation: https://flutter.gluestack.io/
1422

1523
## Features
1624

@@ -36,7 +44,7 @@ Add the package to your dependencies:
3644

3745
```yaml
3846
dependencies:
39-
gluestack_ui: 0.0.1-alpha.4
47+
gluestack_ui: 0.0.1-alpha.5
4048
```
4149
4250
OR
@@ -64,9 +72,9 @@ Here's an example of how to use `GSButton` widget into your flutter app:
6472
import 'package:gluestack_ui/gluestack_ui.dart';
6573
6674
GSButton(
67-
action: GSActions.negative,
68-
variant: GSVariants.solid,
69-
size: GSSizes.$lg,
75+
action: GSButtonActions.negative,
76+
variant: GSButtonVariants.solid,
77+
size: GSButtonSizes.$lg,
7078
onPressed: () {},
7179
style: GSStyle(
7280
web: GSStyle(

assets/gs_docs_flutter_cover.png

83.1 KB
Loading
Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
flutter_service_worker.js,1704962362449,4d9b34fbb385414e71bc1bbbf2ba76cbba288e271d870b828d74777b726ec71b
2-
404.html,1704962428696,05cbc6f94d7a69ce2e29646eab13be2c884e61ba93e3094df5028866876d18b3
3-
favicon.png,1704949439191,fcc7c4545d5b62ad01682589e6fdc7ea03d0a3b42069963c815c344b632eb5cf
4-
index.html,1704962361856,8e7d53f14394dd1d93179ff2cb6efadc1bb92595448fbbb3fd209c92be927fa6
5-
manifest.json,1704949439197,f81e4554dc7f05633a2c5597416813859de5ace688342db41b201d42790fb8a7
6-
version.json,1704962359564,5bb140941d838dc5fb6e3c70ce026cc5bcfc0b3ef65c057bc0251982e5951bae
7-
assets/AssetManifest.bin.json,1704962359826,eb6fa32d28b0a3cd253fcc35110e0aac1fe7a94f71d3b6221f8e42d62fa085a0
8-
flutter.js,1704962382904,4ce6015fec2b419cefbf1222b977f169be64e9036f722f1405e0f178e6025fe0
9-
assets/AssetManifest.bin,1704962359826,34ca72820736a4fd2f53350ce82082f9663c05f12e016aa6a784dcda3d7bc633
10-
assets/FontManifest.json,1704962359826,9ea504185602e57d97b7c3517d382b8627a13c0181c490c96a9b55a5d5c8810c
11-
assets/AssetManifest.json,1704962359826,da1c19fcb57b37bdfc1ffc3e25fb8079d39a8881da0c8b8f35d8d76bf641c1db
12-
assets/packages/cupertino_icons/assets/CupertinoIcons.ttf,1704962361843,53ea433b22c061859c03c35b908eef1e49786ab0ec09bf1e01df03a5df5397ea
131
assets/packages/fluttertoast/assets/toastify.css,1700575544226,e47b28badc6ccfc424aa2525fbfed8f4fc6476a0f4145488c07c9d51ec6b9408
142
assets/packages/fluttertoast/assets/toastify.js,1700575544221,f75f8bed11d1d89cd09f480882907363946f39e887bf6f7168a92e07dc2fe314
153
assets/packages/storybook_flutter/assets/README.md,1702283093376,99c34916089fabfa9698edff60886be0dad94c496e85d713d886fd053185c537
16-
assets/shaders/ink_sparkle.frag,1704962360158,62c36b32f67b76a3eb26439167a58be81631592706c55fde8956e32661d1b9f1
17-
assets/fonts/MaterialIcons-Regular.otf,1704962361843,dbf5e70050c904ed84439f8c4d2c4073578c90d0197e3929f905a3e45a1dde2b
18-
canvaskit/skwasm.worker.js,1700636264000,d480228d9a755f2a0b3c3ff0c171ade188993bfc427eb3489790ee4db93ecb60
19-
icons/Icon-192.png,1704949439192,d2e0131bb7851eb9d98f7885edb5ae4b4d6b7a6c7addf8a25b9b712b39274c0f
20-
icons/Icon-512.png,1704949439193,7a31ce91e554f1941158ca46f31c7f3f2b7c8c129229ea74a8fae1affe335033
21-
icons/Icon-maskable-192.png,1704949439194,dd96c123fdf6817cdf7e63d9693bcc246bac2e3782a41a6952fa41c0617c5573
22-
icons/Icon-maskable-512.png,1704949439195,e7983524dc70254adc61764657d7e03d19284de8da586b5818d737bc08c6d14e
234
canvaskit/canvaskit.js,1700636118000,385293d6197873e296c6b4ce320bb5dd301f07d2f77b93bbf0aff5b2a5efcdbf
24-
canvaskit/chromium/canvaskit.js,1700636178000,dd8792ae84119f9ec24a401f5d67dc84980ea8e316d997568658c3d0e3f15427
5+
canvaskit/canvaskit.wasm,1700636108000,0ca123d6147e392bcb1fbda49fe5b94318de5a5a4ebc12b2ab3dad388cb85abc
256
canvaskit/skwasm.js,1700636264000,3e9442f556491c85546f535c104c7e529b9636e3c68719f27b1712129a0c2302
26-
assets/NOTICES,1704962359828,b57fd33dfb1b0b00593c0cb5b83eb8cc4f1498f02f3922d2f7c995cdc08baa11
27-
main.dart.js,1704962358889,7521dda579b221992dfdd1a4702e432bc6128423f4da9800b58524ef78f01bfb
287
canvaskit/skwasm.wasm,1700636258000,884ed3a9aff46dc41c970f99a6d97591704a1190c7a41878a5cb862624e87fe4
8+
canvaskit/skwasm.worker.js,1700636264000,d480228d9a755f2a0b3c3ff0c171ade188993bfc427eb3489790ee4db93ecb60
9+
canvaskit/chromium/canvaskit.js,1700636178000,dd8792ae84119f9ec24a401f5d67dc84980ea8e316d997568658c3d0e3f15427
2910
canvaskit/chromium/canvaskit.wasm,1700636170000,d156345b85fef78ed05a47745ed9f33d8edc3f19d699807f6d11b8b73c11faaf
30-
canvaskit/canvaskit.wasm,1700636108000,0ca123d6147e392bcb1fbda49fe5b94318de5a5a4ebc12b2ab3dad388cb85abc
11+
favicon.png,1705560615383,c023e85c356b33452a71456926b38343b06e82352785091f9bc4debc68956529
12+
index.html,1705560783774,15cd3a5f8bf629aa8705409e373b04d397f1a6dde641cfd0c24237449ccc0acf
13+
flutter_service_worker.js,1705560784636,7c664a6d719d766beaca2ff0664fa2e0a3b138f54fb2c736db2725c82840eff6
14+
manifest.json,1705560615385,7c827f5719aaf3bc3cadfc33494d1a5d9cfb55cc7ad3bc8777aa15d0b58a078a
15+
flutter.js,1705560734144,49a4ad487943285f50500865a9b83ced5d46e375df2c0b04b4928d8a9b593295
16+
version.json,1705560781236,3e63769199600f43ea2a8a3610bc2e13b726ca38ecd88a5f421969106cdbc79e
17+
assets/AssetManifest.json,1705560781513,78824689f229719e8e68623312230ea5b8d119489ff2f68d9e245267122d823d
18+
assets/FontManifest.json,1705560781515,4eebc51684a189590cf731751ceeca7cad975e484c3b88d90f3a8d204c9108c9
19+
assets/AssetManifest.bin.json,1705560781513,68d4f2f06b872aaf05d7b04ef29a9b2696c1fa24df8de0ce3e35a6153cdbbbe6
20+
assets/AssetManifest.bin,1705560781513,2a3ecf94e17c5528912c704f53d555243c2cec133f71ad861bbd105c5bc33bd9
21+
assets/packages/cupertino_icons/assets/CupertinoIcons.ttf,1705560783758,5278e713f3e1f15c42d2f3d464e4a7b14cd8d808efa514dc1c8d2f224790ffc8
22+
assets/fonts/MaterialIcons-Regular.otf,1705560783760,7e951a3d68394e9e6abbfad88f69655456fe37b7589c61cd625eb2df2f55d53d
23+
assets/shaders/ink_sparkle.frag,1705560782010,6e2530c69d325aaa39ca78f320704b3eced1fb1f363d41bc632d204ab0236887
24+
icons/Icon-192.png,1705560615383,84c73fff6a50c2573b3a7d2e09b2d55c628db625c8ca61c632a0add7028d2926
25+
icons/Icon-maskable-192.png,1705560615384,1c3ba0c948915ce01efa0bcb9c9b22dffc63f30df9ff6c3288531c5209a86908
26+
icons/Icon-512.png,1705560615384,db4e589fa57af5d94440c1679ae7b9248d82ddd3002614cf473439d0728d868f
27+
icons/Icon-maskable-512.png,1705560615384,acb883dcd1c47b0c08d93b9f838459a0a14957b1f044f759310893e89557a5e1
28+
assets/NOTICES,1705560781516,43a4594f10416b1a93ae4b79661d579c50d9f32bc32c249c0953d80bc8bc451f
29+
main.dart.js,1705560780263,14e094ec1b5ac99a46b8c8fe1b93bb4ce1968928734c35e4a9078b05c13c6e40

example/integration_test/plugin_integration_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// // For more information about Flutter integration tests, please see
77
// // https://docs.flutter.dev/cookbook/testing/integration/introduction
88

9-
109
// import 'package:flutter_test/flutter_test.dart';
1110
// import 'package:integration_test/integration_test.dart';
1211

example/lib/custom_config.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Map<String, dynamic> customButton2 = {
3030
'bg': '\$primary600',
3131
'borderColor': '\$primary300',
3232
},
33-
3433
},
3534
},
3635
':disabled': {

example/lib/example/alert_example.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class AlertExample extends StatelessWidget {
99
Widget build(BuildContext context) {
1010
var code = '''
1111
GSButton(
12-
size: GSSizes.\$lg,
12+
size: GSButtonSizes.\$lg,
1313
child: const GSButtonText(text: "Click Me"),
1414
onPressed: () {
1515
GSAlertDialog.show(
1616
context,
17-
size: GSSizes.\$full,
17+
size: GSAlertDialogSizes.\$full,
1818
content: GSAlertDialogContent(
1919
header: GSAlertDialogHeader(
2020
style: GSStyle(
@@ -30,13 +30,13 @@ class AlertExample extends StatelessWidget {
3030
child: GSButtonGroup(
3131
buttons: [
3232
GSButton(
33-
action: GSActions.positive,
34-
variant: GSVariants.outline,
33+
action: GSButtonActions.positive,
34+
variant: GSButtonVariants.outline,
3535
child: const Text("Yes"),
3636
onPressed: () {}),
3737
GSButton(
38-
action: GSActions.negative,
39-
variant: GSVariants.outline,
38+
action: GSButtonActions.negative,
39+
variant: GSButtonVariants.outline,
4040
child: const Text("No"),
4141
onPressed: () {}),
4242
],
@@ -55,12 +55,12 @@ class AlertExample extends StatelessWidget {
5555
code: code,
5656
component: Center(
5757
child: GSButton(
58-
size: GSSizes.$lg,
58+
size: GSButtonSizes.$lg,
5959
child: const GSButtonText(text: "Click Me"),
6060
onPressed: () {
6161
GSAlertDialog.show(
6262
context,
63-
size: GSSizes.$full,
63+
size: GSAlertDialogSizes.$full,
6464
content: GSAlertDialogContent(
6565
header: GSAlertDialogHeader(
6666
style: GSStyle(
@@ -76,13 +76,13 @@ class AlertExample extends StatelessWidget {
7676
child: GSButtonGroup(
7777
buttons: [
7878
GSButton(
79-
action: GSActions.positive,
80-
variant: GSVariants.outline,
79+
action: GSButtonActions.positive,
80+
variant: GSButtonVariants.outline,
8181
child: const Text("Yes"),
8282
onPressed: () {}),
8383
GSButton(
84-
action: GSActions.negative,
85-
variant: GSVariants.outline,
84+
action: GSButtonActions.negative,
85+
variant: GSButtonVariants.outline,
8686
child: const Text("No"),
8787
onPressed: () {}),
8888
],

example/lib/example/avatar_example.dart

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ class AvatarExample extends StatefulWidget {
1212

1313
class _AvatarExampleState extends State<AvatarExample> {
1414
final List dropdownSizeOptions = [
15-
GSSizes.$xs,
16-
GSSizes.$sm,
17-
GSSizes.$md,
18-
GSSizes.$lg,
19-
GSSizes.$xl,
20-
GSSizes.$2xl,
15+
GSAvatarSizes.$xs,
16+
GSAvatarSizes.$sm,
17+
GSAvatarSizes.$md,
18+
GSAvatarSizes.$lg,
19+
GSAvatarSizes.$xl,
20+
GSAvatarSizes.$2xl,
2121
];
22-
GSSizes selectedSizeOption = GSSizes.$md;
22+
GSAvatarSizes selectedSizeOption = GSAvatarSizes.$md;
2323
void updateSizeSelectedOption(dynamic newOption) {
2424
setState(() {
2525
selectedSizeOption = newOption;
2626
});
2727
}
2828

2929
final List dropdownRadiusOptions = [
30-
GSBorderRadius.$none,
31-
GSBorderRadius.$xs,
32-
GSBorderRadius.$sm,
33-
GSBorderRadius.$md,
34-
GSBorderRadius.$lg,
35-
GSBorderRadius.$xl,
36-
GSBorderRadius.$2xl,
37-
GSBorderRadius.$3xl,
38-
GSBorderRadius.$full,
30+
GSAvatarRadius.$none,
31+
GSAvatarRadius.$xs,
32+
GSAvatarRadius.$sm,
33+
GSAvatarRadius.$md,
34+
GSAvatarRadius.$lg,
35+
GSAvatarRadius.$xl,
36+
GSAvatarRadius.$2xl,
37+
GSAvatarRadius.$3xl,
38+
GSAvatarRadius.$full,
3939
];
40-
GSBorderRadius selectedRadiusOption = GSBorderRadius.$full;
40+
GSAvatarRadius selectedRadiusOption = GSAvatarRadius.$full;
4141
void updateRadiusSelectedOption(dynamic newOption) {
4242
setState(() {
4343
selectedRadiusOption = newOption;
@@ -48,8 +48,8 @@ class _AvatarExampleState extends State<AvatarExample> {
4848
Widget build(BuildContext context) {
4949
var code = '''
5050
GSAvatar(
51-
radius: selectedRadiusOption,
52-
size: selectedSizeOption,
51+
radius: GSAvatarRadius.\$full,
52+
size: GSAvatarSizes.\$md,
5353
style: GSStyle(
5454
bg: Colors.orange,
5555
textStyle: const TextStyle(color: Colors.white),

example/lib/example/badge_example.dart

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,40 @@ class BadgeExample extends StatefulWidget {
1212
}
1313

1414
class _BadgeExampleState extends State<BadgeExample> {
15-
final List dropdownSizeOptions = [GSSizes.$sm, GSSizes.$md, GSSizes.$lg];
16-
GSSizes selectedSizeOption = GSSizes.$md;
15+
final List dropdownSizeOptions = [
16+
GSBadgeSizes.$sm,
17+
GSBadgeSizes.$md,
18+
GSBadgeSizes.$lg
19+
];
20+
GSBadgeSizes selectedSizeOption = GSBadgeSizes.$md;
1721

1822
final List dropdownVariantOptions = [
19-
GSVariants.solid,
20-
GSVariants.outline,
23+
GSBadgeVariants.solid,
24+
GSBadgeVariants.outline,
2125
];
22-
GSVariants selectedVariantOption = GSVariants.solid;
26+
GSBadgeVariants selectedVariantOption = GSBadgeVariants.solid;
2327

2428
final List dropdownRadiusOptions = [
25-
GSBorderRadius.$none,
26-
GSBorderRadius.$xs,
27-
GSBorderRadius.$sm,
28-
GSBorderRadius.$md,
29-
GSBorderRadius.$lg,
30-
GSBorderRadius.$xl,
31-
GSBorderRadius.$2xl,
32-
GSBorderRadius.$3xl,
33-
GSBorderRadius.$full,
29+
GSBadgeRadius.$none,
30+
GSBadgeRadius.$xs,
31+
GSBadgeRadius.$sm,
32+
GSBadgeRadius.$md,
33+
GSBadgeRadius.$lg,
34+
GSBadgeRadius.$xl,
35+
GSBadgeRadius.$2xl,
36+
GSBadgeRadius.$3xl,
37+
GSBadgeRadius.$full,
3438
];
35-
GSBorderRadius selectedRadiusOption = GSBorderRadius.$full;
39+
GSBadgeRadius selectedRadiusOption = GSBadgeRadius.$full;
3640

3741
final List dropdownActionOptions = [
38-
GSActions.error,
39-
GSActions.warning,
40-
GSActions.success,
41-
GSActions.info,
42-
GSActions.muted,
42+
GSBadgeActions.error,
43+
GSBadgeActions.warning,
44+
GSBadgeActions.success,
45+
GSBadgeActions.info,
46+
GSBadgeActions.muted,
4347
];
44-
GSActions selectedActionOption = GSActions.success;
48+
GSBadgeActions selectedActionOption = GSBadgeActions.success;
4549

4650
void updateSizeSelectedOption(dynamic newOption) {
4751
setState(() {

0 commit comments

Comments
 (0)