mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-17 14:30:40 +01:00
Merge branch 'krille/story-colors' into 'main'
chore: Make color change of stories on editing complete See merge request famedly/fluffychat!677
This commit is contained in:
commit
d7bab1456c
@ -39,11 +39,11 @@ class AddStoryController extends State<AddStoryPage> {
|
|||||||
|
|
||||||
bool get hasMedia => image != null || video != null;
|
bool get hasMedia => image != null || video != null;
|
||||||
|
|
||||||
void updateColors(String text) => hasMedia
|
void updateColors() => hasMedia
|
||||||
? null
|
? null
|
||||||
: setState(() {
|
: setState(() {
|
||||||
backgroundColor = text.color;
|
backgroundColor = controller.text.color;
|
||||||
backgroundColorDark = text.darkColor;
|
backgroundColorDark = controller.text.darkColor;
|
||||||
});
|
});
|
||||||
|
|
||||||
void importMedia() async {
|
void importMedia() async {
|
||||||
|
@ -98,7 +98,7 @@ class AddStoryView extends StatelessWidget {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
backgroundColor: !controller.hasMedia ? null : Colors.black,
|
backgroundColor: !controller.hasMedia ? null : Colors.black,
|
||||||
),
|
),
|
||||||
onChanged: controller.updateColors,
|
onEditingComplete: controller.updateColors,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: controller.hasMedia
|
hintText: controller.hasMedia
|
||||||
|
Loading…
x
Reference in New Issue
Block a user