From 56c83cea2ef58f733c37dccf0f54c86084beddab Mon Sep 17 00:00:00 2001 From: Reuben Turner Date: Sat, 7 May 2022 16:34:35 -0400 Subject: [PATCH] Version `1.1.0+1` - Readme updates (#233) --- CHANGELOG.md | 3 +++ README.md | 26 +++++++++++++++++++++----- example/lib/main.dart | 22 ++++++++-------------- example/pubspec.lock | 2 +- pubspec.yaml | 2 +- 5 files changed, 34 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10bc9956..013277ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 51bb625d..44826c3c 100644 --- a/README.md +++ b/README.md @@ -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) + + ## Contents
@@ -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. + + + +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`. - +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. + + +Here is a basic example of a `MacosWindow`: +```dart + +``` ## MacosScaffold diff --git a/example/lib/main.dart b/example/lib/main.dart index 2728d045..8264f019 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -68,12 +68,6 @@ class _DemoState extends State { const SelectorsPage(), ]; - Color textLuminance(Color backgroundColor) { - return backgroundColor.computeLuminance() > 0.5 - ? MacosColors.black - : MacosColors.white; - } - @override Widget build(BuildContext context) { return MacosWindow( @@ -87,14 +81,6 @@ class _DemoState extends State { // ), 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('tim@apple.com'), - ), - ), builder: (context, controller) { return SidebarItems( currentIndex: pageIndex, @@ -141,6 +127,14 @@ class _DemoState extends State { ], ); }, + bottom: const Padding( + padding: EdgeInsets.all(16.0), + child: MacosListTile( + leading: MacosIcon(CupertinoIcons.profile_circled), + title: Text('Tim Apple'), + subtitle: Text('tim@apple.com'), + ), + ), ), ); } diff --git a/example/pubspec.lock b/example/pubspec.lock index 266ab217..5d3de217 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "1.1.0" + version: "1.1.0+1" matcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 99722188..ba4344a6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: