Line data Source code
1 : import 'package:flutter_chrome_cast/lib.dart';
2 :
3 : /// Android-specific extension for idle reason.
4 : extension GoogleCastIdleReasonAndroid on GoogleCastMediaIdleReason {
5 : /// Creates an idle reason from a map value.
6 0 : static GoogleCastMediaIdleReason fromMap(String value) {
7 0 : return GoogleCastMediaIdleReason.values.firstWhere(
8 0 : (element) => element.name.toUpperCase() == value.toUpperCase(),
9 0 : orElse: () => GoogleCastMediaIdleReason.none,
10 : );
11 : }
12 : }
|