Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:device_preview/device_preview.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_news_app_mobile_client_full_source_code/app/config/config.dart';
import 'package:flutter_news_app_mobile_client_full_source_code/app/services/splash_screen_remover/web_splash_remover.dart';
import 'package:flutter_news_app_mobile_client_full_source_code/bootstrap.dart';

// Define the current application environment (production/development/demo).
Expand All @@ -17,13 +16,6 @@ void main() async {

final appWidget = await bootstrap(appConfig, appEnvironment);

// Only remove the splash screen on web after the app is ready.
if (kIsWeb) {
WidgetsBinding.instance.addPostFrameCallback((_) {
removeSplashFromWeb();
});
}

if (appConfig.environment == AppEnvironment.demo && kIsWeb) {
runApp(
DevicePreview(
Expand Down
8 changes: 1 addition & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@ flutter:

flutter_launcher_icons:
image_path: assets/logo/flutter-news-app-full-source-code-dark-logo.png

android: "launcher_icon"
min_sdk_android: 21

web:
generate: true
background_color: "#FFFFFF"
Expand All @@ -133,12 +131,8 @@ flutter_launcher_icons:
flutter_native_splash:
color: "#FFFFFF"
color_dark: "#212121"

# Optional: Specify an image asset for the splash screen
image: assets/logo/flutter-news-app-full-source-code-dark-logo.png
image_dark: assets/logo/flutter-news-app-full-source-code-light-logo.png

# Ensure configuration is applied to both platforms
android: true
ios: true
web: false
web: true
41 changes: 6 additions & 35 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
<html>

<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">

<meta charset="UTF-8">
Expand All @@ -38,8 +25,6 @@
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">




<style id="splash-screen-style">
html {
height: 100%
Expand Down Expand Up @@ -111,14 +96,9 @@
function removeSplashFromWeb() {
document.getElementById("splash")?.remove();
document.getElementById("splash-branding")?.remove();
document.getElementById("splash-container")?.remove();
document.body.style.background = "transparent";
}
</script>
<script>
var serviceWorkerVersion = null;
</script>
<script src="flutter.js" defer></script>
</head>

<body>
Expand All @@ -132,24 +112,15 @@
<img class="center" aria-hidden="true" src="splash/img/light-1x.png" alt="">
</picture>



<div id="splash-container" class="center">
<div class="loader"></div>
</div>
<script>
window.addEventListener('load', function (ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function (engineInitializer) {
engineInitializer.initializeEngine().then(function (appRunner) {
appRunner.runApp();
});
}
});
});
</script>
<script src="flutter_bootstrap.js" async></script>



</body>

</html>
Binary file modified web/splash/img/dark-1x.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 modified web/splash/img/dark-2x.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 modified web/splash/img/dark-3x.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 modified web/splash/img/dark-4x.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 modified web/splash/img/light-1x.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 modified web/splash/img/light-2x.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 modified web/splash/img/light-3x.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 modified web/splash/img/light-4x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading