diff --git a/assets/icons/at.svg b/assets/icons/at.svg new file mode 100644 index 0000000..d3a15d4 --- /dev/null +++ b/assets/icons/at.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/copylink.svg b/assets/icons/copylink.svg new file mode 100644 index 0000000..c2be804 --- /dev/null +++ b/assets/icons/copylink.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/email.svg b/assets/icons/email.svg new file mode 100644 index 0000000..2b99c0f --- /dev/null +++ b/assets/icons/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/emoji.svg b/assets/icons/emoji.svg new file mode 100644 index 0000000..cce5915 --- /dev/null +++ b/assets/icons/emoji.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/facebook.svg b/assets/icons/facebook.svg index eb90f06..d6f8a54 100644 --- a/assets/icons/facebook.svg +++ b/assets/icons/facebook.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/assets/icons/line.svg b/assets/icons/line.svg new file mode 100644 index 0000000..8558b2a --- /dev/null +++ b/assets/icons/line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/live.svg b/assets/icons/live.svg new file mode 100644 index 0000000..194882c --- /dev/null +++ b/assets/icons/live.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/pause.webp b/assets/icons/pause.webp new file mode 100644 index 0000000..7e37229 Binary files /dev/null and b/assets/icons/pause.webp differ diff --git a/assets/icons/person.png b/assets/icons/person.png new file mode 100644 index 0000000..cfc7665 Binary files /dev/null and b/assets/icons/person.png differ diff --git a/assets/icons/person_holder.png b/assets/icons/person_holder.png new file mode 100644 index 0000000..7c8c790 Binary files /dev/null and b/assets/icons/person_holder.png differ diff --git a/assets/icons/qq_circle.webp b/assets/icons/qq_circle.webp new file mode 100644 index 0000000..28e5ebb Binary files /dev/null and b/assets/icons/qq_circle.webp differ diff --git a/assets/icons/report.svg b/assets/icons/report.svg new file mode 100644 index 0000000..dffd9d4 --- /dev/null +++ b/assets/icons/report.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/search.webp b/assets/icons/search.webp new file mode 100644 index 0000000..8da1834 Binary files /dev/null and b/assets/icons/search.webp differ diff --git a/assets/icons/service.png b/assets/icons/service.png new file mode 100644 index 0000000..efd2082 Binary files /dev/null and b/assets/icons/service.png differ diff --git a/assets/icons/setting.png b/assets/icons/setting.png new file mode 100644 index 0000000..000e650 Binary files /dev/null and b/assets/icons/setting.png differ diff --git a/assets/icons/setting_about.png b/assets/icons/setting_about.png new file mode 100644 index 0000000..ea6c0cf Binary files /dev/null and b/assets/icons/setting_about.png differ diff --git a/assets/icons/setting_common.png b/assets/icons/setting_common.png new file mode 100644 index 0000000..2d2a0b8 Binary files /dev/null and b/assets/icons/setting_common.png differ diff --git a/assets/icons/setting_delete.png b/assets/icons/setting_delete.png new file mode 100644 index 0000000..7566ad7 Binary files /dev/null and b/assets/icons/setting_delete.png differ diff --git a/assets/icons/setting_exchange.png b/assets/icons/setting_exchange.png new file mode 100644 index 0000000..df1300a Binary files /dev/null and b/assets/icons/setting_exchange.png differ diff --git a/assets/icons/setting_feedback.png b/assets/icons/setting_feedback.png new file mode 100644 index 0000000..338c037 Binary files /dev/null and b/assets/icons/setting_feedback.png differ diff --git a/assets/icons/setting_logout.png b/assets/icons/setting_logout.png new file mode 100644 index 0000000..528b7ae Binary files /dev/null and b/assets/icons/setting_logout.png differ diff --git a/assets/icons/share_action_bizhi.webp b/assets/icons/share_action_bizhi.webp new file mode 100644 index 0000000..add11c0 Binary files /dev/null and b/assets/icons/share_action_bizhi.webp differ diff --git a/assets/icons/share_action_code.webp b/assets/icons/share_action_code.webp new file mode 100644 index 0000000..8768d49 Binary files /dev/null and b/assets/icons/share_action_code.webp differ diff --git a/assets/icons/share_action_copy_url.webp b/assets/icons/share_action_copy_url.webp new file mode 100644 index 0000000..99ad4d0 Binary files /dev/null and b/assets/icons/share_action_copy_url.webp differ diff --git a/assets/icons/share_action_dislike.webp b/assets/icons/share_action_dislike.webp new file mode 100644 index 0000000..483b65b Binary files /dev/null and b/assets/icons/share_action_dislike.webp differ diff --git a/assets/icons/share_action_download.webp b/assets/icons/share_action_download.webp new file mode 100644 index 0000000..6e1a7b8 Binary files /dev/null and b/assets/icons/share_action_download.webp differ diff --git a/assets/icons/share_action_fav.webp b/assets/icons/share_action_fav.webp new file mode 100644 index 0000000..1fb5be4 Binary files /dev/null and b/assets/icons/share_action_fav.webp differ diff --git a/assets/icons/share_action_hepai.webp b/assets/icons/share_action_hepai.webp new file mode 100644 index 0000000..25d40b8 Binary files /dev/null and b/assets/icons/share_action_hepai.webp differ diff --git a/assets/icons/share_action_jubao.webp b/assets/icons/share_action_jubao.webp new file mode 100644 index 0000000..fa75063 Binary files /dev/null and b/assets/icons/share_action_jubao.webp differ diff --git a/assets/icons/share_action_tohot.webp b/assets/icons/share_action_tohot.webp new file mode 100644 index 0000000..abedfdb Binary files /dev/null and b/assets/icons/share_action_tohot.webp differ diff --git a/assets/icons/share_app_duoshan.webp b/assets/icons/share_app_duoshan.webp new file mode 100644 index 0000000..b809109 Binary files /dev/null and b/assets/icons/share_app_duoshan.webp differ diff --git a/assets/icons/share_app_qq.webp b/assets/icons/share_app_qq.webp new file mode 100644 index 0000000..a31ed9f Binary files /dev/null and b/assets/icons/share_app_qq.webp differ diff --git a/assets/icons/share_app_qq_zone.webp b/assets/icons/share_app_qq_zone.webp new file mode 100644 index 0000000..e4bbbdd Binary files /dev/null and b/assets/icons/share_app_qq_zone.webp differ diff --git a/assets/icons/share_app_sixin.webp b/assets/icons/share_app_sixin.webp new file mode 100644 index 0000000..0a31a07 Binary files /dev/null and b/assets/icons/share_app_sixin.webp differ diff --git a/assets/icons/share_app_toutiao.webp b/assets/icons/share_app_toutiao.webp new file mode 100644 index 0000000..a52991e Binary files /dev/null and b/assets/icons/share_app_toutiao.webp differ diff --git a/assets/icons/share_app_weibo.webp b/assets/icons/share_app_weibo.webp new file mode 100644 index 0000000..ec5ad15 Binary files /dev/null and b/assets/icons/share_app_weibo.webp differ diff --git a/assets/icons/share_app_wx.webp b/assets/icons/share_app_wx.webp new file mode 100644 index 0000000..0e78ddc Binary files /dev/null and b/assets/icons/share_app_wx.webp differ diff --git a/assets/icons/share_app_wx_zone.webp b/assets/icons/share_app_wx_zone.webp new file mode 100644 index 0000000..28a63cd Binary files /dev/null and b/assets/icons/share_app_wx_zone.webp differ diff --git a/assets/icons/share_app_zhuanfa.webp b/assets/icons/share_app_zhuanfa.webp new file mode 100644 index 0000000..409a598 Binary files /dev/null and b/assets/icons/share_app_zhuanfa.webp differ diff --git a/assets/icons/share_button.webp b/assets/icons/share_button.webp new file mode 100644 index 0000000..65ac56f Binary files /dev/null and b/assets/icons/share_button.webp differ diff --git a/assets/icons/shoot_daojishi.webp b/assets/icons/shoot_daojishi.webp new file mode 100644 index 0000000..14756bb Binary files /dev/null and b/assets/icons/shoot_daojishi.webp differ diff --git a/assets/icons/shoot_fanzhuan.webp b/assets/icons/shoot_fanzhuan.webp new file mode 100644 index 0000000..0166029 Binary files /dev/null and b/assets/icons/shoot_fanzhuan.webp differ diff --git a/assets/icons/shoot_filter.webp b/assets/icons/shoot_filter.webp new file mode 100644 index 0000000..613f5c7 Binary files /dev/null and b/assets/icons/shoot_filter.webp differ diff --git a/assets/icons/shoot_flash.webp b/assets/icons/shoot_flash.webp new file mode 100644 index 0000000..d4eaf83 Binary files /dev/null and b/assets/icons/shoot_flash.webp differ diff --git a/assets/icons/shoot_meihua.webp b/assets/icons/shoot_meihua.webp new file mode 100644 index 0000000..7ac4739 Binary files /dev/null and b/assets/icons/shoot_meihua.webp differ diff --git a/assets/icons/shoot_v_off.webp b/assets/icons/shoot_v_off.webp new file mode 100644 index 0000000..2211c58 Binary files /dev/null and b/assets/icons/shoot_v_off.webp differ diff --git a/assets/icons/shoot_v_on.webp b/assets/icons/shoot_v_on.webp new file mode 100644 index 0000000..86906fb Binary files /dev/null and b/assets/icons/shoot_v_on.webp differ diff --git a/assets/icons/shop.png b/assets/icons/shop.png new file mode 100644 index 0000000..edea006 Binary files /dev/null and b/assets/icons/shop.png differ diff --git a/assets/icons/tiktok_code.webp b/assets/icons/tiktok_code.webp new file mode 100644 index 0000000..68184a4 Binary files /dev/null and b/assets/icons/tiktok_code.webp differ diff --git a/assets/icons/twitter.svg b/assets/icons/twitter.svg index 04aa91d..12f2fcc 100644 --- a/assets/icons/twitter.svg +++ b/assets/icons/twitter.svg @@ -1,47 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/assets/icons/user_service.png b/assets/icons/user_service.png new file mode 100644 index 0000000..b0ae303 Binary files /dev/null and b/assets/icons/user_service.png differ diff --git a/assets/icons/wallet.png b/assets/icons/wallet.png new file mode 100644 index 0000000..cd5f51a Binary files /dev/null and b/assets/icons/wallet.png differ diff --git a/assets/icons/weibo_circle.webp b/assets/icons/weibo_circle.webp new file mode 100644 index 0000000..04fe5d3 Binary files /dev/null and b/assets/icons/weibo_circle.webp differ diff --git a/assets/icons/whatsapp.svg b/assets/icons/whatsapp.svg new file mode 100644 index 0000000..a341176 --- /dev/null +++ b/assets/icons/whatsapp.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/wx_circle.webp b/assets/icons/wx_circle.webp new file mode 100644 index 0000000..7a1374d Binary files /dev/null and b/assets/icons/wx_circle.webp differ diff --git a/assets/icons/zhifubao_circle.webp b/assets/icons/zhifubao_circle.webp new file mode 100644 index 0000000..058748e Binary files /dev/null and b/assets/icons/zhifubao_circle.webp differ diff --git a/lib/Screens/home/home.dart b/lib/Screens/home/home.dart index 5c4b955..96d8911 100644 --- a/lib/Screens/home/home.dart +++ b/lib/Screens/home/home.dart @@ -15,7 +15,6 @@ import 'package:telsavideo/screens/login/login.dart'; import 'package:telsavideo/screens/notifications_messages/notifications.dart'; import 'package:telsavideo/screens/record_video/record_video.dart'; import 'package:telsavideo/screens/search/search.dart'; -import 'package:video_player/video_player.dart'; import 'package:telsavideo/screens/profile/profile.dart'; class Home extends StatefulWidget { diff --git a/lib/Screens/home/home_bottom_video_comment.dart b/lib/Screens/home/home_bottom_video_comment.dart new file mode 100644 index 0000000..874dca8 --- /dev/null +++ b/lib/Screens/home/home_bottom_video_comment.dart @@ -0,0 +1,139 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:telsavideo/common/utils.dart'; + +class HomeBottomVideoComment extends StatefulWidget { + BuildContext context; + String? id; + int? commentCount; + HomeBottomVideoComment({required this.context, this.id, this.commentCount}); + @override + State createState() => _HomeBottomVideoCommentState(); +} + +class _HomeBottomVideoCommentState extends State { + ScrollController scrollController = new ScrollController(); + + @override + void initState() { + // TODO: implement initState + super.initState(); + } + + @override + void dispose() { + // TODO: implement dispose + scrollController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(this.widget.context).size; + return Container( + constraints: BoxConstraints( + maxHeight: size.height * 0.73, minHeight: size.height * 0.5), + child: Stack(children: [ + Column(children: [ + _commentHeader(this.widget.commentCount), + _commentContentContainer(size), + // ListView.builder( + // controller: scrollController, + // itemCount: 25, + // itemBuilder: (BuildContext context, int index) { + // return ListTile(title: Text('Item $index')); + // }, + // ) + ]), + Positioned( + bottom: 0, width: size.width, child: _commentPostInnerWrapper()), + ]), + ); + } + + /// the comment header + _commentHeader(int? commentCount) { + return Container( + height: 60, + child: Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox.shrink(), + Center(child: Text('${formattedNumber(commentCount)} comments')), + Align( + alignment: Alignment.centerRight, + child: InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Text( + "X", + style: TextStyle(), + ))) + ], + )), + ); + } + + _commentContentContainer(Size size) { + return Container( + alignment: Alignment.center, + padding: EdgeInsets.only(top: size.height * 0.2), + child: Center( + child: Text("no comments."), + ), + ); + } + + /// the comment post inner wrapper + _commentPostInnerWrapper() { + return Container( + height: 54, + padding: EdgeInsets.only(top: 8, bottom: 8, right: 12, left: 12), + decoration: BoxDecoration( + border: Border( + top: BorderSide( + width: 1.0, + color: Color.fromRGBO(22, 24, 35, 0.12), + ))), + child: Container( + decoration: BoxDecoration( + color: Color.fromRGBO(22, 24, 35, 0.06), + border: Border.all( + color: Colors.transparent, + width: 1, + style: BorderStyle.solid), + borderRadius: BorderRadius.all(Radius.circular(8.0)), + ), + child: Container( + margin: EdgeInsets.only(left: 16), + child: TextFormField( + decoration: InputDecoration( + enabledBorder: InputBorder.none, + suffixIcon: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, // added line + mainAxisSize: MainAxisSize.min, // added line + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + IconButton( + padding: EdgeInsets.zero, + icon: SvgPicture.asset( + "assets/icons/at.svg", + ), + onPressed: () {}, + ), + IconButton( + padding: EdgeInsets.zero, + icon: SvgPicture.asset("assets/icons/emoji.svg"), + onPressed: () {}, + ), + ], + ), + hintText: "add comment...")), + ))); + } +} diff --git a/lib/Screens/home/home_bottom_video_share.dart b/lib/Screens/home/home_bottom_video_share.dart new file mode 100644 index 0000000..6fe09a7 --- /dev/null +++ b/lib/Screens/home/home_bottom_video_share.dart @@ -0,0 +1,116 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class HomeBottomVideoShare extends StatefulWidget { + @override + State createState() => _HomeBottomVideoShareState(); +} + +class _HomeBottomVideoShareState extends State { + @override + Widget build(BuildContext context) { + return Container( + constraints: BoxConstraints(minHeight: 90, maxHeight: 300), + child: Stack(children: [ + Column( + children: [ + _topTitle(), + SizedBox( + height: 20, + ), + Divider( + height: 0.5, + color: Colors.grey, + ), + _shareAppContainer(), + SizedBox( + height: 20, + ), + ], + ), + Positioned( + bottom: 0, + width: MediaQuery.of(context).size.width, + child: _bottomActions()), + ])); + } + + _topTitle() { + return Container( + height: 30, + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + child: Text("Share to", + style: TextStyle( + color: Colors.white, fontWeight: FontWeight.w900))), + ], + ), + ); + } + + _shareApp(String icon, String text, {Color? color}) { + return Container( + margin: EdgeInsets.only(left: 20), + child: Column(children: [ + SvgPicture.asset( + icon, + color: color, + width: 44, + ), + SizedBox( + height: 5, + ), + Text(text, style: TextStyle(color: Colors.white, fontSize: 10)) + ]), + ); + } + + _shareAppContainer() { + return Container( + margin: EdgeInsets.only(top: 15), + height: 80, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + _shareApp("assets/icons/copylink.svg", "Copy link"), + _shareApp("assets/icons/twitter.svg", "Twitter"), + _shareApp("assets/icons/facebook.svg", "Facebook"), + _shareApp("assets/icons/line.svg", "SMS"), + _shareApp("assets/icons/whatsapp.svg", "WhatApps"), + _shareApp("assets/icons/report.svg", "Report", + color: Colors.white70), + ], + ), + ), + ); + } + + _bottomActions() { + return InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Container( + height: 30, + decoration: BoxDecoration(color: Colors.white10), + alignment: Alignment.center, + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + //bottom: 0, + child: Text( + "Cancel", + style: TextStyle( + color: Colors.white, + ), + ), + ), + ], + ), + )); + } +} diff --git a/lib/Screens/home/videoplayer.dart b/lib/Screens/home/videoplayer.dart index 4eb8f0c..846c33a 100644 --- a/lib/Screens/home/videoplayer.dart +++ b/lib/Screens/home/videoplayer.dart @@ -3,10 +3,16 @@ import 'dart:developer' as develop; import 'dart:math' as math; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:marquee_widget/marquee_widget.dart'; +import 'package:telsavideo/api/api.dart'; import 'package:telsavideo/common/icons.dart'; import 'package:telsavideo/common/utils.dart'; +import 'package:telsavideo/components/api.dart'; +import 'package:telsavideo/models/dto/comment/comment_item_digg_dto.dart'; import 'package:telsavideo/models/vo/recommend/itemlist_vo.dart'; +import 'package:telsavideo/screens/home/home_bottom_video_comment.dart'; +import 'package:telsavideo/screens/home/home_bottom_video_share.dart'; import 'package:telsavideo/screens/loading/loading.dart'; import 'package:telsavideo/screens/profile/creator_profile.dart'; import 'package:video_player/video_player.dart'; @@ -56,6 +62,70 @@ class _Videoplayer extends State _timer?.cancel(); } + //digg video + void diggVideo(String videoId) async { + CommentItemDiggDto dto = new CommentItemDiggDto(); + dto.videoId = videoId; + Api.postCommnetItemDigg(dto); + } + + //show bottom comments list from video id + void showBottomComments(String? id, int? commentCount) async { + develop.log("click the show bottom comment"); + showModalBottomSheet( + context: context, + isScrollControlled: true, + shape: RoundedRectangleBorder( + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(10), + topRight: Radius.circular(10), + ), + ), + backgroundColor: Colors.white, + builder: (context) { + return HomeBottomVideoComment( + context: context, + id: id, + commentCount: commentCount, + ); + }, + ); + } + + //show bottom share panel + void showBottomShare() async { + develop.log("click the show bottom share"); + showModalBottomSheet( + context: context, + isScrollControlled: true, // + shape: RoundedRectangleBorder( + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(10), + topRight: Radius.circular(10), + ), + ), + backgroundColor: Color.fromARGB(255, 21, 23, 35), + builder: (context) { + return HomeBottomVideoShare(); + }); + } + + void showSnackBar(BuildContext context) { + final snackBar = SnackBar( + content: const Text('Login successed!'), + backgroundColor: const Color(0xffae00f0), + behavior: SnackBarBehavior.floating, + duration: const Duration(seconds: 2), + action: SnackBarAction( + label: 'Done', + textColor: Colors.white, + onPressed: () { + print('Done pressed!'); + }), + ); + ScaffoldMessenger.of(context).showSnackBar(snackBar); + } + @override void initState() { // Create and store the VideoPlayerController. The VideoPlayerController @@ -273,6 +343,8 @@ class _Videoplayer extends State setState(() { like = !like; }); + // digg video by videoId + diggVideo(item.id!); }, child: Icon(Icons.favorite, size: 30.0, @@ -292,7 +364,10 @@ class _Videoplayer extends State ), ), InkWell( - onTap: () {}, + onTap: () { + showBottomComments( + item.id, item.stats!.commentCount); + }, child: Container( padding: EdgeInsets.only(bottom: 20), child: Column( @@ -316,28 +391,32 @@ class _Videoplayer extends State ), ), ), - Container( - padding: EdgeInsets.only(bottom: 50), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Transform( - alignment: Alignment.center, - transform: Matrix4.rotationY(math.pi), - child: Icon(Icons.reply, - size: 30, color: Colors.white)), - SizedBox(height: 3.0), - Text( - AppLocalizations.of(context)!.home_share, - style: TextStyle( - color: Colors.white, - fontSize: 12.0, - fontWeight: FontWeight.w500, - ), + InkWell( + onTap: () { + showBottomShare(); + }, + child: Container( + padding: EdgeInsets.only(bottom: 50), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Transform( + alignment: Alignment.center, + transform: Matrix4.rotationY(math.pi), + child: Icon(Icons.reply, + size: 30, color: Colors.white)), + SizedBox(height: 3.0), + Text( + AppLocalizations.of(context)!.home_share, + style: TextStyle( + color: Colors.white, + fontSize: 12.0, + fontWeight: FontWeight.w500, + ), + ), + ], ), - ], - ), - ), + )), AnimatedBuilder( animation: _animationController, child: CircleAvatar( diff --git a/lib/api/api.dart b/lib/api/api.dart index 1b1bc6e..fe5be80 100644 --- a/lib/api/api.dart +++ b/lib/api/api.dart @@ -85,6 +85,7 @@ class Api { static Future postCommnetItemDigg( CommentItemDiggDto? dto) async { Map params = new HashMap(); + params["videoId"] = dto?.videoId; var result = await HttpManager.getInstance().post( url: Api.api + HttpConstant.commentItemDigg, cancelTokenTag: 'digg', diff --git a/lib/components/api.dart b/lib/components/api.dart index 729977b..e022bae 100644 --- a/lib/components/api.dart +++ b/lib/components/api.dart @@ -238,8 +238,12 @@ Future showNotification(String title, var body) async { var platformChannelSpecifics = new NotificationDetails( android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); - await flutterLocalNotificationsPlugin! - .show(0, title, body, platformChannelSpecifics, payload: body); + try { + await flutterLocalNotificationsPlugin! + .show(0, title, body, platformChannelSpecifics, payload: body); + } catch (e) { + print(e); + } } broadcastVote( diff --git a/lib/main.dart b/lib/main.dart index 570bd84..5faa5e2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -45,10 +45,9 @@ Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { const AndroidNotificationChannel channel = AndroidNotificationChannel( 'high_importance_channel', // id 'High Importance Notifications', // title - // { - // 'This channel is used for important notifications.', // description - // importance: Importance.high - // } + importance: Importance.high, + description: + 'This channel is used for important notifications.', // description ); /// Initialize the [FlutterLocalNotificationsPlugin] package. @@ -73,7 +72,6 @@ Future main() async { .resolvePlatformSpecificImplementation< AndroidFlutterLocalNotificationsPlugin>() ?.createNotificationChannel(channel); - final appDocumentDirectory = await pathProvider.getApplicationDocumentsDirectory(); /* await FlutterDownloader.initialize( diff --git a/lib/models/dto/comment/comment_item_digg_dto.dart b/lib/models/dto/comment/comment_item_digg_dto.dart index d4963e2..e4c3a06 100644 --- a/lib/models/dto/comment/comment_item_digg_dto.dart +++ b/lib/models/dto/comment/comment_item_digg_dto.dart @@ -1 +1,5 @@ -class CommentItemDiggDto {} +class CommentItemDiggDto { + String? videoId; + + CommentItemDiggDto({this.videoId}); +}