buildVideo method

Widget buildVideo()

Implementation

Widget buildVideo() {
  String videoUrl =
      widget.message['notification_content']['attachments']['attachment'];

  final isDarkMode = Theme.of(context).brightness == Brightness.dark;

  return SizedBox(
    height: 55,
    width: 55,
    child: InkWell(
      onTap: () {
        _launchUrl(Uri.parse(videoUrl));
      },
      child: ClipRRect(
        borderRadius: BorderRadius.circular(6.0),
        child: Container(
          padding: EdgeInsets.all(12),
          color: isDarkMode
              ? widget.themeConfig?.darkBackground?.withOpacity(0.6) ??
                  Colors.white.withOpacity(0.2)
              : widget.themeConfig?.lightBackground?.withOpacity(0.6) ??
                  Colors.black.withOpacity(0.2),
          child: Column(
            children: [
              Icon(
                Icons.play_circle,
                color: isDarkMode
                    ? widget.themeConfig?.darkText ?? Colors.white
                    : widget.themeConfig?.lightText ?? Colors.black,
                size: 30,
              ),
            ],
          ),
        ),
      ),
    ),
  );
}