File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change
1
+ /// A stub implementation of the splash remover for non-web platforms.
2
+ ///
3
+ /// This function does nothing, as splash screen removal is only handled
4
+ /// on the web.
5
+ void removeSplashFromWeb () {
6
+ // No-op for non-web platforms.
7
+ }
Original file line number Diff line number Diff line change
1
+ import 'dart:js_interop' ;
2
+
3
+ /// Web-specific implementation that calls the JavaScript function
4
+ /// to remove the splash screen.
5
+ @JS ('removeSplashFromWeb' )
6
+ external void removeSplashFromWeb ();
Original file line number Diff line number Diff line change
1
+ export 'splash_remover_stub.dart'
2
+ if (dart.library.html) 'splash_remover_web.dart' ;
Original file line number Diff line number Diff line change 1
- import 'dart:js_interop' ;
2
-
3
1
import 'package:device_preview/device_preview.dart' ;
2
+ import 'package:flutter_news_app_mobile_client_full_source_code/app/services/web_splash.dart' ;
4
3
import 'package:flutter/foundation.dart' ;
5
4
import 'package:flutter/material.dart' ;
6
5
import 'package:flutter_news_app_mobile_client_full_source_code/app/config/config.dart' ;
@@ -9,9 +8,6 @@ import 'package:flutter_news_app_mobile_client_full_source_code/bootstrap.dart';
9
8
// Define the current application environment (production/development/demo).
10
9
const appEnvironment = AppEnvironment .development;
11
10
12
- @JS ('removeSplashFromWeb' )
13
- external void removeSplashFromWeb ();
14
-
15
11
void main () async {
16
12
final appConfig = switch (appEnvironment) {
17
13
AppEnvironment .production => AppConfig .production (),
You can’t perform that action at this time.
0 commit comments