Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: A variety of small bug fixes #168

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: ZebraDevs/flutter-code-quality@main
with:
token: ${{secrets.GITHUB_TOKEN}}
coverage-pass-score: '1'
coverage-pass-score: '90'


check-secret:
Expand Down
42 changes: 38 additions & 4 deletions LICENSE-3RD-PARTY
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

### Flutter
## Flutter

Applies to:

Expand Down Expand Up @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

### tinycolor
## tinycolor

Applies to:

Expand All @@ -53,7 +53,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

---

### IBM Plex Sans
## IBM Plex Sans

Applies to:

Expand All @@ -67,7 +67,7 @@ This Font Software is licensed under the SIL Open Font License, Version 1.1.

This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL

## SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
### SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
Expand Down Expand Up @@ -151,3 +151,37 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.



## Mike Rydstrom

Applies to:

* platform_is.dart
* universal_platform_vm.dart
* universal_platform_web.dart

https://gist.github.com/rydmike/1771fe24c050ebfe792fa309371154d8

MIT License

Copyright (c) 2021 Mike Rydstrom

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
52 changes: 31 additions & 21 deletions example/lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,30 +161,40 @@ class _HomeState extends State<Home> {
child: SingleChildScrollView(
child: Column(
children: [
ExpansionTile(
title: Text('Widgets'),
backgroundColor: Zeta.of(context).colors.warm.shade30,
children: _components
.map((item) => ListTile(title: Text(item.name), onTap: () => context.go('/${item.name}')))
.toList(),
),
ExpansionTile(
title: Text('Theme'),
backgroundColor: Zeta.of(context).colors.warm.shade30,
children: _theme
.map((item) => ListTile(title: Text(item.name), onTap: () => context.go('/${item.name}')))
.toList(),
),
ExpansionTile(
title: Text('Assets'),
backgroundColor: Zeta.of(context).colors.warm.shade30,
children: _assets
.map((item) => ListTile(title: Text(item.name), onTap: () => context.go('/${item.name}')))
.toList(),
),
ExampleListTile(name: 'Components', children: _components),
ExampleListTile(name: 'Theme', children: _theme),
ExampleListTile(name: 'Assets', children: _assets),
],
),
),
);
}
}

class ExampleListTile extends StatelessWidget {
const ExampleListTile({
super.key,
required this.children,
required this.name,
});

final List<Component> children;
final String name;

@override
Widget build(BuildContext context) {
return ExpansionTile(
title: Text(name),
children: children
.map(
(item) => ListTile(
title: Text(item.name),
onTap: () => context.go('/${item.name}'),
hoverColor: Zeta.of(context).colors.surfaceHover,
tileColor: Zeta.of(context).colors.surfaceDefault,
),
)
.toList(),
);
}
}
56 changes: 28 additions & 28 deletions example/lib/pages/theme/spacing_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,33 @@ class SpacingExample extends StatelessWidget {
'medium': Zeta.of(context).spacing.medium,
'large': Zeta.of(context).spacing.large,
'xl': Zeta.of(context).spacing.xl,
'2xl': Zeta.of(context).spacing.xl_2,
'3xl': Zeta.of(context).spacing.xl_3,
'4xl': Zeta.of(context).spacing.xl_4,
'5xl': Zeta.of(context).spacing.xl_5,
'6xl': Zeta.of(context).spacing.xl_6,
'7xl': Zeta.of(context).spacing.xl_7,
'8xl': Zeta.of(context).spacing.xl_8,
'9xl': Zeta.of(context).spacing.xl_9,
'10xl': Zeta.of(context).spacing.xl_10,
'11xl': Zeta.of(context).spacing.xl_11,
'xl_2': Zeta.of(context).spacing.xl_2,
'xl_3': Zeta.of(context).spacing.xl_3,
'xl_4': Zeta.of(context).spacing.xl_4,
'xl_5': Zeta.of(context).spacing.xl_5,
'xl_6': Zeta.of(context).spacing.xl_6,
'xl_7': Zeta.of(context).spacing.xl_7,
'xl_8': Zeta.of(context).spacing.xl_8,
'xl_9': Zeta.of(context).spacing.xl_9,
'xl_10': Zeta.of(context).spacing.xl_10,
'xl_11': Zeta.of(context).spacing.xl_11,
};
Map<String, double> baseSpacings = {
'x1': Zeta.of(context).spacing.primitives.x1,
'x2': Zeta.of(context).spacing.primitives.x2,
'x3': Zeta.of(context).spacing.primitives.x3,
'x4': Zeta.of(context).spacing.primitives.x4,
'x5': Zeta.of(context).spacing.primitives.x5,
'x6': Zeta.of(context).spacing.primitives.x6,
'x7': Zeta.of(context).spacing.primitives.x7,
'x8': Zeta.of(context).spacing.primitives.x8,
'x9': Zeta.of(context).spacing.primitives.x9,
'x10': Zeta.of(context).spacing.primitives.x10,
'x11': Zeta.of(context).spacing.primitives.x11,
'x12': Zeta.of(context).spacing.primitives.x12,
'x13': Zeta.of(context).spacing.primitives.x13,
'x14': Zeta.of(context).spacing.primitives.x14,
'x15': Zeta.of(context).spacing.primitives.x15,
'primitives.x1': Zeta.of(context).spacing.primitives.x1,
'primitives.x2': Zeta.of(context).spacing.primitives.x2,
'primitives.x3': Zeta.of(context).spacing.primitives.x3,
'primitives.x4': Zeta.of(context).spacing.primitives.x4,
'primitives.x5': Zeta.of(context).spacing.primitives.x5,
'primitives.x6': Zeta.of(context).spacing.primitives.x6,
'primitives.x7': Zeta.of(context).spacing.primitives.x7,
'primitives.x8': Zeta.of(context).spacing.primitives.x8,
'primitives.x9': Zeta.of(context).spacing.primitives.x9,
'primitives.x10': Zeta.of(context).spacing.primitives.x10,
'primitives.x11': Zeta.of(context).spacing.primitives.x11,
'primitives.x12': Zeta.of(context).spacing.primitives.x12,
'primitives.x13': Zeta.of(context).spacing.primitives.x13,
'primitives.x14': Zeta.of(context).spacing.primitives.x14,
'primitives.x15': Zeta.of(context).spacing.primitives.x15,
};

return ExampleScaffold(
Expand All @@ -55,12 +55,12 @@ class SpacingExample extends StatelessWidget {
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: baseSpacings.entries.map((obj) => _SpacingDemo(obj)).toList(),
children: semanticSpacings.entries.map((obj) => _SpacingDemo(obj)).toList(),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: semanticSpacings.entries.map((obj) => _SpacingDemo(obj)).toList(),
)
children: baseSpacings.entries.map((obj) => _SpacingDemo(obj)).toList(),
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion example/widgetbook/pages/assets/icon_widgetbook.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Widget iconsUseCase(BuildContext context) {
nameArr,
textAlign: TextAlign.center,
maxLines: 2,
)
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion example/widgetbook/pages/introduction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _IntroductionWidgetbookState extends State<IntroductionWidgetbook> {
return LayoutBuilder(builder: (context, constraints) {
final bool largeScreen = constraints.maxWidth > 480;
return Scaffold(
backgroundColor: colors.black,
backgroundColor: Colors.black,
body: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(
Expand Down
Loading