forked from eatvio/eatvio_app
fix: black screen after splash
This commit is contained in:
@@ -18,6 +18,7 @@ import 'package:validators/validators.dart';
|
||||
|
||||
import 'bloc/auth_bloc.dart';
|
||||
import 'models/auth_model.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
|
||||
class AuthScreen extends StatefulWidget {
|
||||
static Widget builder(BuildContext context) {
|
||||
@@ -43,6 +44,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
FlutterNativeSplash.remove();
|
||||
final s = S.of(context);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
||||
@@ -31,6 +31,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
|
||||
class ProfileScreen extends StatefulWidget {
|
||||
final Author? author;
|
||||
@@ -67,6 +68,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
FlutterNativeSplash.remove();
|
||||
return BlocProvider<PlansCubit>(
|
||||
create: (BuildContext context) => plansCubit,
|
||||
child: BlocBuilder<ProfileCubit, ProfileState>(
|
||||
|
||||
@@ -19,7 +19,6 @@ void main() async {
|
||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||
await di.init();
|
||||
await Future.delayed(Duration(seconds: 1), () => FlutterNativeSplash.remove());
|
||||
runApp(MyApp());
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ dependencies:
|
||||
file_picker: ^8.1.4
|
||||
audioplayers: ^6.1.0
|
||||
intl: ^0.19.0
|
||||
rive: ^0.13.19
|
||||
rive: ^0.13.20
|
||||
mask_text_input_formatter: ^2.9.0
|
||||
lottie: ^3.1.3
|
||||
flutter_portal: ^1.1.4
|
||||
|
||||
Reference in New Issue
Block a user