ueman / feedback

A simple widget for getting better feedback.
https://pub.dev/packages/feedback
392 stars 94 forks source link

ThemeData Not Working #183

Open DragonSlayer88 opened 2 years ago

DragonSlayer88 commented 2 years ago

Version

2.4.1

Library

feedback

Flutter channel

stable

Flutter version

2.8.1

Platform

Android, Windows

Details

ThemeData is not working. I tried changing the colors of the background etc. and everything is white. I am using custom colors which at first i thought was the issue so i switched to built in colors such as Colors.blue, Colors.red, etc. But its still not working for me.

Steps to reproduce

This is My Code: ThemeProvider( initTheme: initTheme, builder: (context, myTheme) { return BetterFeedback( theme: FeedbackThemeData( background: Theme.of(context).cardColor, feedbackSheetColor: Theme.of(context).bottomAppBarColor, drawColors: [ Colors.red, Colors.green, Colors.blue, Colors.yellow, Theme.of(context).hintColor ], ), feedbackBuilder: (context, onSubmit,scrollController) => CustomFeedbackForm(onSubmit: onSubmit), child: MaterialApp( /* navigatorObservers: <NavigatorObserver>[ observer ],*/ navigatorKey: NavigationService.navigatorKey, localizationsDelegates: context.localizationDelegates, supportedLocales: context.supportedLocales, locale: context.locale, debugShowCheckedModeBanner: false, // Add the locale here home: Home(), theme: myTheme, ) ); }) Capture

Output of flutter doctor -v

No response

cyberpwnn commented 1 year ago

Its because its at the root of the application, so you basically have to put it under one of your stateful widgets that can call setstate AFTER your app has defined its theme (just call setstate on that parent widget when the feedback screen opens really)

That being said the text color seems to be black no matter what i do... so i might have to copy edit this project for one of my projects