-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support for deploying to web
- Loading branch information
1 parent
f3ea74d
commit dc9f023
Showing
51 changed files
with
1,129 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"android":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"macos":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"linux":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"windows":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"web":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","dependencies":[]}]},"dependencyGraph":[{"name":"rive_common","dependencies":[]}],"date_created":"2024-10-02 14:16:18.732081","version":"3.24.1","swift_package_manager_enabled":false} | ||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"android":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"macos":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"linux":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"windows":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"web":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","dependencies":[]}]},"dependencyGraph":[{"name":"rive_common","dependencies":[]}],"date_created":"2024-10-03 14:43:31.190499","version":"3.24.1","swift_package_manager_enabled":false} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish to github pages | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: subosito/flutter-action@v2 | ||
- run: flutter packages get | ||
- run: dart analyze | ||
- run: flutter packages get | ||
working-directory: ./example | ||
- run: dart analyze | ||
working-directory: ./example | ||
- run: flutter build web | ||
working-directory: ./example | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "./example/build/web" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Automated tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
test: | ||
name: Runs all tests on main | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
- run: flutter pub get | ||
- run: flutter test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,61 @@ | ||
<!-- | ||
This README describes the package. If you publish this package to pub.dev, | ||
this README's contents appear on the landing page for your package. | ||
# impaktfull_ui | ||
|
||
For information about how to write a good package README, see the guide for | ||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | ||
A UI library of Impaktfull. | ||
|
||
For general information about developing packages, see the Dart guide for | ||
[creating packages](https://dart.dev/guides/libraries/create-library-packages) | ||
and the Flutter guide for | ||
[developing packages and plugins](https://flutter.dev/developing-packages). | ||
--> | ||
[![publish to github pages](https://github.com/impaktfull/flutter_impaktfull_ui_2/actions/workflows/publish_to_githubpages.yaml/badge.svg)](https://github.com/impaktfull/flutter_impaktfull_ui_2/actions/workflows/publish_to_githubpages.yaml/badge.svg) | ||
[![live_demo](https://img.shields.io/badge/Live%20Demo-Available-7D64F2)](https://example.snacky.opensource.impaktfull.com) | ||
|
||
TODO: Put a short description of the package here that helps potential users | ||
know whether this package might be useful for them. | ||
## Disclaimer | ||
|
||
## Features | ||
**impaktfull_ui is still in unstable & untested. everything under <1.0.0 should not be used unless you want to test it** | ||
|
||
TODO: List what your package can do. Maybe include images, gifs, or videos. | ||
## Purpose | ||
|
||
## Getting started | ||
This UI library was built to have a simple way to build UIs for impaktfull. This will limit the maintenance cost of open-source projects and make it easier to build applications. That way we can focus on building new tools & features instead of bugfixing and maintaining UI changes from Flutter. | ||
|
||
TODO: List prerequisites and provide or point to information on how to | ||
start using the package. | ||
- Open-source example projects | ||
- impaktfull applications | ||
|
||
# Demo | ||
|
||
[Live Web demo](https://example.impaktfull-ui.opensource.impaktfull.com) | ||
|
||
## Usage | ||
|
||
TODO: Include short and useful examples for package users. Add longer examples | ||
to `/example` folder. | ||
<!--[![pub package](https://img.shields.io/pub/v/impaktfull_ui.svg)](https://pub.dartlang.org/packages/impaktfull_ui)--> | ||
|
||
### Setup | ||
|
||
- Setup your theme (colors, textStyles, shadows, dimens, assets) | ||
- Use ImapktfullUiApp | ||
- Use the components provided in the UI library | ||
|
||
### Component List | ||
|
||
Components are always prefixed with `ImpaktfullUi` to avoid conflicts with other libraries. | ||
|
||
- ImpaktfullUiAutoLayout | ||
|
||
Many more to come in the future, always with the focus on minimizing maintenance and maximizing a recognizable UI/brand for impaktfull | ||
|
||
### Theming | ||
|
||
The provided theme contains the default impaktfull branding. But it is super important for us that the theme is easy to configure and highly configurable. That is why we choose for component based theming. | ||
|
||
### Assets | ||
|
||
#### Lottie Animations | ||
|
||
These icons can be overriden be added to your assets folder to use the default lottie animations. The only thing you need to do extra is override `package` (in your own project) | ||
|
||
- assets/lottie/loading.json | ||
|
||
#### Icons | ||
|
||
# Todo | ||
|
||
```dart | ||
const like = 'sample'; | ||
``` | ||
- [ ] Add tests | ||
|
||
## Additional information | ||
## License | ||
|
||
TODO: Tell users more about the package: where to find more information, how to | ||
contribute to the package, how to file issues, what response they can expect | ||
from the package authors, and more. | ||
You are free to use this library as long as you give credit to impaktfull. You can use it for commercial and non-commercial projects. See the [LICENSE](LICENSE) file for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:impaktfull_ui_2/impaktfull_ui.dart'; | ||
import 'package:impaktfull_ui_example/src/screen/home/home_screen.dart'; | ||
import 'package:impaktfull_ui_example/src/widget/theme/theme_button.dart'; | ||
|
||
class MyApp extends StatelessWidget { | ||
class MyApp extends StatefulWidget { | ||
const MyApp({super.key}); | ||
|
||
@override | ||
State<MyApp> createState() => MyAppState(); | ||
|
||
static MyAppState of(BuildContext context, {bool useRootNavigator = false}) => | ||
context.findRootAncestorStateOfType<MyAppState>()!; | ||
} | ||
|
||
class MyAppState extends State<MyApp> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return const ImpaktfullUiApp( | ||
return ImpaktfullUiApp( | ||
title: 'impaktfull ui', | ||
impaktfullUiTheme: ThemeButton.activeTheme, | ||
// const is disabled here because it would not rebuild when the theme is set again. | ||
// ignore: prefer_const_constructors | ||
home: HomeScreen(), | ||
); | ||
} | ||
|
||
void refresh() => setState(() {}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
...ents/list_item/listitem_library_item.dart → ...tion/sidebar_navigation_library_item.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
import 'package:impaktfull_ui_example/src/component_library/components/list_item/list_item_library_variant.dart'; | ||
import 'package:impaktfull_ui_example/src/component_library/components/sidebar_navigation/sidebar_navigation_library_variant.dart'; | ||
import 'package:impaktfull_ui_example/src/component_library/config/component_library_inputs.dart'; | ||
import 'package:impaktfull_ui_example/src/component_library/config/component_library_item.dart'; | ||
|
||
class ListItemLibraryItem extends ComponentLibraryItem { | ||
const ListItemLibraryItem(); | ||
class SidebarNavigationLibraryItem extends ComponentLibraryItem { | ||
const SidebarNavigationLibraryItem(); | ||
|
||
@override | ||
String get title => 'ImpaktfullUiListItem'; | ||
String get title => 'ImpaktfullUiSidebarNavigation'; | ||
|
||
@override | ||
List<ComponentLibraryVariant> getComponentVariants() { | ||
return [ | ||
const ListItemLibraryVariant(), | ||
const SidebarNavigationLibraryVariant(), | ||
]; | ||
} | ||
} | ||
|
||
class ListItemLibraryInputs extends ComponentLibraryInputs { | ||
class SidebarNavigationLibraryInputs extends ComponentLibraryInputs { | ||
@override | ||
List<ComponentLibraryInputItem> buildInputItems() => []; | ||
} | ||
|
Oops, something went wrong.