Closed ibrahimcaj closed 1 year ago
Decided to apply the fix myself, see #14. Should be fixed, hopefully.
Hello, thank you for trying this package.
I think using textButtonTheme
might be better to edit this button, (we might not want to affect the other texts)
Would something like this works for you ?
pickerTheme: InstaAssetPicker.themeData(Theme.of(context).primaryColor).copyWith(
// using `textButtonTheme` to edit the confirm button
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Colors.blue,
disabledForegroundColor: Colors.red,
),
),
),
If this solution works for you, i will close your PR and push the changes and release a new version
Not sure why, but the foregroundColor
parameter does not affect the Confirm text color when a picture is selected, stays blue no matter what. The disabledForegroundColor
parameter works fine. Here's how I'm applying the picker theme below:
pickerTheme: theme.copyWith(
canvasColor: Colors.black, // body background color
splashColor: Colors.white.withOpacity(.25), // ontap splash color
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Colors.pink,
disabledForegroundColor: Colors.amber,
),
),
colorScheme: theme.colorScheme.copyWith(
background: Colors.black, // albums list background color
),
appBarTheme: theme.appBarTheme.copyWith(
backgroundColor: Colors.black, // app bar background color
titleTextStyle:
Theme.of(context).appBarTheme.titleTextStyle?.copyWith(
color: Colors.white,
), // change app bar title text style to be like app theme
),
),
(I'm using pink and amber for testing purposes)
Did the version you used included the change i mentioned ?
insta_assets_picker:
git:
url: https://github.com/LeGoffMael/insta_assets_picker
ref: fix/confirm-btn-textButtonTheme
Yep! Did manage to fix it later though, had an unrelated bug. Everything seems to be working, I appreciate it! You can push the new version now
Change published in the new 1.5.1 version
When creating theme data with the following parameters:
...the confirm button text style does not get affected.