Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black Screen is coming after splash screen. #40

Closed
siva563 opened this issue Jan 30, 2020 · 15 comments
Closed

Black Screen is coming after splash screen. #40

siva563 opened this issue Jan 30, 2020 · 15 comments

Comments

@siva563
Copy link

siva563 commented Jan 30, 2020

Hi Team,

Once added easy_localization into my project and used. It started getting a black screen after the splash screen.

Any fix for this issue.

@HugoHeneault
Copy link

Are you using the plugin in asset or remote mode?

@aissat
Copy link
Owner

aissat commented Feb 6, 2020

#33

@sathya4code
Copy link

sathya4code commented Feb 13, 2020

I am also facing the same issue. Any Solution...? This is My code..

`import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() => runApp(EasyLocalization(
child: MyApp(),
));

class MyApp extends StatelessWidget {
// This widget is the root of your application.
@OverRide
Widget build(BuildContext context) {
var data = EasyLocalizationProvider.of(context).data;
return EasyLocalizationProvider(
data: data,
child: MaterialApp(
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
EasyLocalizationDelegate(locale: data.locale, path: 'resources/langs')
],
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
),
);
}
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);

final String title;

@OverRide
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State {
int _counter = 0;

void _incrementCounter() {
setState(() {
_counter++;
});
}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}`

@aissat
Copy link
Owner

aissat commented Feb 14, 2020

@sathya4code try this example

@sathya4code
Copy link

@sathya4code try this example

@aissat i tried this example. In this example also i am getting black screen. Default Splash Screen -> Black Screen -> Main Class.

@aissat
Copy link
Owner

aissat commented Feb 14, 2020

@sathya4code which version you are used it?!!

@sathya4code
Copy link

@sathya4code which version you are used it?!!

@aissat i am using easy_localization 1.3.3 and Flutter 1.12.13+hotfix.8

@madara134
Copy link

@sathya4code which version you are used it?!!

@aissat i am using easy_localization 1.3.3 and Flutter 1.12.13+hotfix.8

same issue

@aissat
Copy link
Owner

aissat commented Feb 17, 2020

@sathya4code which version you are used it?!!

@aissat i am using easy_localization 1.3.3 and Flutter 1.12.13+hotfix.8

same issue

@sathya4code i fixed your code

import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() => runApp(EasyLocalization(
      child: MyApp(),
    ));

class MyApp extends StatelessWidget {
// This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    var data = EasyLocalizationProvider.of(context).data;
    return EasyLocalizationProvider(
      data: data,
      child: MaterialApp(
        localizationsDelegates: [
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate,
          EasyLocalizationDelegate(locale: data.locale, path: 'resources/langs')
        ],
        locale: data.locale,
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: MyHomePage(title: 'Flutter Demo Home Page'),
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final title;
  MyHomePage({Key key, this.title}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    print(widget.title);
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
 

@sathya4code
Copy link

@sathya4code which version you are used it?!!

@aissat i am using easy_localization 1.3.3 and Flutter 1.12.13+hotfix.8

same issue

@sathya4code i fixed your code

import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() => runApp(EasyLocalization(
      child: MyApp(),
    ));

class MyApp extends StatelessWidget {
// This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    var data = EasyLocalizationProvider.of(context).data;
    return EasyLocalizationProvider(
      data: data,
      child: MaterialApp(
        localizationsDelegates: [
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate,
          EasyLocalizationDelegate(locale: data.locale, path: 'resources/langs')
        ],
        locale: data.locale,
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: MyHomePage(title: 'Flutter Demo Home Page'),
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final title;
  MyHomePage({Key key, this.title}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    print(widget.title);
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
 

@aissat Issue not fixed. Run this code, press the home button, open the app, black screen not coming. But killing the app and again opening the app makes black screen coming.. Can you please check this and give us a solution.

@aissat
Copy link
Owner

aissat commented Feb 17, 2020

@sathya4code I tested code and worked well

@sathya4code
Copy link

@sathya4code I tested code and worked well

I tested the same code with 1.3.5 version. Getting the same issue.

@aissat
Copy link
Owner

aissat commented Feb 17, 2020

@sathya4code I need more details about this issue
Debug and errors messages

@sathya4code
Copy link

sathya4code commented Feb 17, 2020

@sathya4code I need more details about this issue
Debug and errors messages

@aissat This is what i got when i debug. I tested with multiple devices but still getting black screen.
```Launching` lib\fixed_1.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\apk\debug\app-debug.apk.
D/FlutterActivity(11018): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate(11018): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate(11018): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate(11018): Attaching FlutterEngine to the Activity that owns this Fragment.
D/FlutterView(11018): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@65730a2
D/FlutterActivityAndFragmentDelegate(11018): Executing Dart entrypoint: main, and sending initial route: /
D/EGL_emulation(11018): eglMakeCurrent: 0xdd9612c0: ver 3 1 (tinfo 0xd23cbc50)
Syncing files to device Android SDK built for x86...
I/OpenGLRenderer(11018): Davey! duration=854ms; Flags=1, IntendedVsync=526350506611692, Vsync=526350523278358, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=526350538945980, AnimationStart=526350538999180, PerformTraversalsStart=526350539038780, DrawStart=526351093237280, SyncQueued=526351094328980, SyncStart=526351275036680, IssueDrawCommandsStart=526351276141180, SwapBuffers=526351299175780, FrameCompleted=526351541456980, DequeueBufferDuration=225410000, QueueBufferDuration=2061000,
I/Choreographer(11018): Skipped 60 frames! The application may be doing too much work on its main thread.
D/FlutterView(10845): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@a8f7c23
D/EGL_emulation(11018): eglMakeCurrent: 0xdd962460: ver 3 1 (tinfo 0xd23cbe40)
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
I/flutter (11018): Flutter Demo Home Page
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
I/flutter (11018): Flutter Demo Home Page
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):
D/skia (11018): Shader compilation error
D/skia (11018): ------------------------
D/skia (11018): Errors:
D/skia (11018):

@aissat
Copy link
Owner

aissat commented Feb 17, 2020

@sathya4code this issues not from my package
take a look here:
8578 Shader compilation error
Shader compilation error (Skia)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants