Skip to content

Commit

Permalink
Version 1.1.0+1 - Readme updates (macosui#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
GroovinChip authored May 7, 2022
1 parent 72d7825 commit 8d42cd4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 21 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.1.0+1]
* Minor improvements to `README.md`

## [1.1.0]
* New functionality for `MacosSearchField`
* Shows a list of search results in an overlay below the field
Expand Down
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

Flutter widgets and themes implementing the current macOS design language.

Check out our **interactive widget gallery** online at https://groovinchip.github.io/macos_ui/#/

[![pub package](https://img.shields.io/pub/v/macos_ui.svg)](https://pub.dev/packages/macos_ui)
[![pub package](https://img.shields.io/pub/publisher/macos_ui.svg)](https://pub.dev/packages/macos_ui)

[![Flutter Analysis](https://github.com/GroovinChip/macos_ui/actions/workflows/flutter_analysis.yml/badge.svg)](https://github.com/GroovinChip/macos_ui/actions/workflows/flutter_analysis.yml)
[![Pana Analysis](https://github.com/GroovinChip/macos_ui/actions/workflows/pana_analysis.yml/badge.svg)](https://github.com/GroovinChip/macos_ui/actions/workflows/pana_analysis.yml)
[![codecov](https://github.com/GroovinChip/macos_ui/actions/workflows/codecov.yaml/badge.svg)](https://github.com/GroovinChip/macos_ui/actions/workflows/codecov.yaml)
[![codecov](https://codecov.io/gh/GroovinChip/macos_ui/branch/dev/graph/badge.svg?token=1SZGEVVMCH)](https://codecov.io/gh/GroovinChip/macos_ui)

<img src="https://imgur.com/5mFQKBU.png" width="75%"/>

## Contents

<details>
Expand Down Expand Up @@ -105,13 +112,22 @@ Flutter widgets and themes implementing the current macOS design language.

`MacosWindow` is the basic frame for a macOS-style layout.

It has a `Sidebar` on the left, an optional `TitleBar` at the top, and the rest of the window is typically filled out
with a `MacosScaffold`. A scope for the `MacosWindow` is provided by `MacosWindowScope`.
The sidebar can be toggled with `MacosWindowScope.of(context).toggleSidebar()`. **Please note** that you must
wrap your `MacosScaffold` in a `Builder` widget in order for this to work properly.
<img src="https://imgur.com/olstQFC.png" width="40%"/>
<img src="https://imgur.com/yFXsoSy.png" width="40%"/>

It supports a `Sidebar` on the left, an optional `TitleBar` at the top, and the rest of the window is typically filled out
with a `MacosScaffold`.

<img src="https://imgur.com/LtdfKvv.png" width="75%">
A scope for the `MacosWindow` is provided by `MacosWindowScope`.
The sidebar can be toggled with `MacosWindowScope.of(context).toggleSidebar()`. **Please note** that you must wrap
your `MacosScaffold` in a `Builder` widget in order for this to work properly.

<img src="https://imgur.com/IBbp5rN.gif" width="75%">

Here is a basic example of a `MacosWindow`:
```dart
```

## MacosScaffold

Expand Down
22 changes: 8 additions & 14 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ class _DemoState extends State<Demo> {
const SelectorsPage(),
];

Color textLuminance(Color backgroundColor) {
return backgroundColor.computeLuminance() > 0.5
? MacosColors.black
: MacosColors.white;
}

@override
Widget build(BuildContext context) {
return MacosWindow(
Expand All @@ -87,14 +81,6 @@ class _DemoState extends State<Demo> {
// ),
sidebar: Sidebar(
minWidth: 200,
bottom: const Padding(
padding: EdgeInsets.all(16.0),
child: MacosListTile(
leading: MacosIcon(CupertinoIcons.profile_circled),
title: Text('Tim Apple'),
subtitle: Text('[email protected]'),
),
),
builder: (context, controller) {
return SidebarItems(
currentIndex: pageIndex,
Expand Down Expand Up @@ -141,6 +127,14 @@ class _DemoState extends State<Demo> {
],
);
},
bottom: const Padding(
padding: EdgeInsets.all(16.0),
child: MacosListTile(
leading: MacosIcon(CupertinoIcons.profile_circled),
title: Text('Tim Apple'),
subtitle: Text('[email protected]'),
),
),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.1.0+1"
matcher:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: macos_ui
description: Flutter widgets and themes implementing the current macOS design language.
version: 1.1.0
version: 1.1.0+1
homepage: "https://github.com/GroovinChip/macos_ui"

environment:
Expand Down

0 comments on commit 8d42cd4

Please sign in to comment.