Chat Updates

merge-requests/59/head
Aamir Muhammad 3 years ago
parent 06e7a913da
commit a64ae80a4a

@ -102,7 +102,7 @@ class _OutGoingCallState extends State<OutGoingCall> with SingleTickerProviderSt
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
10.height, 10.height,
Text( const Text(
"Aamir Saleem Ahmad", "Aamir Saleem Ahmad",
style: TextStyle( style: TextStyle(
fontSize: 21, fontSize: 21,
@ -112,7 +112,7 @@ class _OutGoingCallState extends State<OutGoingCall> with SingleTickerProviderSt
height: 23 / 12, height: 23 / 12,
), ),
), ),
Text( const Text(
"Ringing...", "Ringing...",
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
@ -124,7 +124,7 @@ class _OutGoingCallState extends State<OutGoingCall> with SingleTickerProviderSt
height: 23 / 24, height: 23 / 24,
), ),
), ),
SizedBox( const SizedBox(
height: 2, height: 2,
), ),
], ],
@ -177,96 +177,54 @@ class _OutGoingCallState extends State<OutGoingCall> with SingleTickerProviderSt
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
if (widget.isVideoCall!) if (widget.isVideoCall!)
RotationTransition( RawMaterialButton(
turns: Tween( onPressed: () {
begin: 0.0, _camOff();
end: -.1, },
) elevation: 2.0,
.chain( fillColor: isCamOff ? MyColors.green2DColor : Colors.grey,
CurveTween( padding: const EdgeInsets.all(
curve: Curves.elasticIn, 15.0,
),
)
.animate(
_animationController!,
),
child: RawMaterialButton(
onPressed: () {
_camOff();
},
elevation: 2.0,
fillColor: isCamOff ? MyColors.green2DColor : Colors.grey,
padding: const EdgeInsets.all(
15.0,
),
shape: const CircleBorder(),
child: Icon(
isCamOff ? Icons.videocam_off : Icons.videocam,
color: MyColors.white,
size: 35.0,
),
), ),
) shape: const CircleBorder(),
else child: Icon(
RotationTransition( isCamOff ? Icons.videocam_off : Icons.videocam,
turns: Tween( color: MyColors.white,
begin: 0.0, size: 35.0,
end: -.1,
)
.chain(
CurveTween(
curve: Curves.elasticIn,
),
)
.animate(
_animationController!,
),
child: RawMaterialButton(
onPressed: () {
_loudOn();
},
elevation: 2.0,
fillColor: isLoudSpeaker ? MyColors.green2DColor : Colors.grey,
padding: const EdgeInsets.all(
15.0,
),
shape: const CircleBorder(),
child: const Icon(
Icons.volume_up,
color: MyColors.white,
size: 35.0,
),
), ),
),
RotationTransition(
turns: Tween(
begin: 0.0,
end: -.1,
) )
.chain( else
CurveTween( RawMaterialButton(
curve: Curves.elasticIn,
),
)
.animate(
_animationController!,
),
child: RawMaterialButton(
onPressed: () { onPressed: () {
_micOff(); _loudOn();
}, },
elevation: 2.0, elevation: 2.0,
fillColor: isMicOff ? MyColors.green2DColor : Colors.grey, fillColor: isLoudSpeaker ? MyColors.green2DColor : Colors.grey,
padding: const EdgeInsets.all( padding: const EdgeInsets.all(
15.0, 15.0,
), ),
shape: const CircleBorder(), shape: const CircleBorder(),
child: Icon( child: const Icon(
isMicOff ? Icons.mic_off : Icons.mic, Icons.volume_up,
color: MyColors.white, color: MyColors.white,
size: 35.0, size: 35.0,
), ),
), ),
RawMaterialButton(
onPressed: () {
_micOff();
},
elevation: 2.0,
fillColor: isMicOff ? MyColors.green2DColor : Colors.grey,
padding: const EdgeInsets.all(
15.0,
),
shape: const CircleBorder(),
child: Icon(
isMicOff ? Icons.mic_off : Icons.mic,
color: MyColors.white,
size: 35.0,
),
), ),
RawMaterialButton( RawMaterialButton(
onPressed: () { onPressed: () {

@ -13,6 +13,7 @@ import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart'; import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart'; import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart';
@ -515,7 +516,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
} else if (index == 3) { } else if (index == 3) {
Navigator.pushNamed(context, AppRoutes.itemsForSale); Navigator.pushNamed(context, AppRoutes.itemsForSale);
} else if (index == 4) { } else if (index == 4) {
Navigator.pushNamed(context, AppRoutes.chat); Navigator.pushNamed(context, AppRoutes.chat).then((Object? value) {
logger.d("Again Api Call");
data.fetchChatCounts();
});
} }
}, },
), ),

Loading…
Cancel
Save