diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 7caea45..036c595 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -31,8 +31,10 @@ jobs: - name: Install dependencies run: flutter pub get + # 404.html and flutter_bootstrap.js are mannually added to the web folder to + # fix the 404 error on GH Pages and fix PWA Padding issue - name: Build web - run: flutter build web --wasm --base-href /batucadapp/ + run: flutter build web --wasm --base-href /batucadapp/ --no-web-resources-cdn - name: Commit changes run: | diff --git a/.gitignore b/.gitignore index 01bf524..8b8fca1 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,4 @@ app.*.map.json /android/app/profile /android/app/release -# Until I change the config for dev and release -web/flutter_bootstrap.js .env* diff --git a/assets/fonts/Roboto-Regular.ttf b/assets/fonts/Roboto-Regular.ttf new file mode 100644 index 0000000..ddf4bfa Binary files /dev/null and b/assets/fonts/Roboto-Regular.ttf differ diff --git a/pubspec.yaml b/pubspec.yaml index 7f52f15..6e3a839 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,6 +62,12 @@ dev_dependencies: flutter: uses-material-design: true generate: true + # Flutter engine issue, always download roboto on + # web in the loadAssetFonts function https://github.com/flutter/engine/blob/main/lib/web_ui/lib/src/engine/canvaskit/fonts.dart + fonts: + - family: Roboto + fonts: + - asset: assets/fonts/Roboto-Regular.ttf assets: # Add assets from the images directory to the application. diff --git a/web/404.html b/web/404.html index 10aaa86..2196ad1 100644 --- a/web/404.html +++ b/web/404.html @@ -5,7 +5,7 @@ - +