dawn 2.3.8 dawn: ^2.3.8 copied to clipboard
Dawn is a Dart web package for developing UIs in a pattern similar to Flutter.
dawn #
Description #
Dawn is a Dart Web package that provides basic classes like StatelessWidget
similar to Flutter,
but with a different implementation. It compiles to JavaScript and paints the UI using HTML and CSS.
Example #
Reference #
Why Dawn Exists #
- I really like Flutter's approach (
StatelessWidget
,StatefulWidget
,State<T>
, etc.), but I didn't find it easy at all to develop custom UIs in Flutter compared to HTML and CSS. See this issue on GitHub. - Flutter web is great but it hugely suffers from initial loading performance.
I decided to make something that has the best of both worlds. The ease of developing custom UIs quickly with the elegant approach of Flutter, without compromising the performance.
Getting Started #
-
Download the boilterplate.
-
Extract the zip file into the directory you like.
-
Rename the
example
folder to whatever you want. -
Change
name
anddescription
inpubspec.yaml
if you want: -
Run the following commands:
dart pub remove dawn
dart pub add dawn
dart pub remove dawn_lints
dart pub add --dev dawn_lints
-
Run the following commands:
mkdir .dawn
mkdir .dawn/dev
mkdir .dawn/prod
-
Run the developement mode script:
./scripts/dev.bat
NOTE: You should have NodeJS and Nodemon installed.
-
Run "Live Server" extension on VSCode.
-
Edit
web/main.dart
and enjoy coding!
NOTE: To compile for production, run ./scripts/prod.bat
.
You can find the production-ready output in .dawn/prod
.