mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 14:59:29 +01:00
chore: Make color change of stories on editing complete
This commit is contained in:
parent
de7e678962
commit
0934d4b7df
@ -39,11 +39,11 @@ class AddStoryController extends State<AddStoryPage> {
|
||||
|
||||
bool get hasMedia => image != null || video != null;
|
||||
|
||||
void updateColors(String text) => hasMedia
|
||||
void updateColors() => hasMedia
|
||||
? null
|
||||
: setState(() {
|
||||
backgroundColor = text.color;
|
||||
backgroundColorDark = text.darkColor;
|
||||
backgroundColor = controller.text.color;
|
||||
backgroundColorDark = controller.text.darkColor;
|
||||
});
|
||||
|
||||
void importMedia() async {
|
||||
|
@ -98,7 +98,7 @@ class AddStoryView extends StatelessWidget {
|
||||
color: Colors.white,
|
||||
backgroundColor: !controller.hasMedia ? null : Colors.black,
|
||||
),
|
||||
onChanged: controller.updateColors,
|
||||
onEditingComplete: controller.updateColors,
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: controller.hasMedia
|
||||
|
Loading…
Reference in New Issue
Block a user