skip to Main Content

https://github.com/gojunho4321/flutter_toonflix/commit/ee83e68fc021e83a9f6da037e7ba6ef2e6415ffe
this is code what I run in vs studio code.
I selected device as ‘Chrome(web)’ but when I ran the code, chrome displayed address as http://localhost:64661/#/, but there are was only ‘white screen’ ,no other factors(title, loading circle, etc…)
So I ran the other code, which was very simple, but the chrome web displayed white screen also.
screen was like the attached file
enter image description here

How can I solve this problem?

2

Answers


  1. in your index.html file in the web folder delete the

    <base href="$FLUTTER_BASE_HREF">

    (usually it well be at line 17)

    then run flutter clean

    then run flutter run -d chrome

    Login or Signup to reply.
  2. You are missing a MaterialApp widget. A Scaffold in itself is not enough.

    For an easy fix try this, but later you will likely want to have a separate MaterialApp with different pages:

    class HomeScreen extends StatelessWidget {
      HomeScreen({super.key});
      Future<List<dynamic>> webtoons = ApiService.getTodaysToons();
      @override
      Widget build(BuildContext context) {
        // wrap everything into a MaterialApp
        return MaterialApp(
            home: Scaffold(...
    

    There is also a missing ; after the closing of return ListView.separated(....

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search