Skip to content
Snippets Groups Projects
Commit f5344e67 authored by vjrj's avatar vjrj
Browse files

Trying to fix introduction error

parent cd79f473
No related branches found
No related tags found
No related merge requests found
...@@ -186,8 +186,8 @@ void main() async { ...@@ -186,8 +186,8 @@ void main() async {
GinkgoApp(darkTheme: darkTheme, lightTheme: lightTheme)), GinkgoApp(darkTheme: darkTheme, lightTheme: lightTheme)),
))); )));
}); });
if (inDevelopment) { if (!kIsWeb && inDevelopment) {
// Only use sentry in production // Only use sentry in development
await SentryFlutter.init(( await SentryFlutter.init((
SentryFlutterOptions options, SentryFlutterOptions options,
) { ) {
...@@ -266,11 +266,11 @@ class _AppIntro extends State<AppIntro> { ...@@ -266,11 +266,11 @@ class _AppIntro extends State<AppIntro> {
GlobalKey<IntroductionScreenState>(); GlobalKey<IntroductionScreenState>();
void _onIntroEnd(BuildContext context, AppCubit cubit) { void _onIntroEnd(BuildContext context, AppCubit cubit) {
cubit.introViewed();
Navigator.of(context).pushReplacement( Navigator.of(context).pushReplacement(
MaterialPageRoute<void>( MaterialPageRoute<void>(
builder: (BuildContext _) => const SkeletonScreen()), builder: (BuildContext _) => const FeedbackAndSkeletonScreen()),
); );
cubit.introViewed();
} }
@override @override
...@@ -551,10 +551,7 @@ class _GinkgoAppState extends State<GinkgoApp> { ...@@ -551,10 +551,7 @@ class _GinkgoAppState extends State<GinkgoApp> {
locale: context.locale, locale: context.locale,
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
home: context.read<AppCubit>().isIntroViewed home: context.read<AppCubit>().isIntroViewed
? BetterFeedback( ? const FeedbackAndSkeletonScreen()
localizationsDelegates: context.localizationDelegates
..add(CustomFeedbackLocalizationsDelegate()),
child: const SkeletonScreen())
: const AppIntro(), : const AppIntro(),
builder: (BuildContext buildContext, Widget? widget) { builder: (BuildContext buildContext, Widget? widget) {
NotificationController.locale = context.locale; NotificationController.locale = context.locale;
...@@ -562,14 +559,7 @@ class _GinkgoAppState extends State<GinkgoApp> { ...@@ -562,14 +559,7 @@ class _GinkgoAppState extends State<GinkgoApp> {
BouncingScrollWrapper.builder( BouncingScrollWrapper.builder(
context, context,
ConnectivityWidgetWrapperWrapper( ConnectivityWidgetWrapperWrapper(
//message: tr('offline'), offlineWidget: Column(
//height: 18,
offlineWidget: /* Container(
color: Colors.transparent,
child: Center(
child: */
Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
const Icon( const Icon(
...@@ -596,7 +586,6 @@ class _GinkgoAppState extends State<GinkgoApp> { ...@@ -596,7 +586,6 @@ class _GinkgoAppState extends State<GinkgoApp> {
const SizedBox(height: 110), const SizedBox(height: 110),
], ],
), ),
child: widget!, child: widget!,
)), )),
maxWidth: 480, maxWidth: 480,
...@@ -614,3 +603,17 @@ class _GinkgoAppState extends State<GinkgoApp> { ...@@ -614,3 +603,17 @@ class _GinkgoAppState extends State<GinkgoApp> {
}); });
} }
} }
class FeedbackAndSkeletonScreen extends StatelessWidget {
const FeedbackAndSkeletonScreen({
super.key,
});
@override
Widget build(BuildContext context) {
return BetterFeedback(
localizationsDelegates: context.localizationDelegates
..add(CustomFeedbackLocalizationsDelegate()),
child: const SkeletonScreen());
}
}
...@@ -18,8 +18,8 @@ class _SecondScreenState extends State<SecondScreen> { ...@@ -18,8 +18,8 @@ class _SecondScreenState extends State<SecondScreen> {
@override @override
void initState() { void initState() {
tutorial = SecondTutorial(context);
super.initState(); super.initState();
tutorial = SecondTutorial(context);
} }
@override @override
......
...@@ -27,8 +27,8 @@ class _ThirdScreenState extends State<ThirdScreen> { ...@@ -27,8 +27,8 @@ class _ThirdScreenState extends State<ThirdScreen> {
@override @override
void initState() { void initState() {
tutorial = ThirdTutorial(context);
super.initState(); super.initState();
tutorial = ThirdTutorial(context);
} }
@override @override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment