Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton committed Jan 12, 2024
1 parent bb393d3 commit adcbd4a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 45 deletions.
29 changes: 1 addition & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
## [1.0.3] - 2024-01-11
### :flying_saucer: Other Changes
- [`23fd937`](https://github.com/ZebraDevs/zds_flutter/commit/23fd93762d4efb1ba31292a9c68818581b357d6e) - Add all changes from v1.0.0 internal *(PR [#2](https://github.com/ZebraDevs/zds_flutter/pull/2) by [@thelukewalton](https://github.com/thelukewalton))*
- [`d736ecd`](https://github.com/ZebraDevs/zds_flutter/commit/d736ecdb10f1edbb5e0afed004c3583701c8ea3c) - Update to latest version of flu/tter and update InAppWebView *(commit by [@thelukewalton](https://github.com/thelukewalton))*
- [`6862ac0`](https://github.com/ZebraDevs/zds_flutter/commit/6862ac0811773e6adc4bf6aa1b1901e404eb6b2e) - actions *(commit by [@thelukewalton](https://github.com/thelukewalton))*
- [`531d0d9`](https://github.com/ZebraDevs/zds_flutter/commit/531d0d950ef025961456866c59e3013b8b5d706f) - actions *(commit by [@thelukewalton](https://github.com/thelukewalton))*
- [`88db187`](https://github.com/ZebraDevs/zds_flutter/commit/88db187d791efc8458e4b572e68318d2f8099831) - Fix pupignore *(commit by [@thelukewalton](https://github.com/thelukewalton))*
- [`cfe31db`](https://github.com/ZebraDevs/zds_flutter/commit/cfe31db202f1b843fca246cf705b384d17b0b1ff) - quill update part 1 *(commit by [@thelukewalton](https://github.com/thelukewalton))*
- [`805ba4d`](https://github.com/ZebraDevs/zds_flutter/commit/805ba4d693e1c6ae80d5d8d96dc19c2bb8942c25) - Merge branch 'bug/publish-bugs' of https://github.com/ZebraDevs/zds_flutter into bug/publish-bugs *(commit by [@thelukewalton](https://github.com/thelukewalton))*


## [1.0.2] - 2024-01-03

### :flying_saucer: Other Changes

- [`6862ac0`](https://github.com/ZebraDevs/zds_flutter/commit/6862ac0811773e6adc4bf6aa1b1901e404eb6b2e) - actions _(commit by [@thelukewalton](https://github.com/thelukewalton))_

## [1.0.1] - 2024-01-03

### :flying_saucer: Other Changes

- [`e8628a1`](https://github.com/ZebraDevs/zds_flutter/commit/e8628a1a8cf76ada08a64a0312c1f7efd23c6cd5) - actions _(commit by [@thelukewalton](https://github.com/thelukewalton))_

## [1.0.0] - 2024-01-02

### :sparkles: New features
Expand All @@ -33,8 +10,4 @@

- [`885fa19`](https://github.com/zebradevs/zds-flutter/commit/885fa19d4d0ec4426a259b61cb828b6c9fac175e) - init. _(commit by [@thelukewalton](https://github.com/thelukewalton))_

[1.0.1]: https://github.com/ZebraDevs/zds_flutter/compare/v1.0.2...1.0.1
[1.0.1]: https://github.com/ZebraDevs/zds_flutter/compare/v1.0.2...1.0.1
[1.0.2]: https://github.com/ZebraDevs/zds_flutter/compare/1.0.1...1.0.2

[1.0.3]: https://github.com/ZebraDevs/zds_flutter/compare/1.0.0...1.0.3
[1.0.0]: https://github.com/ZebraDevs/zds_flutter/compare/0.2.0...1.0.0
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ A library of Flutter components made by Zebra Technologies based on the Zebra De
Make sure your app meets the following requirements before using ZDS Flutter

- sdk: >=3.0.10 <4.0.0
- flutter: >=3.7.0
- flutter: >=3.7.0 <3.16.0

```
Note: This package version may not work on the newest versions of Flutter (<3.16.0).
```

## Usage

Add the following as a dependency in your pubspec.yaml file.

```yml
zds-flutter: ^1.0.0
zds-flutter: ^1.0.1
```
## Getting started
Expand Down
4 changes: 0 additions & 4 deletions example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* https://developer.mozilla.org/en-US/doc/Web/HTML/Element/base
-->
<base href="$FLUTTER_BASE_HREF">
<script type="application/javascript" src="/assets/packages/flutter_inappwebview/assets/web/web_support.js"
defer></script>

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
Expand All @@ -31,8 +29,6 @@

<title>zds_flutter example</title>
<link rel="manifest" href="manifest.json">
<script type="application/javascript" src="assets/packages/flutter_inappwebview/assets/web/web_support.js"
defer=""></script>
<script type="application/javascript" src="/assets/packages/flutter_inappwebview_web/assets/web/web_support.js"
defer></script>
</head>
Expand Down
29 changes: 18 additions & 11 deletions lib/src/components/molecules/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,21 @@ class ZdsHorizontalList extends _ZdsHorizontalList {
}

class _ZdsHorizontalList extends StatelessWidget {
const _ZdsHorizontalList({super.key, this.delegate, this.caption, this.isReducedHeight = false});
final Widget? caption;
final _ZdsHorizontalChildDelegate? delegate;
final bool isReducedHeight;
const _ZdsHorizontalList({
super.key,
_ZdsHorizontalChildDelegate? delegate,
Widget? caption,
bool isReducedHeight = false,
}) : _isReducedHeight = isReducedHeight,
_delegate = delegate,
_caption = caption;
final Widget? _caption;
final _ZdsHorizontalChildDelegate? _delegate;
final bool _isReducedHeight;

@override
Widget build(BuildContext context) {
final Widget firstItem = delegate!.build(context, 0);
final Widget firstItem = _delegate!.build(context, 0);

return MeasureSize(
child: firstItem,
Expand All @@ -152,11 +159,11 @@ class _ZdsHorizontalList extends StatelessWidget {
children: <Widget>[
DefaultTextStyle(
style: Theme.of(context).textTheme.displayMedium!,
child: caption != null ? caption!.paddingOnly(top: 20, left: 20, right: 20) : const SizedBox(),
child: _caption != null ? _caption!.paddingOnly(top: 20, left: 20, right: 20) : const SizedBox(),
),
SizedBox(
width: double.infinity,
height: isReducedHeight ? size.height : size.height + 20,
height: _isReducedHeight ? size.height : size.height + 20,
child: CustomScrollView(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
Expand All @@ -165,8 +172,8 @@ class _ZdsHorizontalList extends StatelessWidget {
padding: const EdgeInsets.all(10),
sliver: SliverList(
delegate: SliverChildBuilderDelegate(
delegate!.build,
childCount: delegate!.estimatedChildCount,
_delegate!.build,
childCount: _delegate!.estimatedChildCount,
),
),
),
Expand All @@ -183,8 +190,8 @@ class _ZdsHorizontalList extends StatelessWidget {
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty<_ZdsHorizontalChildDelegate?>('delegate', delegate))
..add(DiagnosticsProperty<bool>('isReducedHeight', isReducedHeight));
..add(DiagnosticsProperty<_ZdsHorizontalChildDelegate?>('delegate', _delegate))
..add(DiagnosticsProperty<bool>('isReducedHeight', _isReducedHeight));
}
}

Expand Down
2 changes: 2 additions & 0 deletions lib/src/utils/assets/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ Color iconColor(String ext) {
}
}

/// Extensions to get an icon from a file type.
extension IconDataFromExt on String {
/// Assuming the string is a file name, this function returns the corresponding icon for the filetype.
///
Expand All @@ -435,6 +436,7 @@ extension IconDataFromExt on String {
return _resolveFileIcon(this);
}

/// Returns file type icon with color. See [IconDataFromExt.fileIcon].
Icon coloredFileIcon() {
return Icon(_resolveFileIcon(this), color: _resolveFileColor(this));
}
Expand Down

0 comments on commit adcbd4a

Please sign in to comment.