Skip to content

Commit

Permalink
docs: new screenshots and readme more details
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Nov 18, 2022
1 parent 0090294 commit d9c6c84
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"package_info_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.3+1/","native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.0.17/","native_build":true,"dependencies":[]}],"android":[{"name":"package_info_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.3+1/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_android-6.0.21/","native_build":true,"dependencies":[]}],"macos":[{"name":"macos_ui","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/macos_ui-1.7.5/","native_build":true,"dependencies":[]},{"name":"package_info_plus_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_macos-1.3.0/","native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-3.0.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"package_info_plus_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_linux-1.0.5/","native_build":false,"dependencies":[]},{"name":"url_launcher_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-3.0.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"package_info_plus_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_windows-2.1.0/","native_build":false,"dependencies":[]},{"name":"url_launcher_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-3.0.1/","native_build":true,"dependencies":[]}],"web":[{"name":"package_info_plus_web","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_web-1.0.6/","dependencies":[]},{"name":"url_launcher_web","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.13/","dependencies":[]}]},"dependencyGraph":[{"name":"macos_ui","dependencies":[]},{"name":"package_info_plus","dependencies":["package_info_plus_linux","package_info_plus_macos","package_info_plus_windows","package_info_plus_web"]},{"name":"package_info_plus_linux","dependencies":[]},{"name":"package_info_plus_macos","dependencies":[]},{"name":"package_info_plus_web","dependencies":[]},{"name":"package_info_plus_windows","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2022-11-18 17:11:19.823935","version":"3.3.8"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"package_info_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.3+1/","native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.0.17/","native_build":true,"dependencies":[]}],"android":[{"name":"package_info_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.3+1/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_android-6.0.21/","native_build":true,"dependencies":[]}],"macos":[{"name":"macos_ui","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/macos_ui-1.7.5/","native_build":true,"dependencies":[]},{"name":"package_info_plus_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_macos-1.3.0/","native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-3.0.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"package_info_plus_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_linux-1.0.5/","native_build":false,"dependencies":[]},{"name":"url_launcher_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-3.0.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"package_info_plus_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_windows-2.1.0/","native_build":false,"dependencies":[]},{"name":"url_launcher_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-3.0.1/","native_build":true,"dependencies":[]}],"web":[{"name":"package_info_plus_web","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/package_info_plus_web-1.0.6/","dependencies":[]},{"name":"url_launcher_web","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.13/","dependencies":[]}]},"dependencyGraph":[{"name":"macos_ui","dependencies":[]},{"name":"package_info_plus","dependencies":["package_info_plus_linux","package_info_plus_macos","package_info_plus_windows","package_info_plus_web"]},{"name":"package_info_plus_linux","dependencies":[]},{"name":"package_info_plus_macos","dependencies":[]},{"name":"package_info_plus_web","dependencies":[]},{"name":"package_info_plus_windows","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2022-11-18 18:11:56.972551","version":"3.3.8"}
84 changes: 73 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Platform UI
# Platform UI
_by [@KRTirtho](https://github.com/KRTirtho)_

Flutter platform specific UI widgets

Expand All @@ -25,19 +26,80 @@ Run following in a terminal:
$ flutter pub add platform_ui fluent_ui macos_ui libadwaita adwaita
```

## Usage

Import the package:
```dart
import 'package:platform_ui/platform_ui.dart';
```

## Example

```dart
import 'package:flutter/material.dart';
import 'package:platform_ui/platform_ui.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return PlatformApp(
title: 'Platform UI',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return PlatformScaffold(
appBar: PlatformAppBar(
title: Text('Platform UI'),
),
body: Center(
child: PlatformText(
'Hello World',
style: TextStyle(fontSize: 30),
),
),
);
}
}
```

## Documentation

- [API Reference](https://pub.dev/documentation/platform_ui/latest/)
- [Example app](https://github.com/KRTirtho/platform_ui/blob/main/example/lib/main.dart)
- Production App
- [Spotube](https://github.com/KRTirtho/spotube)

## Preview

Windows
![Windows](assets/windows.png)
### Desktop (Linux → Macos → Windows)

![Desktop](https://raw.githubusercontent.com/KRTirtho/platform_ui/main/assets/desktop.png)

### Mobile (Android → iOS)

![Mobile](https://raw.githubusercontent.com/KRTirtho/platform_ui/main/assets/mobile.png)


## Support

macOS
![macOS](assets/macos.png)
If you like this project, please consider supporting it by:
- Starring and sharing the project
- Following @KrTirtho on [Twitter](https://twitter.com/KrTirtho)
- Buying us a coffee ☕️

Linux
![Linux](assets/linux.png)
<a href="https://www.buymeacoffee.com/krtirtho">
<img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=krtirtho&button_colour=FF5F5F&font_colour=ffffff&font_family=Inter&outline_colour=000000&coffee_colour=FFDD00" />
</a>

iOS
![iOS](assets/ios.png)
## License

Android
![Android](assets/android.png)
[MIT](https://github.com/KRTirtho/platform_ui/blob/main/LICENSE)
Binary file removed assets/android.png
Binary file not shown.
Binary file added assets/desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/ios.png
Binary file not shown.
Binary file removed assets/linux.png
Binary file not shown.
Binary file removed assets/macos.png
Binary file not shown.
Binary file added assets/mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/windows.png
Binary file not shown.
1 change: 0 additions & 1 deletion lib/src/platform_sidebar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:libadwaita/libadwaita.dart';
import 'package:macos_ui/macos_ui.dart';
import 'package:platform_ui/platform_ui.dart';
import 'package:collection/collection.dart';
import 'package:libadwaita_core/libadwaita_core.dart';

class PlatformSidebarItem {
final Widget title;
Expand Down
2 changes: 2 additions & 0 deletions lib/src/specific/cupertino_list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

// Shamelessly copied from pub.dev/packages/cupertino_list_tile

// ignore_for_file: unused_element

import 'dart:math' as math;

import 'package:flutter/cupertino.dart';
Expand Down
5 changes: 2 additions & 3 deletions lib/src/specific/windows_title_bar_icons.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/// This file was shamelessly copied from https://github.com/bitsdojo/bitsdojo_window
/// Thanks to @bitsdojo for the great work!
import 'dart:math';

import 'package:flutter/widgets.dart';

// Switched to CustomPaint icons by https://github.com/esDotDev
Expand Down Expand Up @@ -53,10 +51,11 @@ class _MaximizePainter extends _IconPainter {
/// Restore
class RestoreIcon extends StatelessWidget {
final Color color;
RestoreIcon({
const RestoreIcon({
Key? key,
required this.color,
}) : super(key: key);

@override
Widget build(BuildContext context) => _AlignedPaint(_RestorePainter(color));
}
Expand Down
5 changes: 4 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: platform_ui
description: Platform specific design system with wide collection of UI widgets
description: Platform specific Widgets and UI toolkit
version: 0.1.0
homepage: https://github.com/KRTirtho/platform_ui

Expand All @@ -17,6 +17,9 @@ dependencies:
libadwaita: ^1.2.5
adwaita: ^0.5.2
collection: ^1.16.0
libadwaita_core: ^0.5.4
popover_gtk: ^0.2.6+3
flutter_svg: ^1.1.6

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit d9c6c84

Please sign in to comment.