make send button color based on igc state
This commit is contained in:
parent
9099fbf37b
commit
6557da36fc
1 changed files with 3 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:fluffychat/pangea/constants/colors.dart';
|
||||
import 'package:fluffychat/pangea/enum/assistance_state_enum.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
|
|
@ -28,10 +28,8 @@ class ChoreographerSendButton extends StatelessWidget {
|
|||
alignment: Alignment.center,
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.send_outlined),
|
||||
color: controller.choreographer.igc.canSendMessage ||
|
||||
!controller.choreographer.isAutoIGCEnabled
|
||||
? null
|
||||
: PangeaColors.igcError,
|
||||
color:
|
||||
controller.choreographer.assistanceState.stateColor(context),
|
||||
onPressed: () {
|
||||
controller.choreographer.send(context);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue