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

FluentApp error while developing in debug #11

Closed
maik-kluwe opened this issue Apr 7, 2021 · 6 comments
Closed

FluentApp error while developing in debug #11

maik-kluwe opened this issue Apr 7, 2021 · 6 comments
Labels
invalid This doesn't seem right

Comments

@maik-kluwe
Copy link

From time to time i got the following error:
Unbenannt

It seems that an"empty" constructor is missing.
A hot-reload resolves the problem but i think it should be possible to resolve this error entirely to not hot-reload each time.

@bdlukaa
Copy link
Owner

bdlukaa commented Apr 7, 2021

Can you please show the whole logs?

@maik-kluwe
Copy link
Author

Next time i get the error i will post the complete error.
But in my understanding the shown error is complete. It occures sometimes if the hot-reload triggers. I do not change anything in the top of the widgets tree.

@bdlukaa
Copy link
Owner

bdlukaa commented Apr 7, 2021

I never got this error. I'd like to know from what line it comes.

@maik-kluwe
Copy link
Author

maik-kluwe commented Apr 8, 2021

This is the entire log: (I replaced the project name with PROJECT). Below the error message i posted the main.dart

════════ Exception caught by widgets library ═══════════════════════════════════
The following NoSuchMethodError was thrown building MyApp(dirty):
No constructor 'FluentApp.' with matching arguments declared in class 'FluentApp'.
Receiver: FluentApp
Tried calling: new FluentApp.()
Found: new FluentApp.({Key? key, GlobalKey? navigatorKey, ((RouteSettings) => Route?)? onGenerateRoute, ((String) => List<Route>)? onGenerateInitialRoutes, ((RouteSettings) => Route?)? onUnknownRoute, List? navigatorObservers, String? initialRoute, ((RouteSettings, (BuildContext) => Widget) => PageRoute)? pageRouteBuilder, Widget? home, Map<String, (BuildContext) => Widget>? routes, ((BuildContext, Widget?) => Widget)? builder, String title, ((BuildContext) => String)? onGenerateTitle, Color? color, Locale? locale, Iterable<LocalizationsDelegate>? localizationsDelegates, ((List?, Iterable) => Locale?)? localeListResolutionCallback, ((Locale?, Iterable) => Locale?)? localeResolutionCallback, Iterable supportedLocales, bool showPerformanceOverlay, bool checkerboardRasterCacheImages, bool checkerboardOffscreenLayers, bool showSemanticsDebugger, bool debugShowWidgetInspector, bool debugShowCheckedModeBanner, ((BuildContext, () => void) => Widget)? inspectorSelectButtonBuilder, Map<LogicalKeySet, Intent>? shortcuts, Map<Type, Action>? actions, Style? style, Style? darkStyle, ThemeMode? themeMode}) => FluentApp

Widget creation tracking is currently disabled. Enabling it enables improved error messages. It can be enabled by passing --track-widget-creation to flutter run or flutter test.
When the exception was thrown, this was the stack
#0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:212:5)
#1 MyApp.build (package:PROJECT/main.dart)
package:PROJECT/main.dart:1
#2 StatelessElement.build
package:flutter/…/widgets/framework.dart:4569
#3 ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:4495
#4 Element.rebuild
package:flutter/…/widgets/framework.dart:4189
...
════════════════════════════════════════════════════════════════════════════════
Reloaded 2 of 723 libraries in 797ms.

class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return FluentApp(
title: "PROJECT",
debugShowCheckedModeBanner: false,
initialRoute: '/',
routes: {
'/': (_) => MainPage(),
},
);
}
}

The MainPage is pretty much the same from the given example project with one "DatabaseEdit" and one SettingsPage.

I hope this will help you :)

@bdlukaa
Copy link
Owner

bdlukaa commented Apr 8, 2021

Hey! According to the error. it's not an issue with the package, since it comes from main.dart#1

I searched in my whole fluent_ui workspace and the only place FluentApp. is mentioned is at FluentApp.router:

Workspace preview

@bdlukaa bdlukaa added the invalid This doesn't seem right label Apr 8, 2021
@maik-kluwe
Copy link
Author

Then it must be a problem in my main.dart file. I will have a look at it.
Thanks for your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants